12-16-2009 08:16 PM
Probably but I am busy doing some other nontrivial tasks.
If I did I probably would want it to be real time (that's the only way it is actually useful for games), in my head I imagine it would probably require a custom InputStream that would have the mixer either built in or as a type that could be passed into the constructor or a set function. Then when bytes are to be read it would mix the audio and return the mixed audio. It would probably be horribly laggy but it would be something.
12-16-2009 08:52 PM
That is not difficult to do if the streams are encoded in a simple format, like linear.
Just want to give you a heads up if you ever want to do this. Another challege is manage the buffering of the player in real time. Especially when the playing is interrupted by a call as the call might throw the timing of the player out of wack. I have managed to take care all that for a different type of application. It is more art than science.
12-21-2009 05:10 AM
So, still no answers from RIM developers....
We decided not to play background music, only sound effects,
BlackBerry isn't good platform to make a great games and it's a pity
03-03-2010 08:45 PM
I have a question regarding the background music in the game. I am currently using Player and its Player.setLoop(-1) method to loop a short mp3 over and over as background music. However, there is a slight but noticeable lag when the song loops back to the beginning. Is it the same case with yours? Any idea how to solve this?
03-08-2010 03:27 PM
I've encountered the same problem (on a non-Storm platform). They only way I managed to solve the issue was to create an InputStream stream that loops the audio (then pass the InputStream to the Player), so that the Player doesn't have to loop it. In this case there's no delay between the iterations of the loop. I would be interested to learn if there's a cleaner solution.