Re: Failing to set kAudioOutputUnitProperty_CurrentDevice to HAL
Re: Failing to set kAudioOutputUnitProperty_CurrentDevice to HAL
- Subject: Re: Failing to set kAudioOutputUnitProperty_CurrentDevice to HAL
- From: Jean-Yves Avenard <email@hidden>
- Date: Fri, 17 Jun 2011 01:13:01 +1000
Hi
On 15 June 2011 09:51, Jean-Yves Avenard <email@hidden> wrote:
>
> I thought that the audio device not having IO, could be a timing issue
> after releasing hog mode as usually, if I stop the playback
> completely, I can restart it and stereo PCM will play again. I tried
> putting various wait time: but it never seems to make a difference.
>
> Thanks in advance for any help
No one to help ? :(
I guess I should simplify my question with: is there anything special
to do after configuring an audio device for digital bitstream (on top
of disabling hog and re-enabling mixer)
This is the current cleanup code after setting up audio device for bitstreaming:
void CoreAudioData::CloseSPDIF()
{
OSStatus err;
Debug(QString("CloseSPDIF: Entering [%1]").arg(mDigitalInUse));;
if (!mDigitalInUse)
return;
// Stop device
if (mStarted)
{
err = AudioDeviceStop(mDeviceID,
(AudioDeviceIOProc)RenderCallbackSPDIF);
if (err != noErr)
Error(QString("CloseSPDIF: AudioDeviceStop failed: [%1]")
.arg(OSS_STATUS(err)));
mStarted = false;
}
// Remove IOProc callback
if (mIoProc)
{
err = AudioDeviceRemoveIOProc(mDeviceID,
(AudioDeviceIOProc)RenderCallbackSPDIF);
if (err != noErr)
Error(QString("CloseSPDIF: AudioDeviceRemoveIOProc failed: [%1]")
.arg(OSS_STATUS(err)));
mIoProc = false;
}
if (mRevertFormat)
{
AudioStreamChangeFormat(mStreamID, mFormatOrig);
mRevertFormat = false;
}
SetHogStatus(false);
if (mMixerRestore > -1) // We changed the mixer status
SetMixingSupport((mMixerRestore ? true : false));
Note , that I've tried with and without AudioHardwareUnload() (just in
case), but it makes no difference whatsoever...
_______________________________________________
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