1. RE: Looping A Wav
		
		
Hi,
try these options...
--------------------
procedure PlayWAV(sequence nameofWAVfile)
   atom result, cstring
   
   if length(nameofWAVfile) != 0 then
     -- Start playing a WAV file continuously ---
     cstring = acquire_mem(0, nameofWAVfile )
     result = w32Func( xPlaySound, {cstring, 0, #20009})
     release_mem(cstring)
   else
     -- To stop a sound that is playing.
     result = w32Func( xPlaySound, {0, 0, 0} )
   end if
end procedure
-----------
cheers,
Derek Parnell
Senior Design Engineer
Global Technology Australasia Ltd
dparnell at glotec.com.au
---------------------
> -----Original Message-----
> From: president at insight-concepts.com
> [mailto:president at insight-concepts.com]
> Sent: Wednesday, 23 May 2001 1:28 PM
> To: EUforum
> Subject: Looping A Wav
> 
> 
> 
> 
> Hi all,
> 
> Is there an easy solution to looping a wav file using the playSound 
> function in win32lib?
> 
> Long Live Euphoria,
> Chris
> 
> 
> 
>
		
	 
	
		
		2. RE: Looping A Wav
		
		
Thanks again Derek your solution helped.
By the way, do you ever sleep? :)
Chris
Long Live Euphoria.......
---------------------------------------------------------------------
Derek Parnell wrote:
> Hi,
> try these options...
> --------------------
> procedure PlayWAV(sequence nameofWAVfile)
> 
>    atom result, cstring
>    
>    if length(nameofWAVfile) != 0 then
>      -- Start playing a WAV file continuously ---
>      cstring = acquire_mem(0, nameofWAVfile )
>      result = w32Func( xPlaySound, {cstring, 0, #20009})
>      release_mem(cstring)
>    else
>      -- To stop a sound that is playing.
>      result = w32Func( xPlaySound, {0, 0, 0} )
>    end if
> end procedure
> -----------
> 
> cheers,
> Derek Parnell
> Senior Design Engineer
> Global Technology Australasia Ltd
> dparnell at glotec.com.au
> 
> ---------------------
> 
> 
> 
> > -----Original Message-----
> > From: president at insight-concepts.com
> > [mailto:president at insight-concepts.com]
> > Sent: Wednesday, 23 May 2001 1:28 PM
> > To: EUforum
> > Subject: Looping A Wav
> > 
> > 
> > 
> > 
> > Hi all,
> > 
> > Is there an easy solution to looping a wav file using the playSound 
> > function in win32lib?
> > 
> > Long Live Euphoria,
> > Chris
> > 
> > 
> > 
> > 
<snip>
		
	 
	
		
		3. RE: Looping A Wav
		
		
Is it possible to do this?
playsounds({"1","four","ninetyseven","pause","2"})
procedure playsounds( sequence sounds )
 for loop = 1 to length(sounds) do
   play(loop)
   when (almost done) or (done) then
     start play(loop+1)
  end when
 end for
end procedure
This could be done two ways, i suppose:
1) play the first sound on channel one of a sterio card, then alternate the 
remaining sounds, mixing the output to mono. It would be best if the playing 
sound could be reduced in volume as the new sound is increased in volume, 
rather than abrupt ON-OFF.
2) try to do 1) in software,, which will prolly drag the system to a stop and 
result in the sound being terrible. It will also prolly be tied to specific
cards.
Kat