SoundKit icon indicating copy to clipboard operation
SoundKit copied to clipboard

recycleSound - ArgumentOutOfRangeException

Open grng opened this issue 10 years ago • 1 comments

Hi! I'm getting this exception when SK tries to recycle a fading out background music track. _playingSounds.Count is 0 for some reason

(19:01:53.4061)
Exception:
ArgumentOutOfRangeException: Argument is out of range.
Parameter name: index

StackTrace:
SoundKit.recycleSound()
    Assets/_scripts/Utils/audio/SoundKit.cs: line 226
SoundKit+SKSound.stop()
    Assets/_scripts/Utils/audio/SoundKit.cs: line 322
SoundKit+SKSound+<fadeOut>c__Iterator1E.MoveNext()
    Assets/_scripts/Utils/audio/SoundKit.cs: line 274

grng avatar Apr 27 '15 22:04 grng

Fetch the push that just went out. It contains a fix. The backgroundMusic SKSound wasnt expected to ever have stop called so it didnt properly know what to do when recycled.

Mike

On Mon, Apr 27, 2015 at 3:05 PM, grng [email protected] wrote:

Hi! I'm getting this exception when SK tries to recycle a background music track. _playingSounds.Count is 0 for some reason

(19:01:53.4061) Exception: ArgumentOutOfRangeException: Argument is out of range. Parameter name: index

StackTrace: SoundKit.recycleSound() Assets/_scripts/Utils/audio/SoundKit.cs: line 227 SoundKit+SKSound.stop() Assets/_scripts/Utils/audio/SoundKit.cs: line 323 SoundKit+SKSound+<fadeOut>c__Iterator1E.MoveNext() Assets/_scripts/Utils/audio/SoundKit.cs: line 275

— Reply to this email directly or view it on GitHub https://github.com/prime31/SoundKit/issues/2.

prime31 avatar Apr 27 '15 23:04 prime31