#PB_Sound_MultiChannel|#PB_Sound_Loop

Just starting out? Need help? Post your questions and find answers here.
DoMi
User
User
Posts: 67
Joined: Sat Jan 10, 2004 5:41 pm
Location: France

#PB_Sound_MultiChannel|#PB_Sound_Loop

Post by DoMi »

in PlaySound() parameters
#PB_Sound_MultiChannel|#PB_Sound_Loop or %11 doesn't work!
while each constant works separately

Code: Select all

InitSound()
LoadSound(0,"La.wav") ;sample rate= 44100Hz, mono. A 10 seconds A 440Hz
Global Dim canal.i(2)
For i = 0 To 2
  ;#PB_Sound_MultiChannel = %10 (OK)
  ;#PB_Sound_Loop = %01 (OK)
  ;#PB_Sound_MultiChannel|#PB_Sound_Loop = %11
  canal(i) = PlaySound(0,#PB_Sound_MultiChannel|#PB_Sound_Loop) ; seul #PB_Sound_Loop est effectif dans cette combinaison!?
  SoundVolume(0,50,canal(i))
  SoundFrequency(0,44100*Pow(2,i*4/12),canal(i)) ; accord de A5+
  Debug canal(i)
Next
MessageRequester("Hello!", "Click to stop")
Did anybody notice this problem?
Thanks in advance for your replies.

Link to the wave file :
http://domi.data.free.fr/La.wav
DoMi
User avatar
Fluid Byte
Addict
Addict
Posts: 2336
Joined: Fri Jul 21, 2006 4:41 am
Location: Berlin, Germany

Post by Fluid Byte »

What exactly "does not work"? The example works like a charm for me.
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
DoMi
User
User
Posts: 67
Joined: Sat Jan 10, 2004 5:41 pm
Location: France

Post by DoMi »

Code: Select all

PlaySound(0,#PB_Sound_MultiChannel|#PB_Sound_Loop)
give only the same result as :

Code: Select all

PlaySound(0,#PB_Sound_Loop)
To get MultiChannel functionnality (a polyphonic A5+ chord), I must write:

Code: Select all

PlaySound(0,#PB_Sound_MultiChannel)
but, of course, no more looping feature!

XP, SP3, Fujitsu Siemens Amilo M3438G
PB 4.30
DoMi
User avatar
luis
Addict
Addict
Posts: 3893
Joined: Wed Aug 31, 2005 11:09 pm
Location: Italy

Post by luis »

Yep, you are right, it seem a bug to me.

I must add that using #PB_Sound_MultiChannel|#PB_Sound_Loop I don't get the looping either. Maybe you didn't notice because your la.wav is very long ? I shortened to test more easily. On my PC #PB_Sound_MultiChannel and #PB_Sound_Loop works when used separately but when ORred it seem to defaults to the "no flag specified" situation.
DoMi
User
User
Posts: 67
Joined: Sat Jan 10, 2004 5:41 pm
Location: France

Post by DoMi »

thanks for your testing

I notify this as a probable bug there:
http://www.purebasic.fr/english/viewtopic.php?t=36656
DoMi
Post Reply