Author Topic: SOUNDPLAYING() always returns 0  (Read 2790 times)

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
SOUNDPLAYING() always returns 0
« on: 2013-Jan-31 »
Just found that SOUNDPLAYING() is always returning 0 on Windows. Haven't checked other platforms.

IDE version 11.261

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: SOUNDPLAYING() always returns 0
« Reply #1 on: 2013-Jan-31 »
In addition, STOPSOUND doesn't seem to work. Probably related.

MrTAToad

  • Guest
Re: SOUNDPLAYING() always returns 0
« Reply #2 on: 2013-Jan-31 »
Both work fine here - have you tried the PlaySound demo program in the Samples directory ?

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: SOUNDPLAYING() always returns 0
« Reply #3 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.

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10851
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
SOUNDPLAYING() always returns 0
« Reply #4 on: 2013-Feb-01 »
See the input of issoundplaying. It must be the return of playsound. Also, be sure its an integer.

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: SOUNDPLAYING() always returns 0
« Reply #5 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.