Page 1 of 1

#PB_Sound_MultiChannel|#PB_Sound_Loop

Posted: Sat Mar 07, 2009 9:18 pm
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

Posted: Sat Mar 07, 2009 9:41 pm
by Fluid Byte
What exactly "does not work"? The example works like a charm for me.

Posted: Sat Mar 07, 2009 9:53 pm
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

Posted: Sat Mar 07, 2009 10:54 pm
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.

Posted: Sat Mar 07, 2009 11:24 pm
by DoMi
thanks for your testing

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