BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Mixing Wave buffers in a voice chat

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia
View previous topic :: View next topic  
Author Message
Ivan Babikov
Guest





PostPosted: Thu Jun 10, 2004 4:48 pm    Post subject: Mixing Wave buffers in a voice chat Reply with quote



Hello all,

I'm developing voice chat, so I need a way to mix several PCM buffers into
one (for the case if the speakers are speaking vying with each other). As I
understand to mix sounds in Windows I need to use Windows mixers but I
cannot see any stream functions like MixerLineInWrite etc, as for WaveIn/Out
or for ACM.

So, where should I put the wave streams and how can I get the resulting
stream?


Thanks, Ivan.


Back to top
George Kashperko
Guest





PostPosted: Thu Jun 10, 2004 6:34 pm    Post subject: Re: Mixing Wave buffers in a voice chat Reply with quote



Hi, Ivan.

I sugges u can either do mixing with own code (calculate average value for
each sample) or try to use DirectSound (build filter graph and mix your
sources with MS PCM Audio Mixer and ten connect it to audio renderer device
or whatever else to get media file instead).

Good luck.


Back to top
Alex Lee
Guest





PostPosted: Thu Jun 24, 2004 11:56 pm    Post subject: Re: Mixing Wave buffers in a voice chat Reply with quote



add the buf , e.g.
AudioBuf1[]
AudioBuf2[]

for i := 0 to []
AudioBuf2[i] := AudioBuf2[i] + AudioBuf1[i]





"Ivan Babikov" <babikov-nospam (AT) mail (DOT) ru> дÈëÓʼþ
news:40c8913e (AT) newsgroups (DOT) borland.com...
Quote:
Hello all,

I'm developing voice chat, so I need a way to mix several PCM buffers into
one (for the case if the speakers are speaking vying with each other). As
I
understand to mix sounds in Windows I need to use Windows mixers but I
cannot see any stream functions like MixerLineInWrite etc, as for
WaveIn/Out
or for ACM.

So, where should I put the wave streams and how can I get the resulting
stream?


Thanks, Ivan.





Back to top
Ivan Babikov
Guest





PostPosted: Fri Jun 25, 2004 5:32 pm    Post subject: Re: Mixing Wave buffers in a voice chat Reply with quote


Quote:
for i := 0 to []
AudioBuf2[i] := AudioBuf2[i] + AudioBuf1[i]

People say, that is's better to divide the data to avoid overloading and that sqrt(N) is better than N here (N- is the number of voices).

for i := 0 to []
AudioBuf2[i] := (AudioBuf2[i] div sqrt(2) + AudioBuf1[i] div sqrt(2))



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.