diff options
author | Max Kellermann <max@duempel.org> | 2008-03-26 10:37:17 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2008-03-26 10:37:17 +0000 |
commit | 66fe58064295f838f894758d92b087100ce022aa (patch) | |
tree | b0f967f7e55bccb9d1390c23c0333d047384eaf3 /src/audioOutputs/audioOutput_alsa.c | |
parent | 13c17c3d942f1074d76caeaf39ebe0d5017593e9 (diff) | |
download | mpd-66fe58064295f838f894758d92b087100ce022aa.tar.gz mpd-66fe58064295f838f894758d92b087100ce022aa.tar.xz mpd-66fe58064295f838f894758d92b087100ce022aa.zip |
explicitly downcast
Tools like "sparse" check for missing downcasts, since implicit cast
may be dangerous. Although that does not change the compiler result,
it may make the code more readable (IMHO), because you always see when
there may be data cut off.
git-svn-id: https://svn.musicpd.org/mpd/trunk@7196 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/audioOutputs/audioOutput_alsa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c index 1f90c6ee0..3da3e470d 100644 --- a/src/audioOutputs/audioOutput_alsa.c +++ b/src/audioOutputs/audioOutput_alsa.c @@ -215,7 +215,7 @@ configure_hw: snd_strerror(-err)); goto fail; } - audioFormat->channels = channels; + audioFormat->channels = (mpd_sint8)channels; err = snd_pcm_hw_params_set_rate_near(ad->pcmHandle, hwparams, &sampleRate, NULL); |