Using AudioTrack in Android to play a WAV file

后端 未结 7 956
别跟我提以往
别跟我提以往 2020-12-01 05:50

I\'m working with Android, trying to make my AudioTrack application play a Windows .wav file (Tada.wav). Frankly, it shouldn\'t be this hard, but I\'m hearing a lot of stra

相关标签:
7条回答
  • 2020-12-01 06:18

    Please don't perpetuate terrible parsing code. WAV parsing is trivial to implement http://soundfile.sapp.org/doc/WaveFormat/ and you will thank yourself by being able to parse things such as the sampling rate, bit depth, and number of channels.

    Also x86 and ARM (at least by default) are both little endian , so native-endian WAV files should be fine without any shuffling.

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