I have a game that has a constant background music and different audio clips for different actions. Right now I have "play (specialfolderpath("engine") & "/sounds/buzz1.mp3")" on openCard and "play (specialfolderpath("engine") & "/sounds/buzz2.mp3") assigned to an intersect. When the intersect happens it plays the correct audio file, but stops the background music. So my questions are:
1) how do i get the background music to loop until the card is closed?
2) how do i get the intersect audio to play with out stopping the background audio?
3) Is it possible to make the iphone vibrate on the intersect?
I am almost doen with this project and any help on these last little steps would be awesome!
Audio Issues
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Audio Issues
Hi Wayne,
please check the "iOS Release Notes" for "Multi-channel sound support"!
This has been added some time ago and does what it says
I did not work with this feature yet, but the syntax looks pretty straightforward!
There is an example stack in LiveCode: select menu: Help > Example Stacks and Resources
The stack can be found at: Mobile Examples/Sound Example.livecode
Best
Klaus
please check the "iOS Release Notes" for "Multi-channel sound support"!
This has been added some time ago and does what it says

I did not work with this feature yet, but the syntax looks pretty straightforward!
There is an example stack in LiveCode: select menu: Help > Example Stacks and Resources
The stack can be found at: Mobile Examples/Sound Example.livecode
Best
Klaus
-
- Posts: 37
- Joined: Tue Apr 05, 2011 9:58 pm
Re: Audio Issues
Klaus,
I tried that and i am still having a tough time getting it to work. This is what i added to the card script:
on setBackgroundSound pSound
iphonePlaySoundOnChannel (specialfolderpath("engine") & "/sounds/buzz1.mp3"), "Background", "looping"
end setBackgroundSound.
What am i doing wrong?
Also any info on the vibrate?
Thanks.
I tried that and i am still having a tough time getting it to work. This is what i added to the card script:
on setBackgroundSound pSound
iphonePlaySoundOnChannel (specialfolderpath("engine") & "/sounds/buzz1.mp3"), "Background", "looping"
end setBackgroundSound.
What am i doing wrong?
Also any info on the vibrate?
Thanks.
Re: Audio Issues
Hi Wayne,
syntax looks OK!?
Try to create the path to the sound first and use that as a param and maybe try to use a number for the sound channel,
although it should work the way you scripted it.
Are you using the latest release of LiveCode?
Best
Klaus
syntax looks OK!?
Try to create the path to the sound first and use that as a param and maybe try to use a number for the sound channel,
although it should work the way you scripted it.
Code: Select all
on setBackgroundSound pSound
put (specialfolderpath("engine") & "/sounds/buzz1.mp3") into tSoundFile
iphonePlaySoundOnChannel tSoundFile,1,"looping"
end setBackgroundSound
Best
Klaus
Re: Audio Issues
P.S. Vibrating not (yet?) supported!