aboutsummaryrefslogtreecommitdiffstats
path: root/src/audio.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-10 13:37:48 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-10 13:37:48 +0000
commit9dd098f09b84fadce60a779a2f2daa0e904e94d2 (patch)
tree7aa9efad314d7761d5143a14f1bf460ef39069d4 /src/audio.c
parent2ec1c5ff3c1ff67825fb449c9eab2c3e4ff441f6 (diff)
downloadmpd-9dd098f09b84fadce60a779a2f2daa0e904e94d2.tar.gz
mpd-9dd098f09b84fadce60a779a2f2daa0e904e94d2.tar.xz
mpd-9dd098f09b84fadce60a779a2f2daa0e904e94d2.zip
use memcpy for isCurrentAudioFormat()
git-svn-id: https://svn.musicpd.org/mpd/trunk@969 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to 'src/audio.c')
-rw-r--r--src/audio.c7
1 files changed, 1 insertions, 6 deletions
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;
}