aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs/audioOutput_alsa.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-10 14:03:33 +0200
committerMax Kellermann <max@duempel.org>2008-10-10 14:03:33 +0200
commit6101dc6c768b09dbcdc1840a84b619a5a6a20129 (patch)
treeaf2369299cff4af045fe8717584a29b6234aac51 /src/audioOutputs/audioOutput_alsa.c
parent817a033f5591fefb842e355ef211d09e855661ef (diff)
downloadmpd-6101dc6c768b09dbcdc1840a84b619a5a6a20129.tar.gz
mpd-6101dc6c768b09dbcdc1840a84b619a5a6a20129.tar.xz
mpd-6101dc6c768b09dbcdc1840a84b619a5a6a20129.zip
audio_format: unsigned integers
"bits" and "channels" cannot be negative.
Diffstat (limited to '')
-rw-r--r--src/audioOutputs/audioOutput_alsa.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index d28deb733..83bd9c256 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -153,7 +153,7 @@ static int alsa_openDevice(void *data, struct audio_format *audioFormat)
unsigned int buffer_time;
if ((bitformat = get_bitformat(audioFormat)) == SND_PCM_FORMAT_UNKNOWN)
- ERROR("ALSA device \"%s\" doesn't support %i bit audio\n",
+ ERROR("ALSA device \"%s\" doesn't support %u bit audio\n",
ad->device, audioFormat->bits);
err = snd_pcm_open(&ad->pcmHandle, ad->device,
@@ -201,7 +201,7 @@ configure_hw:
err = snd_pcm_hw_params_set_format(ad->pcmHandle, hwparams, bitformat);
if (err < 0) {
- ERROR("ALSA device \"%s\" does not support %i bit audio: "
+ ERROR("ALSA device \"%s\" does not support %u bit audio: "
"%s\n", ad->device, audioFormat->bits, snd_strerror(-err));
goto fail;
}
@@ -290,8 +290,8 @@ configure_hw:
ad->sampleSize = audio_format_sample_size(audioFormat) * audioFormat->channels;
- DEBUG("ALSA device \"%s\" will be playing %i bit, %i channel audio at "
- "%i Hz\n", ad->device, (int)audioFormat->bits,
+ DEBUG("ALSA device \"%s\" will be playing %i bit, %u channel audio at "
+ "%i Hz\n", ad->device, audioFormat->bits,
channels, sampleRate);
return 0;