diff options
author | Max Kellermann <max@duempel.org> | 2008-10-29 22:17:44 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-29 22:17:44 +0100 |
commit | 0eae1c55adefc3e7509b2ef40f4da8baa3fe24ef (patch) | |
tree | 0d1c479cf14196441af2336d278ed0d306027b96 /src/audio.c | |
parent | 678314534a08dbcbc1c642446f1af899a2108b57 (diff) |
output: moved code to audio_output_update()
Moved code from syncAudioDeviceStates() to audio_output_update().
Diffstat (limited to 'src/audio.c')
-rw-r--r-- | src/audio.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/audio.c b/src/audio.c index 5eebc02dd..3d4cf1a48 100644 --- a/src/audio.c +++ b/src/audio.c @@ -214,19 +214,13 @@ static void audio_output_wait_all(void) static void syncAudioDeviceStates(void) { - struct audio_output *audioOutput; unsigned int i; if (!audio_format_defined(&input_audio_format)) return; - for (i = 0; i < audioOutputArraySize; ++i) { - audioOutput = &audioOutputArray[i]; - if (audioOutput->enabled) - audio_output_open(audioOutput, &input_audio_format); - else if (audio_output_is_open(audioOutput)) - audio_output_close(audioOutput); - } + for (i = 0; i < audioOutputArraySize; ++i) + audio_output_update(&audioOutputArray[i], &input_audio_format); } bool playAudio(const char *buffer, size_t length) |