Soundpool or media player?

后端 未结 1 1855
死守一世寂寞
死守一世寂寞 2021-01-11 18:20

I am doing a cards game for android and I want that everytime a card is thrown, to play throwing sound. It is the same file. I will have also other sounds playing like backg

相关标签:
1条回答
  • 2021-01-11 18:37

    I would use the sound pool for short clips. I might be wrong but the sound pool has a smaller overhead plus it's the correct way to play short clips, it also allows you to specify how many times per second said sound clip can play which helps slower phones.

    With regards to the mp3 vs ogg I use mp3. I don't believe there is any performance issues. Ogg is licence free but that doesn't really matter with regards to your app. Plus it might help if you plan on using these clips on another platform that doesn't play ogg files. No names mentioned :P

    0 讨论(0)
提交回复
热议问题