Re: application crash in AudioHardwareGetPropertyInfo
Re: application crash in AudioHardwareGetPropertyInfo
- Subject: Re: application crash in AudioHardwareGetPropertyInfo
- From: Doug Wyatt <email@hidden>
- Date: Fri, 27 May 2005 12:47:16 -0700
Hi,
Would you please send a full backtrace? I'm investigating something
that might be the same problem.
Doug
On May 27, 2005, at 7:29, Chris Saldanha wrote:
Hi,
I have a background service program (running from boot as 'root')
which plays audio sometimes.
In a couple of cases, where customers have special audio gear (MIDI
cards or audio break-out boxes), our application crashes in the
AudioHardwareGetPropertyInfo function with a signal 6 (SIGABRT)
when first trying to get the list of audio devices.
The same code works fine on the machine when called from a Cocoa
application (not running as root) instead of the background server
program. If the customer removes the special audio device, this
crash stops and all works fine.
The code for this is below. We're using the PortAudio framework,
but the call that's crashing is definitely the
AudioHardwareGetPropertyInfo() function.
Anyone have any ideas on this? Could this be a bug in the audio
drivers that the card supplies? Is there a problem call audio
functions as root or from a non-graphical process?
Thanks,
Chris
Here's the code that crashes - it always crashed on the line with
AudioHardwareGetPropertyInfo().
static PaError PaOSX_QueryDevices( void )
{
OSStatus err = noErr;
UInt32 outSize;
outSize = 0;
prllog(LOG_DEVEL,"AudioHardwareGetPropertyInfo, in
PaOSX_QueryDevices");
err = AudioHardwareGetPropertyInfo
(kAudioHardwarePropertyDevices, &outSize, NULL);
if (err != noErr) {
PRINT_ERR("Couldn't get info about list of audio devices",
err);
sSavedHostError = err;
return paHostError;
} else{
printf("Successfully retrieved
AudioHardwareGetPropertyInfo, in PaOSX_QueryDevices");
}
/* NEVER GETS HERE ... */
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40apple.com
This email sent to email@hidden
_______________________________________________
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