GLBasic forum

Main forum => GLBasic - en => Topic started by: MrTAToad on 2011-Mar-15

Title: Sound problems
Post by: MrTAToad on 2011-Mar-15
I've noticed that sounds that were playing before now wont play in 9.033 and SOUNDPLAYING returns -1

I've included the sounds I'm using.

[attachment deleted by admin]
Title: Re: Sound problems
Post by: Ian Price on 2011-Mar-15
My current game has no obvious problems with sound.

FYI - .WAV 22.050 kHz 16bit mono/stereo

I notice your "sound118" is 44.100 kHz - try changing/testing it to 22.050.

Perhaps Gernot's been playing with sound again, as there was a problem with it in an earlier 9.XX update IIRC.
Title: Re: Sound problems
Post by: MrTAToad on 2011-Mar-15
Yes, its possible its been brought down to allow comparability with other platforms...
Title: Re: Sound problems
Post by: MrTAToad on 2011-Mar-15
No luck so far - still totally silent...  I wonder if they are actually loading as they work in the test program...

Ah ha - found it.  It looks like it was a bug in my playSND routine.  It appears that GENSOUND now returns a value of at least 200.  As I wasn't actually using this value, the sound wasn't playing :)
Title: Re: Sound problems
Post by: Ian Price on 2011-Mar-15
When converted to 22.050 "sound118.wav" works fine in my game.

???

BTW I like that sound - it works well in my game. Can I pinch errr... borrow it? :)
Title: Re: Sound problems
Post by: MrTAToad on 2011-Mar-15
Its sorted now :)
Title: Re: Sound problems
Post by: Ian Price on 2011-Mar-15
What was the problem?
Title: Re: Sound problems
Post by: MrTAToad on 2011-Mar-15
I was using the passed index to play the sound, which, as GENSOUND returns a decreasing value from 4095 meant nothing was being played.  I should have been using this index value to access the id number of the sound instead (which would have held the correct value)...
Title: Re: Sound problems
Post by: Ian Price on 2011-Mar-15
Glad it's sorted :)
Title: Re: Sound problems
Post by: MrTAToad on 2011-Mar-15
Same here too :)