I'm developing an open source HAL audio driver that acts as a proxy for another output audio device. It currently has an issue where, when the audio driver is loaded, it prevents the system from sleeping.
This is because it is constantly receiving output from another audio device, and whenever a process has active audio IO using CoreAudio then that will prevent the system from sleeping.
Is there a way to do this and still allow the system to sleep?
Apple's CoreAudio documentation is quite lacking and so far I haven't found an answer to this on my own. I did find something interesting on one of the CoreAudio header files, the property kAudioHardwarePropertySleepingIsAllowed of the AudioSystemObject. However setting it to a value of 1 in my app did not change things so that the system can sleep, and so it doesn't seem to solve this problem. Is there anything else I can try?