Permalink
Browse files

sndqueue: Unbreak libtremor support again

  • Loading branch information...
SimonKagstrom committed Jan 2, 2012
1 parent ef0e4fe commit 5afd27710034314a8cd5011038d00fcc361deaba
Showing with 9 additions and 3 deletions.
  1. +1 −1 src/Makefile
  2. +8 −2 src/lib/sndqueue.c
View
@@ -28,7 +28,7 @@ endif
ifeq ($(USE_TREMOR), 1)
CFLAGS += -DUSE_TREMOR=1
- LDFLAGS += -lvorbisidec
+ LDFLAGS += -lvorbisidec -lmpg123
else
LDFLAGS += -lvorbisfile -lmpg123
endif
View
@@ -521,9 +521,15 @@ int snd_do_vorbis(struct despotify_session* ds, struct ds_pcm_data* pcm ) {
pcm->channels = vi->channels;
while (1) {
+ ssize_t r;
/* decode to pcm */
- ssize_t r = ov_read(ds->vf, pcm->buf, sizeof(pcm->buf),
- SYSTEM_ENDIAN, 2, 1, NULL);
+#if defined(USE_TREMOR)
+ r = ov_read(ds->vf, pcm->buf, sizeof(pcm->buf),
+ NULL);
+#else
+ r = ov_read(ds->vf, pcm->buf, sizeof(pcm->buf),
+ SYSTEM_ENDIAN, 2, 1, NULL);
+#endif
/* assume no valid data read. */
pcm->len = 0;

0 comments on commit 5afd277

Please sign in to comment.