Thank you very much for your advice!

I have not tried to raise MediaPlayers thread priority yet, but I'll
try it next. Although i must admit that i am not convinced with this
solution. The game is opengl powered. Input processing, game logic and
rendering are each separated in a dedicated thread (all with default
priority). The game usually runs at 50+ frames without input and 40+
frames during input. Considering the implementation, there's nothing
special, so i expect MediaPlayers default priority to be sufficient.

Maybe there's an other, more efficient way to play background music
instead.
The ogg streaming seems to cost a lot of cpu time. Do you know of a
more efficient way? Would mp3 be more (or maybe less) efficient? Do
different sample- or bitrates have an impact on playback performance?
Would reading/decoding the audio data myself, without the use of
MediaPlayer, be a viable solution?
Any advice is welcome!

Thanks,
Mike.



On 15 Okt., 14:52, Mike <[email protected]> wrote:
> Hello,
>
> the game I am working on uses SoundPool for sound effects and
> MediaPlayer for background music playback.
> Input happens enirely through the touch screen, with a 20 mS delay
> after each processed MotionEvent.
> Sometimes (very rarely) it happens that the background music gets
> interrupted for a fraction of a second during input.
> Do you have any ideas how to ensure MediaPlayer continues audio
> playback during touch screen input?
>
> All audio files are in ogg format with various sample and bit rates.
> Would it be an advantage if all audio files would share the same
> samplerate and/or bitrate?
>
> Do you have any other ideas how to improve audo playback performance?
>
> Any advice is welcome!
> Thanks in advance,
> Mike.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to