问题
Tearing my hair out trying to get some sound working on my 99% completed game.
I am using libgdx 1.6.1 eclipse juno with the latest robovm plugin for eclipse, I am testing on my iPhone 4s (I have apple dev status).
I am using mp3s but have converted to ogg to test my problem. Unfortunately, The same problem came back so I switched back to MP3's.
The Sound work fine in desktop and android versions based on the same core code.
The error i am getting is the following:
2015-08-03 20:24:51.953 IOSLauncher[2219:286610] OAL Error: -[OALAudioFile initWithUrl:reduceToMono:]: Could not open url file:///private/var/mobile/Containers/Bundle/Application/AEB5D1A2-B3C7-41A6-9414-351CE311EE47/IOSLauncher.app/sounds/g1.mp3 (error code 0x7768743f: Unknown ext audio error) 2015-08-03 20:24:51.955 IOSLauncher[2219:286610] OAL Error: -[OALSimpleAudio internalPreloadEffect:reduceToMono:]: Could not load effect /private/var/mobile/Containers/Bundle/Application/AEB5D1A2-B3C7-41A6-9414-351CE311EE47/IOSLauncher.app/sounds/g1.mp3
Any help would be appreciated and I can provide lots more info if needed!
Thanks
Phil
回答1:
Ok I have solved my issue by a process of elimination.
In my iOS project the only place iOS picks up the sounds is in the directory /data/sounds
It now works fully with the mp3s I have and no other changes were needed.It works on the iOS simulator and on the real device.
My game project linked the sounds to the android project through assets which clearly does not work in iOS! I hope this helps someone!
Thanks Phil.
来源:https://stackoverflow.com/questions/31802986/libgdx-ios-robovm-no-sound-unknown-ext-audio