Since we're not using the CoreAudio HAL now, we don't need to use EnableIO.
authorRyan C. Gordon
Mon, 11 Jan 2010 07:45:34 +0000
changeset 36378a46b3eab813
parent 3636 e474a820daeb
child 3638 6e70cf55a368
Since we're not using the CoreAudio HAL now, we don't need to use EnableIO.

I think that's how it works.

Fixes failure to open audio device on Mac OS X.
src/audio/macosx/SDL_coreaudio.c
     1.1 --- a/src/audio/macosx/SDL_coreaudio.c	Mon Jan 11 07:33:56 2010 +0000
     1.2 +++ b/src/audio/macosx/SDL_coreaudio.c	Mon Jan 11 07:45:34 2010 +0000
     1.3 @@ -420,7 +420,6 @@
     1.4      AURenderCallbackStruct callback;
     1.5      ComponentDescription desc;
     1.6      Component comp = NULL;
     1.7 -    UInt32 enableIO = 0;
     1.8      const AudioUnitElement output_bus = 0;
     1.9      const AudioUnitElement input_bus = 1;
    1.10      const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);
    1.11 @@ -449,22 +448,6 @@
    1.12  
    1.13      this->hidden->audioUnitOpened = 1;
    1.14  
    1.15 -    // !!! FIXME: this is wrong?
    1.16 -    enableIO = ((iscapture) ? 1 : 0);
    1.17 -    result = AudioUnitSetProperty(this->hidden->audioUnit,
    1.18 -                                  kAudioOutputUnitProperty_EnableIO,
    1.19 -                                  kAudioUnitScope_Input, input_bus,
    1.20 -                                  &enableIO, sizeof(enableIO));
    1.21 -    CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_EnableIO input)");
    1.22 -
    1.23 -    // !!! FIXME: this is wrong?
    1.24 -    enableIO = ((iscapture) ? 0 : 1);
    1.25 -    result = AudioUnitSetProperty(this->hidden->audioUnit,
    1.26 -                                  kAudioOutputUnitProperty_EnableIO,
    1.27 -                                  kAudioUnitScope_Output, output_bus,
    1.28 -                                  &enableIO, sizeof(enableIO));
    1.29 -    CHECK_RESULT("AudioUnitSetProperty (kAudioUnitProperty_EnableIO output)");
    1.30 -
    1.31      result = AudioUnitSetProperty(this->hidden->audioUnit,
    1.32                                    kAudioOutputUnitProperty_CurrentDevice,
    1.33                                    kAudioUnitScope_Global, 0,