From 07c9b62764c2704380338dd26db7dc4d9b67dc2e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 13 Oct 2008 14:31:18 +0200 Subject: audio: don't clear input_audio_format on openAudioDevice(NULL) Commit 80a2c937 broke resume after pause: it cleared the input_audio_format when it attempted to simplify a complicated expression. Don't clear it, just assign input_audio_format if a new format was specified. --- src/audio.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/audio.c b/src/audio.c index f97943400..ce62df46d 100644 --- a/src/audio.c +++ b/src/audio.c @@ -301,9 +301,7 @@ int openAudioDevice(const struct audio_format *audioFormat) if (!audioOutputArray) return -1; - if (audioFormat == NULL) - audio_format_clear(&input_audio_format); - else + if (audioFormat != NULL) input_audio_format = *audioFormat; syncAudioDeviceStates(); -- cgit v1.2.3