From 9dd098f09b84fadce60a779a2f2daa0e904e94d2 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Mon, 10 May 2004 13:37:48 +0000 Subject: use memcpy for isCurrentAudioFormat() git-svn-id: https://svn.musicpd.org/mpd/trunk@969 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/audio.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/audio.c b/src/audio.c index 243f65863..9e80c6762 100644 --- a/src/audio.c +++ b/src/audio.c @@ -210,12 +210,7 @@ int isCurrentAudioFormat(AudioFormat * audioFormat) { #ifdef HAVE_AUDIO if(!audio_device || !audioFormat) return 0; - if(audio_format.bits!=audioFormat->bits || - audio_format.sampleRate!=audioFormat->sampleRate || - audio_format.channels!=audioFormat->channels) - { - return 0; - } + if(memcmp(audioFormat,&audio_format,sizeof(AudioFormat)) != 0) return 0; #endif return 1; } -- cgit v1.2.3