Re: AudioUnitScheduleParameters causing complete audio cutout
Re: AudioUnitScheduleParameters causing complete audio cutout
- Subject: Re: AudioUnitScheduleParameters causing complete audio cutout
- From: Jean-Francois Roy <email@hidden>
- Date: Sun, 23 Mar 2008 10:58:51 -0400
A small update on this issue.
It appears to be a Tiger-only bug. I've tested the same program on 3
different architectures (iBook G4, PowerBook G4, iMac G5 and a Mac Pro
Quad) all running Leopard without problem. But on Tiger, on all
machines I have tried on (iBook G4 and PowerMac G4 Dual), when the
first AU parameter ramp is scheduled, all audio cuts out until the
AUGraph is tore down.
Are there known issues with AU parameter ramping or with parameter
ramping on the stereo mixer AU in Tiger? Perhaps NaN contamination? I
will file a bug report even though this appears to be a Tiger-only
bug, but if someone has more information or a workaround about this,
I'd appreciate it.
Thank you,
Jean-Francois Roy
On Mar 15, 2008, at 17:08, Jean-Francois Roy wrote:
Greetings,
I have written a simple audio engine based on an AUGraph and the 2D
mixer AU for a simple game engine I am working on. One particular
feature of that audio engine is being amble to ramp an audio
source's gain and pan, all based on Core Audio's AU parameter
scheduling functionality. An audio source corresponds to a specific
mixer input bus and contains a subgraph, the head node of which is
connected to the mixer AU.
The source code can be read at https://home.devklog.net/projects/rivenx/browser/Rendering/Audio/RXAudioRenderer.mm
. The relevant function is OSStatus
AudioRenderer::MixerPreRenderNotify. That function is, as the name
suggests, a pre-render callback installed using CAAudioUnit's
AddRenderNotify method. Finally, https://home.devklog.net/projects/rivenx/browser/Rendering/Audio/RXAudioRenderer.h
is the corresponding header file.
The problem was reported by one of my tester and I was not able to
reproduce it on any of the Macs I own (all running Leopard, one Mac
Pro, one PowerBook G4 1 GHz and one PowerMac G4 dual 867 MHz). The
tester in question is running Tiger on a G4 iBook.
Essentially, everything (w/r to audio) works fine until the first
parameter ramp is started. At that point, all audio cuts out (with
some "noise, pops and clicks") until the process terminates. I have
reviewed by code and cannot find an obvious answer that would
explain this problem.
Ramps are scheduled in the mixer pre-render callback using the
AudioUnitScheduleParameters function. The last time I searched,
documentation and sample code for parameter ramping was rather
sparse, but the fact it works on all of my machines suggests I am
doing something right, to some extent in any case.
https://home.devklog.net/projects/rivenx/attachment/ticket/35/rxaudio_test.zip
is a simple program that tests the ramp functionality of my audio
engine. It takes 2 audio files as input (any file supported by
AudioFile).
Should my code prove to be correct and I'm hitting an unfortunate
bug in Mac OS X, is there another way of doing quality parameter
ramps (my interest is solely w/r to gain and pan)? Or perhaps using
AudioUnitScheduleParameters is not recommended at all?
Thanks for any pointers or help.
Jean-Francois Roy
_______________________________________________
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