osxaudio: Don't set the format on an initialized AudioUnit
authorArun Raghavan <arun@centricular.com>
Mon, 6 Apr 2015 10:52:34 +0000 (16:22 +0530)
committerArun Raghavan <git@arunraghavan.net>
Tue, 14 Jul 2015 12:19:50 +0000 (17:49 +0530)
commit691ecebe227d27914cd6efb1ff86d2d42679d3f3
tree03e32121ec0a7fd6b2928deb29d71859fd28503c
parent22f6d62796743530f537d980992a4c1b9866f4f1
osxaudio: Don't set the format on an initialized AudioUnit

We need to initialize the AudioUnit early to be able to probe the
underlying device, but according to the AudioUnitInitialize() and
AudioUnitUninitialize() documentation, format changes should be done
while the AudioUnit is uninitialized. So we explicitly uninitialize the
AudioUnit during a format change and reinitialize it when we're done.
sys/osxaudio/gstosxcoreaudio.c
sys/osxaudio/gstosxcoreaudiocommon.c
sys/osxaudio/gstosxcoreaudiohal.c
sys/osxaudio/gstosxcoreaudioremoteio.c