Re: How to copy source/data of LDIRECTSOUNDBUFFER to LDIRECTSOUNDBUFFER8 variable.
- From: "Paul" <quoctoanpham1982@xxxxxxxxx>
- Date: Wed, 13 Sep 2006 14:09:02 +0700
Thanks , i can capture and add effect then playback at the same time. I use
LDIRECTSOUNDBUFFER8 instead of LDIRECTSOUNDBUFFER. The app run well.
But i have other question: i see that the demo have a delay time between i
say into microphone and playback to device. delay time about 120 - 140
miliseconds. Can you show me the reason?
And can you help me fix this, i would like to "say and hear" are realtime
or decrease time delay?
Thanks for your help.
"Chris P. [MVP]" <msdn@xxxxxxxxxxxx> wrote in message
news:1edy5m56pptxe$.1q8b49i8sluhq$.dlg@xxxxxxxxxxxxx
On Sat, 9 Sep 2006 16:23:58 +0700, Paul wrote:setFX
Directsound have two samples: One is soundFX and other is DuplexFilter
sample
In soundFX, the app used LDIRECTSOUNDBUFFER8 with purpose are using
playbackfunction.
But in DuplexFilter, app used LDIRECTSOUNDBUFFER for capture and
addat the same time.
Now , I would like to combine two sample. I would like to capture and
time?effect and playback sound ( my voice through microphone) at the same
isCan i do this?
I have tried to do as follow:
first i will have m_pDSBCapture, a capture sound buffer, (from my voice)
with type is LDIRECTSOUNDBUFFER and m_pDSBOutput, a output sound buffer,
sosame type. I also have a m_pDSB8 with type is LDIRECTSOUNDBUFFER8 .
Now, i want to copy data from m_pDSBCapture or m_pDSBOutput to m_pDSB8
this???that i can call setFX and Play function for m_pDSB8 . How can i do
use,I call m_pDSBOutput->QueryInterface( IID_IDirectSoundBuffer8, (LPVOID*)
&m_pDSB8 ) ) ) then is failed.
Can anyone show me solution? Do you have sample source do this?
Well error codes returned are always useful. What error does it give you?
IDirectSoundBuffer8 replaces IDirectSoundBuffer and is all you need to
but you do have to query interface on the IDirectSoundBuffer returned from
CreateBuffer() to get it.
if( FAILED( hr = m_pDS->CreateSoundBuffer( &dsbd, &pDSBuffer, NULL ) ) )
return DXTRACE_ERR_MSGBOX( TEXT("CreateSoundBuffer"), hr );
if( FAILED( hr = pDSBuffer->QueryInterface( IID_IDirectSoundBuffer8,
(VOID**)&m_pDSBOutput ) ) )
return DXTRACE_ERR_MSGBOX( TEXT("QueryInterface"), hr );
--
http://www.chrisnet.net/code.htm
http://www.avdevforum.com/AV
.
- Follow-Ups:
- Re: How to copy source/data of LDIRECTSOUNDBUFFER to LDIRECTSOUNDBUFFER8 variable.
- From: Chris P. [MVP]
- Re: How to copy source/data of LDIRECTSOUNDBUFFER to LDIRECTSOUNDBUFFER8 variable.
- References:
- Prev by Date: find time difference between audio renderer clock & system clock
- Next by Date: Re: find time difference between audio renderer clock & system clock
- Previous by thread: Re: How to copy source/data of LDIRECTSOUNDBUFFER to LDIRECTSOUNDBUFFER8 variable.
- Next by thread: Re: How to copy source/data of LDIRECTSOUNDBUFFER to LDIRECTSOUNDBUFFER8 variable.
- Index(es):
Relevant Pages
|