Skip to content

Commit

Permalink
coreaudio: Move some variable declarations to the top of the scope.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Sep 2, 2016
1 parent 1428bab commit f9d9708
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/audio/coreaudio/SDL_coreaudio.c
Expand Up @@ -437,17 +437,18 @@ static void
COREAUDIO_CloseDevice(_THIS)
{
const int iscapture = this->iscapture;

if (this->hidden->audioUnitOpened) {
const AudioUnitElement output_bus = 0;
const AudioUnitElement input_bus = 1;
const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);
AURenderCallbackStruct callback;

#if MACOSX_COREAUDIO
/* Unregister our disconnect callback. */
AudioObjectRemovePropertyListener(this->hidden->deviceID, &alive_address, device_unplugged, this);
#endif

AURenderCallbackStruct callback;
const AudioUnitElement output_bus = 0;
const AudioUnitElement input_bus = 1;
const AudioUnitElement bus = ((iscapture) ? input_bus : output_bus);

/* stop processing the audio unit */
AudioOutputUnitStop(this->hidden->audioUnit);

Expand Down

0 comments on commit f9d9708

Please sign in to comment.