Re: Anyone had this kind of Audio Echo problem???
Re: Anyone had this kind of Audio Echo problem???
- Subject: Re: Anyone had this kind of Audio Echo problem???
- From: Marc Van Olmen <email@hidden>
- Date: Mon, 31 Jan 2005 08:54:08 -0500
Hi,
I finally found proof that the problem I'm experiencing is related to
the video/driver of the DeckLink card.
I used an application called "Audio Hijack Pro", this application can
record any Audio Unit's output. So I recorded the audio that is being
sent by my application to the video card. At the same time I recored
the audio that is being send out from the DeckLink Extreme card and...
The Echo is coming out of the video card but is NOT in the Audio Unit
Output from my Application.
This time the echo appeared after 7 hours and 30 minutes playback. The
audio first start cracking a little bit. And then suddenly the audio
starts echoing:
http://www.sky4studios.com/echo_longrecording.mov
This is a 14 minute extract of the recorded audio output from the
Decklink card... it starts Ok and then suddenly the echo.
Possible explanation why in the beginning I heard in the beginning an
"1 second" delay and now i hear an echo could be that I switched from
coreAudio API v1 to coreAudio API v2. Since I use the latest I only
hear the echo effect. This could be because of the fact that the audio
channels are being passed in 2 different memory buffers (coreAudio API
v2) and before they were passed in one interleaved memory buffer
(coreAudio API v1).
Also looking at the coreAudio mailing list from Apple. I noticed
another driver problem speaking about an echo problem. Maybe this can
help you finding the bug:
Date: Tue, 21 Sep 2004 23:30:31 -0500
From: Ben Ralston <email@hidden>
Subject: Echo on front & end of audio clip
To: <email@hidden>
I'm resurrecting an old OS 9 audio driver and basing the engine on the
Apple02DBDMAAudioDMA engine. This actually turned out to be quite
easy to
use the source and quickly get my driver spitting out (mostly) clean
audio.
However, at the beginning of each sample played, I get an echo of the
last
second or so of the last sample played. Ie., if I play the system
beep, and
then start a song in iTunes, the first second of the song gets mixed
with
the beep. Then the last second of a clip sometimes gets echoed just
as the
audio engine is stopping.
Its like my DMA buffer is overflowing into the next cycle. From the
'WritingAudioDrivers.pdf' document, it sounds like the problem could
be with
the 'erase head' that is spoken of. Like it is not keeping up with the
playhead, or not erasing far enough. How do I make adjustments to
something
like this?
Any thoughts from the experts would be appreciated...
-Ben
cheers,
mvo
On Jan 28, 2005, at 9:46 PM, Marc Van Olmen wrote:
Hi,
I have a problem with my application, and I'm not sure it is my fault,
the driver, coreAudio or the hardware.
My software plays back audio/video I'm doing all these things by my
self, coreAudio and video I use QuickTime vOut and I send the frames
by myself one by one to the video card.
I'm using DeckLink Extreme card and 2.5 Ghz G5 latest MacOSX.
I'm playing 3 clips: one clip is about 30 seconds, 2nd clip is 1.5
second other one is .5 second. I'm looping these 3 clips endlessly.
On certain configurations (1.8 ghz G5) there is no problem but on my I
have the following problem:
The problem manifest themselves in 2 ways:
1. The Audio suddenly jumps (I haven't heard/seen the jump) but after
looking at the clips being played the audio has jumped for 1 second
(backwards) (almost it is a little bit less). The gap doesn't increase
it stays the same.
I have discussed this issue before this week. But now I noticed a
second kind of error.
2. The audio is being echoed. I hear the audio twice with second one
in one second delay.
So i recorded some audio of the result that comes out the Decklink
Video Card:
So I uploaded a good sound which is about 58 seconds that I recorded:
http://www.sky4studios.com/goodaudio.mov
and I uploaded one with the Echo.
http://www.sky4studios.com/badaudio.mov
Question 1:
===========
Is it possible that coreAudio causes this kind of problem or would
this be more a driver/hardware issue?
I currently tried this with the "Built In Audio" output but never had
this issue,... but that's not really a proof the problem can take some
hours before it happens...
Question 2:
===========
Has any one suggestions on how I can trace this issue to figure out
what's going on. Currently the only idea I have is to copy the samples
that I'm sending to the coreAudio "AudioBufferList" and store them to
disk. But anyone else suggestions.
Regards and thanks for any feedback,
Marc Van Olmen
ps:
More Technical details about coreAudio:
I upgraded my coreAudio calls to V2 API after Williams Stewart
suggestions of last week.
desc.componentType = kAudioUnitType_Output;
desc.componentSubType = kAudioUnitSubType_HALOutput;//
kAudioUnitSubType_DefaultOutput; kAudioUnitSubType_HALOutput
desc.componentManufacturer = kAudioUnitManufacturer_Apple;
desc.componentFlags = 0;
desc.componentFlagsMask = 0;
comp = FindNextComponent(NULL, &desc);
BAIL_NULL(comp);
BAIL_OSERROR(OpenAComponent(comp, &fOutputAudioUnit));
if (aDeviceID != kAudioDeviceUnknown) {
//Set the Current Device to the Default Output Unit.
BAIL_OSERROR(AudioUnitSetProperty(fOutputAudioUnit,
kAudioOutputUnitProperty_CurrentDevice,
kAudioUnitScope_Global,
0,
&aDeviceID,
sizeof(aDeviceID)));
}
BAIL_OSERROR(AudioUnitInitialize(fOutputAudioUnit));
// Get the format that the AudioUnit expects us to give it
input.inputProc = cNode_AudioOutput::DoAudioOutputCallback;
input.inputProcRefCon = this;
BAIL_OSERROR(AudioUnitSetProperty( fOutputAudioUnit,
kAudioUnitProperty_SetRenderCallback,
kAudioUnitScope_Global,
0,
&input,
sizeof(input)));
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden