Below code gives me error sometime
myChannel = bubbleHitSound:play()
myChannel:setVolume(0.5) |
where bubbleHitSound is less then 1 second sound
here is the error which i am getting in desktop player
ocenaTrainingFinal5.lua:391: attempt to index global 'myChannel' (a nil value)
stack traceback:
ocenaTrainingFinal5.lua:847: in function
also i am playing this in onBeginContact if that is important and at line 847 i have this code self.world:step(1/30, 8, 3)
Thanks
Comments
Return value:
SoundChannel: A `SoundChannel` object, which you use to control the sound. This function returns `nil` if you run out of available sound channels.
This is very device depending, and how often you play sounds etc, so you should always check if it is not nil
Regarding Sound. There seems to be a bug on
Sound:getLength() and SoundChannel:getPosition() on Android.
hmmm may be i am running out of soundchannel let me try to put if myChannel then
Thanks