RE: Multiple Sound Events

new topic     » topic index » view thread      » older message » newer message

Hi Chris,

As far as I know the standard playSound Windows API function can only
play one sound at a time.

I "think" the easiest way to do what you want is look at the Direct 
Sound API's in DirectX. 

This means users of your program will need directX loaded!

As an alternative you "might" be able to play a midi file and a wav
at the same time using the standard API calls.  Obviously you'll need
to replace your background looping wav file with a midi file.

Ray Smith.


president at insight-concepts.com wrote:
> Hi All,
> 
> I have a minor problem I need help with. I have a wav file that loops in 
> 
> the background of a program. But when I trigger another wav 
> simultaneously, the looped wav cancels out. How can I make both wavs 
> play without interrupting each other? I have some sample code below.
> 
> 
> procedure onLoad_TestWin()
>     atom  cstring 
>      if length("test.wav") != 0 then
>        cstring = acquire_mem(0, "test.wav" )
>      soundresult = w32Func( xPlaySound, {cstring, 0, #20009})
>      release_mem(cstring)
> 
> end procedure
> 
> procedure onClick_SecondSound()
>     integer sounds
> 
>      sounds = playSound("test2.wav")
>   end procedure
> 
> 
> Thank,
> Chris
> Long Live Euphoria
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu