summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2010-11-28 13:40:15 +0100
committerGravatar waker <wakeroid@gmail.com>2010-11-28 13:40:15 +0100
commit78cebdb0a267effe32fe196c04124692b04ec9db (patch)
tree4c4af33a04db4a3e0440240b9ad4d60a927c2c0d /plugins
parentaebe97dea65cbd451246d6fe71f362eef91ef2ac (diff)
optimized output format setting in streamer (also fixes gapless)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/alsa/alsa.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/plugins/alsa/alsa.c b/plugins/alsa/alsa.c
index 2a36b015..15b8a539 100644
--- a/plugins/alsa/alsa.c
+++ b/plugins/alsa/alsa.c
@@ -182,7 +182,7 @@ palsa_set_hw_params (ddb_waveformat_t *fmt) {
}
snd_pcm_hw_params_get_format (hw_params, &sample_fmt);
- trace ("chosen sample format: %04Xh\n", (int)fmt);
+ trace ("chosen sample format: %04Xh\n", (int)sample_fmt);
int val = fmt->samplerate;
int ret = 0;
@@ -398,6 +398,24 @@ palsa_setformat (ddb_waveformat_t *fmt) {
trace ("palsa_setformat ignored\n");
return;
}
+#if 0
+ else {
+ trace ("switching format:\n"
+ "bps %d -> %d\n"
+ "is_float %d -> %d\n"
+ "is_multichannel %d -> %d\n"
+ "channels %d -> %d\n"
+ "samplerate %d -> %d\n"
+ "channelmask %d -> %d\n"
+ , fmt->bps, plugin.fmt.bps
+ , fmt->is_float, plugin.fmt.is_float
+ , fmt->is_multichannel, plugin.fmt.is_multichannel
+ , fmt->channels, plugin.fmt.channels
+ , fmt->samplerate, plugin.fmt.samplerate
+ , fmt->channelmask, plugin.fmt.channelmask
+ );
+ }
+#endif
state = OUTPUT_STATE_STOPPED;
LOCK;
snd_pcm_drop (audio);