aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMatthew Gregan <[email protected]>2012-10-26 16:58:31 +1300
committerMatthew Gregan <[email protected]>2012-10-26 16:58:31 +1300
commite5837ecbb2389abd7e6635f4339878c5e4c1e1d5 (patch)
treefc6d289b7acfdcb5cd526b728e3c9f3d32976590
parent9d44b732da8f1cbe8ff8f721b2c2ce18c6a11bf4 (diff)
downloadcubeb-e5837ecbb2389abd7e6635f4339878c5e4c1e1d5.tar.gz
cubeb-e5837ecbb2389abd7e6635f4339878c5e4c1e1d5.zip
audiounit: make unit deinit failures non-fatal too.
-rw-r--r--src/cubeb_audiounit.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/cubeb_audiounit.c b/src/cubeb_audiounit.c
index 9fd46c4..f661a54 100644
--- a/src/cubeb_audiounit.c
+++ b/src/cubeb_audiounit.c
@@ -222,19 +222,14 @@ cubeb_stream_init(cubeb * context, cubeb_stream ** stream, char const * stream_n
void
cubeb_stream_destroy(cubeb_stream * stm)
{
- OSStatus r;
+ int r;
stm->shutdown = 1;
if (stm->unit) {
- r = AudioOutputUnitStop(stm->unit);
- assert(r == 0);
-
- r = AudioUnitUninitialize(stm->unit);
- assert(r == 0);
-
- r = CloseComponent(stm->unit);
- assert(r == 0);
+ AudioOutputUnitStop(stm->unit);
+ AudioUnitUninitialize(stm->unit);
+ CloseComponent(stm->unit);
}
r = pthread_mutex_destroy(&stm->mutex);