Hi all,
I’m writing an app that measures the volume at certain intervals (every 10 seconds.) Elsewhere in the app I play a sound when the volume exceeds a predefined limit. This all works fine in the simulator and on iOS devices. I’m getting the following errors in the console on the devices however. This error occurs when I stop the recording. I have to stop the recording after each check otherwise I’m unable to play sounds elsewhere in the app.
The errors in the xCode console with the iPad connected and app running are:
May 14 20:54:11 iPad mediaserverd[40] <Error>: 20:54:11.842 <0x256000> AudioConverterNew returned -50
May 14 20:54:11 iPad mediaserverd[40] <Error>: 20:54:11.844 <0x256000> IO_ChangeIOFormat: error -50
May 14 20:54:11 iPad mediaserverd[40] <Error>: 20:54:11.848 <0x256000> Queue_ChangeIOFormat: failed (-50)
The code that measures the volume and stops the recording:
local recording = media.newRecording()
recording:startTuner()
recording:startRecording()
util.wait(500)–waits 500 ms
local v = recording:getTunerVolume()
recording:stopRecording()–causes the exception. Removing this stops the errors, but I’m unable to play music elsewhere in the app
Any help will be much appreciated
Rikus