• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AudioUnitScheduleParameters causing complete audio cutout
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AudioUnitScheduleParameters causing complete audio cutout


  • Subject: AudioUnitScheduleParameters causing complete audio cutout
  • From: Jean-Francois Roy <email@hidden>
  • Date: Sat, 15 Mar 2008 17:08:22 -0400

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


  • Follow-Ups:
    • Re: AudioUnitScheduleParameters causing complete audio cutout
      • From: Jean-Francois Roy <email@hidden>
  • Prev by Date: AUGraph optimal configuration for offline render
  • Next by Date: ExtendedAudioFile on iPhone
  • Previous by thread: AUGraph optimal configuration for offline render
  • Next by thread: Re: AudioUnitScheduleParameters causing complete audio cutout
  • Index(es):
    • Date
    • Thread