Audio device does not performing IO

I'm developing mac application with reference to the CAPlayThrough apple example project.


My application has features that playing audiofile to the output audio device and recording audio from the input audio device. The playing and recording operation is a periodic task about every 10 minutes.


Play operation

create AUHAL resource and start , play 15s , stop and release resource


Record operation

create AUHAL resource and start , record 15s , stop and release resource


play and record are an independent operation and will not affect each other.


After my application has been running for a while about one day,I will get kAudioDevicePropertyDeviceIsRunning property with NO,

that means device does not performing IO,I can not play audio data to output device,also can not record audio data from input device.


My question is why does the device not performing IO.


Periodically create AUHAL resources and release of resources,

Is there anything I need to pay special attention to.