aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutputs/audioOutput_alsa.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-10 14:40:54 +0200
committerMax Kellermann <max@duempel.org>2008-10-10 14:40:54 +0200
commitde2cb3f37568e7680549057f8d7b6d748c388480 (patch)
tree46f9f43a1f83b49945c8a4fc77f933fad9230e01 /src/audioOutputs/audioOutput_alsa.c
parent6101dc6c768b09dbcdc1840a84b619a5a6a20129 (diff)
downloadmpd-de2cb3f37568e7680549057f8d7b6d748c388480.tar.gz
mpd-de2cb3f37568e7680549057f8d7b6d748c388480.tar.xz
mpd-de2cb3f37568e7680549057f8d7b6d748c388480.zip
audio_format: renamed sampleRate to sample_rate
The last bit of CamelCase in audio_format.h. Additionally, rename a bunch of local variables.
Diffstat (limited to 'src/audioOutputs/audioOutput_alsa.c')
-rw-r--r--src/audioOutputs/audioOutput_alsa.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/audioOutputs/audioOutput_alsa.c b/src/audioOutputs/audioOutput_alsa.c
index 83bd9c256..30ad449f3 100644
--- a/src/audioOutputs/audioOutput_alsa.c
+++ b/src/audioOutputs/audioOutput_alsa.c
@@ -142,7 +142,7 @@ static int alsa_openDevice(void *data, struct audio_format *audioFormat)
snd_pcm_format_t bitformat;
snd_pcm_hw_params_t *hwparams;
snd_pcm_sw_params_t *swparams;
- unsigned int sampleRate = audioFormat->sampleRate;
+ unsigned int sample_rate = audioFormat->sample_rate;
unsigned int channels = audioFormat->channels;
snd_pcm_uframes_t alsa_buffer_size;
snd_pcm_uframes_t alsa_period_size;
@@ -217,13 +217,13 @@ configure_hw:
audioFormat->channels = (int8_t)channels;
err = snd_pcm_hw_params_set_rate_near(ad->pcmHandle, hwparams,
- &sampleRate, NULL);
- if (err < 0 || sampleRate == 0) {
- ERROR("ALSA device \"%s\" does not support %i Hz audio\n",
- ad->device, (int)audioFormat->sampleRate);
+ &sample_rate, NULL);
+ if (err < 0 || sample_rate == 0) {
+ ERROR("ALSA device \"%s\" does not support %u Hz audio\n",
+ ad->device, audioFormat->sample_rate);
goto fail;
}
- audioFormat->sampleRate = sampleRate;
+ audioFormat->sample_rate = sample_rate;
buffer_time = ad->buffer_time;
cmd = "snd_pcm_hw_params_set_buffer_time_near";
@@ -291,8 +291,8 @@ configure_hw:
ad->sampleSize = audio_format_sample_size(audioFormat) * audioFormat->channels;
DEBUG("ALSA device \"%s\" will be playing %i bit, %u channel audio at "
- "%i Hz\n", ad->device, audioFormat->bits,
- channels, sampleRate);
+ "%u Hz\n", ad->device, audioFormat->bits,
+ channels, sample_rate);
return 0;