aboutsummaryrefslogtreecommitdiffstats
path: root/src/output/jack_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-02-25 10:46:44 +0100
committerMax Kellermann <max@duempel.org>2011-02-25 10:46:44 +0100
commitce370bee60f685d9e7b109ac67ae656b46779f88 (patch)
treec87fb59cda726692728c321bac8e9f28f0c00d82 /src/output/jack_plugin.c
parent2a1f4539f6115f6d01f33b60adf0118122c7018a (diff)
downloadmpd-ce370bee60f685d9e7b109ac67ae656b46779f88.tar.gz
mpd-ce370bee60f685d9e7b109ac67ae656b46779f88.tar.xz
mpd-ce370bee60f685d9e7b109ac67ae656b46779f88.zip
output/jack: rename variable sample_size to jack_sample_size
Diffstat (limited to '')
-rw-r--r--src/output/jack_plugin.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/output/jack_plugin.c b/src/output/jack_plugin.c
index 5dc1eca24..4b71dc8c4 100644
--- a/src/output/jack_plugin.c
+++ b/src/output/jack_plugin.c
@@ -36,7 +36,7 @@
#undef G_LOG_DOMAIN
#define G_LOG_DOMAIN "jack"
-static const size_t sample_size = sizeof(jack_default_audio_sample_t);
+static const size_t jack_sample_size = sizeof(jack_default_audio_sample_t);
static const char *const port_names[2] = {
"left", "right",
@@ -118,14 +118,15 @@ mpd_jack_process(jack_nframes_t nframes, void *arg)
for (unsigned i = 0; i < G_N_ELEMENTS(jd->ringbuffer); ++i) {
available = jack_ringbuffer_read_space(jd->ringbuffer[i]);
- assert(available % sample_size == 0);
- available /= sample_size;
+ assert(available % jack_sample_size == 0);
+ available /= jack_sample_size;
if (available > nframes)
available = nframes;
out = jack_port_get_buffer(jd->ports[i], nframes);
jack_ringbuffer_read(jd->ringbuffer[i],
- (char *)out, available * sample_size);
+ (char *)out,
+ available * jack_sample_size);
while (available < nframes)
/* ringbuffer underrun, fill with silence */
@@ -430,7 +431,7 @@ mpd_jack_play(void *data, const void *chunk, size_t size, GError **error)
g_usleep(1000);
}
- space /= sample_size;
+ space /= jack_sample_size;
if (space < size)
size = space;