pkgsrc/audio/tremor-tools/patches/patch-ab
chris 818967d985 Conversion of ogg123 to use the tremor library. This makes my arm boxen
capable of decoding ogg vorbis files in real time.

Note this package produces one binary: igg123, which is compatible with ogg123.
2002-09-24 09:35:15 +00:00

46 lines
1.2 KiB
Text

$NetBSD: patch-ab,v 1.1.1.1 2002/09/24 09:35:17 chris Exp $
--- ogg123/oggvorbis_format.c.orig Sat Sep 14 18:43:49 2002
+++ ogg123/oggvorbis_format.c Sat Sep 14 18:45:10 2002
@@ -19,8 +19,8 @@
#include <string.h>
#include <ctype.h>
#include <ogg/ogg.h>
-#include <vorbis/codec.h>
-#include <vorbis/vorbisfile.h>
+#include <tremor/ivorbiscodec.h>
+#include <tremor/ivorbisfile.h>
#include "transport.h"
#include "format.h"
#include "utf8.h"
@@ -150,8 +150,7 @@
while (nbytes > 0) {
old_section = priv->current_section;
- ret = ov_read(&priv->vf, ptr, nbytes, audio_fmt->big_endian,
- audio_fmt->word_size, audio_fmt->signed_sample,
+ ret = ov_read(&priv->vf, ptr, nbytes,
&priv->current_section);
if (ret == 0) {
@@ -193,15 +192,17 @@
}
-int ovf_seek (decoder_t *decoder, double offset, int whence)
+int ovf_seek (decoder_t *decoder, double aoffset, int whence)
{
ovf_private_t *priv = decoder->private;
int ret;
- double cur;
+ ogg_int64_t cur;
+ ogg_int64_t offset = (aoffset * 1000);
+
if (whence == DECODER_SEEK_CUR) {
cur = ov_time_tell(&priv->vf);
- if (cur >= 0.0)
+ if (cur >= 0)
offset += cur;
else
return 0;