Trying to play multiple wav files simultaneously

51 views
Skip to first unread message

Oliver

unread,
Mar 18, 2013, 8:22:47 AM3/18/13
to newac...@googlegroups.com
i would like to play several wav files simultanously, each of them triggered indepentently, lets say by key-press.
my program shall be able to play several alarm/warning-sounds and maybe voice-recordings at the same time, if necessary.
 
after playing around with newac for some hours, i have noch idea how to do that:
 
i tried to use several WaveIn, with RealTimerMixers followed by one DSAudioOut. It plays all WAV-Files simultaneously, but i'm not able to trigger one of them again.
 
Because DSAudioOut seems to handle stuff like timebase/play-locator for all connected WaveIns in its chain, i tried to use more than one DSAudioOut, but that seemed to be a bad idea -> EAuException 'Failed to create DirectSound buffer 80070057'.
 
so, does anybody have an idea how to do that?
 
 

Ross Levis

unread,
Mar 18, 2013, 8:48:15 AM3/18/13
to newac...@googlegroups.com

I do something similar but I wrote my own multi-mixer component connected to DSAudioOut.  It is based on TRealTimeMixer but supports 8 inputs.  I isolated the Init function for each Input so Input.Init is not called when RealTimeMixer is initialized.

 

I basically call Init for each input directly from my code so I can control when each player starts.

 

I can’t send you the code as it’s heavily modified for my specific use.

 

Ross.

--
--
You are recieving this message because you are subscribed to "NewAC users" Google group.
To post message to this group send it to
newac...@googlegroups.com
To unsubscribe from the group send a mail to: newac-users...@googlegroups.com
Additional variants are available at the groups page http://groups.google.com/group/newac-users?hl=en
---
You received this message because you are subscribed to the Google Groups "NewAC users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to newac-users...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Oliver

unread,
Mar 19, 2013, 6:52:38 AM3/19/13
to newac...@googlegroups.com
Thanks for your hint. I already found my mistake: i used multiple TDSAudioOut connected with the outputs of multiple TRealTimerMixers. For some reason i thought i could left the second input of each TRealTimeMixer unconnected while i was testing. That was the problem: an open input of a TRealTimeMixer leads to an access violation as described in my first post.
 
So, using multiple TDSAudioOut solved my problem: Playing multiple wave files simultaneously with even different volume settings.
Reply all
Reply to author
Forward
0 new messages