• 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
More Glitches
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

More Glitches


  • Subject: More Glitches
  • From: Ethan Funk <email@hidden>
  • Date: Mon, 14 Feb 2005 13:58:48 -0700

In my eternal hunt for the source of audio glitching, I have added the following code to my project to I can get a message on each HAL output processor overload event. However, I'm not getting any messages, even through I hear glitches. Am I doing something wrong in setting up notification or is it possible that the glitches are due to something else?

Here is my code for the callback: msg is a Boolean I set to true for debugging

OSStatus HALOverloadListener(AudioDeviceID inDevice, UInt32 inChannel, Boolean isInput, AudioDevicePropertyID inPropertyID, void *inRefCon)
{
Distributor *output = (Distributor *)inRefCon;

if(msg){
output_map_ptr dp;
string dataStr = "unknown";
// find the output in the output distributer list
pthread_mutex_lock( &oMutex );
for (dp=outputMap.begin(); dp!=outputMap.end(); dp++){

if(&((*dp).second) == output)
dataStr = (*dp).first;
}
pthread_mutex_unlock( &oMutex );
// print message
fprintf(stdout, " MESSAGE: Processor Overload on %s output, bus #%ld.\n", dataStr.c_str(), inChannel);
fprintf(stdout, "ae>");
fflush(stdout);
}
return noErr;
}


Then I register the call back just before AU Initialization deep in my audio setup procedure:

// set up notification of processor overload
err = AudioDeviceAddPropertyListener(devID, 0, FALSE, kAudioDeviceProcessorOverload, HALOverloadListener, this);
if (err)
return false;


// initialize the HALoutput AU
err = AudioUnitInitialize(outHALUnit);
if (err)
return false;

There is NO error when I add the property listener. Any insight would be appreciated!
Ethan...
_______________________________________________
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: More Glitches
      • From: Jeff Moore <email@hidden>
  • Prev by Date: Tone Generation
  • Next by Date: Re: in & out Callbacks
  • Previous by thread: Re: Tone Generation
  • Next by thread: Re: More Glitches
  • Index(es):
    • Date
    • Thread