diff --git a/src/output/osx_output_plugin.c b/src/output/osx_output_plugin.c
index fbba817..d712630 100644
|
a
|
b
|
osx_output_enable(struct audio_output *ao, GError **error_r) |
| 240 | 240 | { |
| 241 | 241 | struct osx_output *oo = (struct osx_output *)ao; |
| 242 | 242 | |
| 243 | | ComponentDescription desc; |
| | 243 | AudioComponentDescription desc; |
| 244 | 244 | desc.componentType = kAudioUnitType_Output; |
| 245 | 245 | desc.componentSubType = oo->component_subtype; |
| 246 | 246 | desc.componentManufacturer = kAudioUnitManufacturer_Apple; |
| 247 | 247 | desc.componentFlags = 0; |
| 248 | 248 | desc.componentFlagsMask = 0; |
| 249 | 249 | |
| 250 | | Component comp = FindNextComponent(NULL, &desc); |
| | 250 | AudioComponent comp = AudioComponentFindNext(NULL, &desc); |
| 251 | 251 | if (comp == 0) { |
| 252 | 252 | g_set_error(error_r, osx_output_quark(), 0, |
| 253 | 253 | "Error finding OS X component"); |
| 254 | 254 | return false; |
| 255 | 255 | } |
| 256 | 256 | |
| 257 | | OSStatus status = OpenAComponent(comp, &oo->au); |
| | 257 | OSStatus status = AudioComponentInstanceNew(comp, &oo->au); |
| 258 | 258 | if (status != noErr) { |
| 259 | 259 | g_set_error(error_r, osx_output_quark(), status, |
| 260 | 260 | "Unable to open OS X component: %s", |
| … |
… |
osx_output_enable(struct audio_output *ao, GError **error_r) |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | if (!osx_output_set_device(oo, error_r)) { |
| 266 | | CloseComponent(oo->au); |
| | 266 | AudioComponentInstanceDispose(oo->au); |
| 267 | 267 | return false; |
| 268 | 268 | } |
| 269 | 269 | |
| … |
… |
osx_output_enable(struct audio_output *ao, GError **error_r) |
| 277 | 277 | kAudioUnitScope_Input, 0, |
| 278 | 278 | &callback, sizeof(callback)); |
| 279 | 279 | if (result != noErr) { |
| 280 | | CloseComponent(oo->au); |
| | 280 | AudioComponentInstanceDispose(oo->au); |
| 281 | 281 | g_set_error(error_r, osx_output_quark(), result, |
| 282 | 282 | "unable to set callback for OS X audio unit"); |
| 283 | 283 | return false; |
| … |
… |
osx_output_disable(struct audio_output *ao) |
| 291 | 291 | { |
| 292 | 292 | struct osx_output *oo = (struct osx_output *)ao; |
| 293 | 293 | |
| 294 | | CloseComponent(oo->au); |
| | 294 | AudioComponentInstanceDispose(oo->au); |
| 295 | 295 | } |
| 296 | 296 | |
| 297 | 297 | static void |