Strange error from console - sound related

Hi, after a whileI am getting this error in my console, then the simulator and corona crashes.
17dTesting Error with clearing buffer from source: Invalid Operation
What does this error mean?

Joakim

[import]uid: 81188 topic_id: 29127 reply_id: 329127[/import]

An Corona staff that could fill this in?

Joakim [import]uid: 81188 topic_id: 29127 reply_id: 117288[/import]

Sounds like you may be disposing an audio buffer for a channel that is still playing or buffer that has not been loaded yet. It’s hard to say since you didn’t post any code. [import]uid: 7559 topic_id: 29127 reply_id: 117320[/import]

The strange thing is that the game is in idle mode, and nothing happens. It took an hour before the error occurred and it is just the background music thats playing. I am using audio.loadSound - is it better to use loadStream instead?

Joakim [import]uid: 81188 topic_id: 29127 reply_id: 117322[/import]

What OS and version number is that? That particular message should really never be hit. Typically, the only time we hit that is when there is a bug in the underlying OpenAL implementation (like the horrible iOS 5.0 OpenAL regression bug). If it is iOS 5.0, then you probably should ignore it and upgrade to 5.1.

Generally loadStream is much, much more complicated than loadSound. loadSound should generally hit fewer bugs than loadStream because of that. In addition to any internal bugs remaining within ALmixer’s loadStream, ALmixer’s loadStream has exposed many bugs in the many different OpenAL implementations over the past 10 years.
[import]uid: 7563 topic_id: 29127 reply_id: 118067[/import]

Hi, I am developing on a mac and Xcode is running 5.1. All my devices are also in 5.1.

I will stick to loadSound then. I haven’t seen the error again but I will start a new long idle test today.

Joakim [import]uid: 81188 topic_id: 29127 reply_id: 118075[/import]

Hi,

same error here, on a Mac 10.7.4 and using Corona code 842.

Setting:

I’m playing a loadStream() background music track and then some loadSound() loaded sounds on top of it.

The main character is a Polar Bear walking over snow, so I attached the sounds for the steps (crushing snow sfx) to the frames - doing this I can syncronise the steps to the sound fx very accurate.

The sound channels for the snow steps are fixed and nothing is disposed while playing, I always double-check:

-- play sound  
Globals.stopPlayAudio = function( soundHandle, sndChannel, doesLoop )  
 if sndChannel then  
 if audio.isChannelPlaying( sndChannel ) then  
 audio.stop( sndChannel )  
 end  
 end  
  
 if doesLoop then  
 audio.play ( soundHandle, { channel = sndChannel, loops = -1, fadein = 300 } )  
 else  
 audio.play ( soundHandle, { channel = sndChannel } )  
 end  
end  
  
local function onFrame( event )  
 local frameNo  
  
 frameNo = myMainSprite.frame  
  
 if frameNo == 2 then  
 Globals.stopPlayAudio( sndSnowStep01, sndSnowStep01Channel, false )  
 elseif frameNo == 6 then  
 Globals.stopPlayAudio( sndSnowStep02, sndSnowStep02Channel, false )  
 end  
end  

In this case the sounds in the enterFrame-Listener are played very often.
Maybe therein lies the problem?

Best,
Andreas

[import]uid: 107675 topic_id: 29127 reply_id: 118187[/import]

I am on Corona 860 :slight_smile:

Joakim [import]uid: 81188 topic_id: 29127 reply_id: 118196[/import]