allow any sampleRate > 0?

git-svn-id: https://svn.musicpd.org/mpd/trunk@1150 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes 2004-05-24 22:29:04 +00:00
parent 3c75535eae
commit e89c9769f9

View File

@ -149,7 +149,7 @@ void initAudioConfig() {
exit(EXIT_FAILURE);
}
switch(audio_configFormat->sampleRate) {
/*switch(audio_configFormat->sampleRate) {
case 48000:
case 44100:
case 32000:
@ -159,6 +159,12 @@ void initAudioConfig() {
ERROR("sample rate %i can not be used for audio output\n",
(int)audio_configFormat->sampleRate);
exit(EXIT_FAILURE);
}*/
if(audio_configFormat->sampleRate <= 0) {
ERROR("sample rate %i is not >= 0\n",
(int)audio_configFormat->sampleRate);
exit(EXIT_FAILURE);
}
audio_configFormat->bits = strtol(test+1,&test,10);