Rockbox Development > Feature Ideas

playing multiple tracks at once - please please

<< < (2/4) > >>

cereal_killer:
I hope that I address the right topic with my post here, but I was wondering what the audiomixer committed in r30097 does and if playing back sounds from 2 different sources (e.g. playing back 2 sound files simultaneously) was now possible with this feature. I read through the FS task and the Log Message, but I think I don't have the technical knowledge to understand this things right.

Is there some more documentation for this feature or can somebody describe how this audiomixer works or how to actually use this feature and benefit from it?

Greetings

c_k

saratoga:

--- Quote from: cereal_killer on August 16, 2011, 01:32:22 PM ---I hope that I address the right topic with my post here, but I was wondering what the audiomixer committed in r30097 does and if playing back sounds from 2 different sources (e.g. playing back 2 sound files simultaneously) was now possible with this feature.

--- End quote ---

It allows you to provide audio drivers with as many audio streams as you like and have them mixed.  Playback from 2 different sources was already possible before that (and indeed plugins like doom did so), but this makes it much neater to implement.  It also simplifies mixing in the voice interface with audio, and prevents weird issues such as the voice interface not working when audio was stopped.

cereal_killer:
thank you for your kind answer saratoga,


--- Quote from: saratoga on August 16, 2011, 01:53:58 PM ---It allows you to provide audio drivers with as many audio streams as you like and have them mixed. 

--- End quote ---

but does this mean, that launching a LUA plugin that is able to playback mp3s (see: http://forums.rockbox.org/index.php/topic,28524.0.html) while listening to regular audio playback (e.g. started from file browser) can achieve hearing 2 separate soundfiles at the same time?

thanks in advance

c_k

saratoga:

--- Quote from: cereal_killer on August 16, 2011, 03:12:34 PM ---but does this mean, that launching a LUA plugin that is able to playback mp3s (see: http://forums.rockbox.org/index.php/topic,28524.0.html) while listening to regular audio playback (e.g. started from file browser) can achieve hearing 2 separate soundfiles at the same time?

--- End quote ---

That lua script would (assuming its finished) just start audio from the file browser programatically, not actually decode audio.   So running it would be the same as clicking on a file in the file browser.  If you ran the script, then clicked something in the file browser you would hear the first track, then that would stop as it began playing the second track.

I have no idea how lua works, but in theory you could probably write a lua plugin to play mutliple streams at the same time from audio you generated or read from disk or something.  I think you can do most things in lua. 

gbl08ma:
LUA (or any C plugin) would need to decode the audio files into raw audio (PCI?), that would be added to the new Rockbox audio mixer - at least this is my understanding of how it works.

Since it's a nearly impossible task to decode MP3, OGG or anoher complex audio format in LUA (no codec has been ported, and porting would be a pain, even because LUA is slow under Rockbox, and there's the lack of the math library), I think the only reliable and extensible way to decode various audio files simultaneously using Rockbox codecs  would be to have a way to declare multiple instances of the playback engine - not something really possible on the limited systems Rockbox runs on.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version