summaryrefslogtreecommitdiff
path: root/cmp3.c
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2009-07-07 00:44:09 +0200
committerGravatar waker <wakeroid@gmail.com>2009-07-07 00:44:09 +0200
commit70679eb6465814b368eb1ec91c6b450f324512b5 (patch)
treeb5e18a2c1d850a4886dc91241f2fc2d728a548d8 /cmp3.c
parenta6aabe9020889e508fff49666cfc1c8506fcfe45 (diff)
added vorbis seeking
fixed 44100 mono playback fix volume control for streams that don't use SRC
Diffstat (limited to 'cmp3.c')
-rw-r--r--cmp3.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/cmp3.c b/cmp3.c
index 17f62daa..ca14437a 100644
--- a/cmp3.c
+++ b/cmp3.c
@@ -632,19 +632,9 @@ cmp3_seek (float time) {
mad_synth_init(&synth);
mad_timer_reset(&timer);
- cmp3_skip2 (time);
-#if 0
- int bytes_to_read = time * cmp3.info.samplesPerSecond * cmp3.info.channels * cmp3.info.bitsPerSample / 8;
- printf ("reading %d bytes from stream...\n", bytes_to_read);
- char buffer[8192];
- while (bytes_to_read) {
- int sz = min (8192, bytes_to_read);
- if (cmp3_read (buffer, sz) == -1) {
- return -1;
- }
- bytes_to_read -= sz;
+ if (cmp3_skip2 (time) == -1) {
+ return -1;
}
-#endif
return 0;
}