GLBasic forum

Main forum => Bug Reports => Topic started by: Wampus on 2013-Jan-31

Title: SOUNDPLAYING() always returns 0
Post by: Wampus on 2013-Jan-31
Just found that SOUNDPLAYING() is always returning 0 on Windows. Haven't checked other platforms.

IDE version 11.261
Title: Re: SOUNDPLAYING() always returns 0
Post by: Wampus on 2013-Jan-31
In addition, STOPSOUND doesn't seem to work. Probably related.
Title: Re: SOUNDPLAYING() always returns 0
Post by: MrTAToad on 2013-Jan-31
Both work fine here - have you tried the PlaySound demo program in the Samples directory ?
Title: Re: SOUNDPLAYING() always returns 0
Post by: Wampus on 2013-Feb-01
Yes, its fine when running the example. It doesn't register for the two projects I'm working on right now though.  O_O

This is odd. I wonder what I'm doing in my projects which is different. Again, sounds play correctly but can't be prematurely stopped or detected as playing. I'm not using any external sound libraries or doing anything obviously different to the sample code. Maybe the sample rate or type is somehow different? Will have to investigate later.
Title: SOUNDPLAYING() always returns 0
Post by: Kitty Hello on 2013-Feb-01
See the input of issoundplaying. It must be the return of playsound. Also, be sure its an integer.
Title: Re: SOUNDPLAYING() always returns 0
Post by: Wampus on 2013-Feb-06
Doh! I was going by buffer rather than channel. All this time and I still don't know how to use this GLBasic command properly. Thanks for your help Kitty and TAToad. Mystery solved.