Ticket #50784: configure.coreaudio.patch
File configure.coreaudio.patch, 1.7 KB (added by noel@…, 9 years ago) |
---|
-
libao2/ao_coreaudio.c
old new 412 412 static int init(int rate,int channels,int format,int flags) 413 413 { 414 414 AudioStreamBasicDescription inDesc; 415 ComponentDescription desc;416 Component comp;415 AudioComponentDescription desc; 416 AudioComponent comp; 417 417 AURenderCallbackStruct renderCallback; 418 418 OSStatus err; 419 419 UInt32 size, maxFrames, b_alive; … … 557 557 desc.componentFlags = 0; 558 558 desc.componentFlagsMask = 0; 559 559 560 comp = FindNextComponent(NULL, &desc); //Finds an component that meets the desc spec's560 comp = AudioComponentFindNext(NULL, &desc); //Finds an component that meets the desc spec's 561 561 if (comp == NULL) { 562 562 ao_msg(MSGT_AO, MSGL_WARN, "Unable to find Output Unit component\n"); 563 563 goto err_out; 564 564 } 565 565 566 err = OpenAComponent(comp, &(ao->theOutputUnit)); //gains access to the services provided by the component566 err = AudioComponentInstanceNew(comp, &(ao->theOutputUnit)); //gains access to the services provided by the component 567 567 if (err) { 568 568 ao_msg(MSGT_AO, MSGL_WARN, "Unable to open Output Unit component: [%4.4s]\n", (char *)&err); 569 569 goto err_out; … … 625 625 err_out2: 626 626 AudioUnitUninitialize(ao->theOutputUnit); 627 627 err_out1: 628 CloseComponent(ao->theOutputUnit);628 AudioComponentInstanceDispose(ao->theOutputUnit); 629 629 err_out: 630 630 av_fifo_free(ao->buffer); 631 631 free(ao); … … 1141 1141 if (!ao->b_digital) { 1142 1142 AudioOutputUnitStop(ao->theOutputUnit); 1143 1143 AudioUnitUninitialize(ao->theOutputUnit); 1144 CloseComponent(ao->theOutputUnit);1144 AudioComponentInstanceDispose(ao->theOutputUnit); 1145 1145 } 1146 1146 else { 1147 1147 /* Stop device. */