Would anyone like to participate in developing a small Android program?
What is it?
It's a software-based audio player with gapless playback support.
What is software-based playback?
Most Android devices have a built-in chip that's basically a self-contained portable audio player. Pretty much every function in the Java API just sends high level commands (play X file, pause, next track) to this chip.
A software player ignores the hardware and gives the CPU control over all steps of playback, including decoding and track management. The hardware is only used to output the decoded audio streams.
What is gapless playback?
Many CDs nowadays are produced such that two consecutive tracks are played without any interruption in the audio. Some formats, such as Ogg Vorbis and FLAC but not MP3, are able to store this effect exactly. With proper player support, the effect can be reproduced when playing back the compressed audio files.
Why software-based playback?
Many Android devices are equipped with inferior audio chips which are incapable of gapless playback, even if the format in question does support it. By bypassing the decoder entirely and giving the CPU total control, it's possible to guarantee gapless playback regardless of the underlying hardware (barring a CPU too slow to fill the output buffers quickly enough), at the cost of possibly increased power usage.
If you're interested, send me an e-mail or a PM. If you have any questions, post them here.
I'd be glad to help out however I can. I set up an Android dev environment awhile back and never really did much but create a test app and get it on my phone. Always wanted to do something relatively significant with Android. Seems like an interesting system to develop on.
There's a C++ core that interacts with the audio hardware and the various software decoders; manages resources; creates, fills, and queues buffers; and controls playback. This still needs to get some kinks worked out.
I expect that on top of this, there will be a Java layer that will handle the GUI, higher level aspects (track and playlist management, etc.), and will send control messages to the C++ core while in turn receiving info messages back (time position, metadata, etc.).
Like I said in the PM, I will be uploading it sometime during the next few days, after I get a chance to clean up a few things in the source. Mostly, I need to make sure that the SDK can build the thing, because the last time I touched it I was testing the core on my desktop (it compiles on both almost without modifications).
* Implement more decoders. Currently only Ogg Vorbis implemented. On that note, I found a bug while trying to test the build with two very low quality files.
* Optimize memory usage. There are too many page faults.
* Implement seeking, pausing, etc.
* Implement metadata readers.
* Implement ReplayGain.
* Implement the interface with the Java layer and the higher level functions.
* Various minor conceptual and code organization corrections.
* GitHub for Windows doesn't like my initial commit. It crashed four times while trying to stage. Git Extensions should also work.
* The C++ core builds on desktops without changes, you just need to provide the dependencies. This is useful to avoid deployment to a real device or an emulator.
* To test playback, push() paths to AudioPlayer::playlist (the object is incorrectly named).