Commit Graph

4 Commits

Author SHA1 Message Date
Stefano Pigozzi 838fa07376 ao_coreaudio: move AudioStreamChangeFormat to common file and refactor 2013-07-22 21:53:17 +02:00
Stefano Pigozzi 40f6e2e041 ao_coreaudio: extract methods to lock/unlock device for digital output 2013-07-22 21:53:17 +02:00
Stefano Pigozzi 1640ce3262 ao_coreaudio: refactor initialization
The initialization is split more clearly between compressed and lpcm case.
For the compressed case, format selection is simplified a lot and negotiation
removed. The way it was written it just passed back to the core the original
requested format, not what was found available on hardware.

Since this is most likely useless for the compressed case, I didn't bother
with this. In the future I'd like to split this AO in two one that only uses
the AUHAL and the other with direct access to the hardware so that even
passthrough of lcpm can be possible. This would decrease the latency,
audiophiles would like that.
2013-07-22 21:53:17 +02:00
Stefano Pigozzi f35f6a34b5 ao_coreaudio: split out some utility functions and refactor them
Split out some utility functions that use the CoreAudio API but are not related
the main task of the AOs (which is to move data correctly to the ringbuffer).
These are mainly need for the verbosity of the CoreAudio API and are just
obscuring the 'real' code.
2013-07-22 21:53:17 +02:00