X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=osx_write.c;fp=osx_write.c;h=2894f11eb6672dd5f06fa1f3166f6a77afad7ae0;hp=d278d02c8ed5be97ffb0eb56b15825343c02e21c;hb=9eaa22ecdafa718fc2a84a70d442c829ae7e1b34;hpb=831db326fc8977846792634c177c5811165c287a diff --git a/osx_write.c b/osx_write.c index d278d02c..2894f11e 100644 --- a/osx_write.c +++ b/osx_write.c @@ -318,7 +318,13 @@ static void osx_write_post_select(__a_unused struct sched *s, struct task *t) if (ret < 0) goto remove_btrn; powd = wn->private_data; - AudioOutputUnitStart(powd->audio_unit); + ret = -E_UNIT_START; + if (AudioOutputUnitStart(powd->audio_unit) != noErr) { + AudioUnitUninitialize(powd->audio_unit); + CloseComponent(powd->audio_unit); + btr_remove_node(&powd->callback_btrn); + goto remove_btrn; + } } mutex_lock(powd->mutex); ret = btr_node_status(btrn, wn->min_iqs, BTR_NT_INTERNAL);