在我的游戏中,在libgdx中完成我有4个声音 . 其中三个低于1秒,第四个是循环播放3秒 . 在比赛开始时,所有声音都正确播放,但是在尝试播放第4个声音后导致错误而没有播放声音:

E/AudioFlinger(   67): not enough memory for AudioTrack size=525780
D/MemoryDealer(   67):   AudioTrack (0x51e58, size=1048576)
D/MemoryDealer(   67):     0: 00051e70 | 0x00000000 | 0x00003480 | A
D/MemoryDealer(   67):     1: 0001b720 | 0x00003480 | 0x00003480 | A
D/MemoryDealer(   67):     2: 0001ad18 | 0x00006900 | 0x00003480 | A
D/MemoryDealer(   67):     3: 0001e4c0 | 0x00009D80 | 0x00003480 | A
D/MemoryDealer(   67):     4: 0001b678 | 0x0000D200 | 0x00003480 | A
D/MemoryDealer(   67):     5: 0001b350 | 0x00010680 | 0x00003480 | A
D/MemoryDealer(   67):     6: 00051f00 | 0x00013B00 | 0x000805E0 | A
D/MemoryDealer(   67):     7: 0001af00 | 0x000940E0 | 0x00003480 | A
D/MemoryDealer(   67):     8: 0001b140 | 0x00097560 | 0x00003480 | A
D/MemoryDealer(   67):     9: 0001f800 | 0x0009A9E0 | 0x00003480 | A
D/MemoryDealer(   67):    10: 0001ba40 | 0x0009DE60 | 0x00006900 | F
D/MemoryDealer(   67):    11: 00051ce0 | 0x000A4760 | 0x00003480 | A
D/MemoryDealer(   67):    12: 0001bac8 | 0x000A7BE0 | 0x00058420 | F
D/MemoryDealer(   67):   size allocated: 660192 (644 KB)

一段时间后声音又回来了 . Libgdx使用Android SoundPool来实现此类效果 . 我曾尝试从DDMS强制GC,虽然gc没有播放声音 .

Libgdx Android Sound Implementation