guys, i 'm doing the artoolkit marker detection. i try to play the sound using openAL when the marker is detected. But i have a prob, the sound i put in the loop, it keep repeating the sound in very high speed. It means it have't finnish to play it , then it replay again. Did the openAL has the function to play the sound until it finish? and it won't restart even the play function is called.
Play Sound in Loop
Started by iceboylsg, Nov 14 2009 07:15 AM
5 replies to this topic
#1
Posted 14 November 2009 - 07:15 AM
#2
Posted 14 November 2009 - 07:27 AM
Like I explained in your last thread, you have to play the sound once then wait until it's finished. Don't try to play the sound multiple times or it will repeat as you described.
reedbeta.com - developer blog, OpenGL demos, and other projects
#3
Posted 14 November 2009 - 12:48 PM
hmm...i know there is a method using sleep9) to generate the time for the sound to to play until finish. But it is not a good method. And i can't find any function in AL related to this..Hazz...
#4
Posted 16 November 2009 - 07:49 AM
hey, if i don't want it to replay after the playsouce function,how should i write the code?..i stuck here=.=
#5
Posted 17 November 2009 - 07:02 AM
reeta, how do i change the alsourceplay function? cos i don't wan it to replay after i call the alsourceplay function again. or do u have any idea how to do it?
#6
Posted 25 August 2010 - 08:39 PM
You have to wait exactly the lenght of the sound.
Read my latest Games articles: Shawn Sharp and Guild Wars 2
New Demos: Astronauts and Funk Music - Knights and Film Music
Music Composers love blondes! Why? Find here: Marino Sounds Studio
New Demos: Astronauts and Funk Music - Knights and Film Music
Music Composers love blondes! Why? Find here: Marino Sounds Studio
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












