summaryrefslogtreecommitdiff
path: root/plugins/dca
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-03-26 15:42:17 +0100
committerGravatar waker <wakeroid@gmail.com>2011-03-26 15:42:17 +0100
commit95f1a30a22d4e39a2084ed0680464bd1d3a99cbf (patch)
tree8ab8efc628648207f2973ef512fd7dc1b183aba5 /plugins/dca
parentad50ad9b4b80028c2f76161a8e41c23bd169b4f8 (diff)
fixed dts wav regression caused by vfs api switch to 64bit offsets
Diffstat (limited to 'plugins/dca')
-rw-r--r--plugins/dca/dcaplug.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/dca/dcaplug.c b/plugins/dca/dcaplug.c
index 8642c7b0..84a876ab 100644
--- a/plugins/dca/dcaplug.c
+++ b/plugins/dca/dcaplug.c
@@ -320,7 +320,7 @@ dts_open_wav (DB_FILE *fp, wavfmt_t *fmt, int64_t *totalsamples) {
return -1;
}
- deadbeef->fseek (fp, fmtsize - sizeof (wavfmt_t), SEEK_CUR);
+ deadbeef->fseek (fp, (int)fmtsize - (int)sizeof (wavfmt_t), SEEK_CUR);
// data subchunk
@@ -453,7 +453,7 @@ dts_init (DB_fileinfo_t *_info, DB_playItem_t *it) {
info->endsample = totalsamples-1;
}
- trace ("dca_init: nchannels: %d, samplerate: %d\n", _info->channels, _info->samplerate);
+ trace ("dca_init: nchannels: %d, samplerate: %d\n", _info->fmt.channels, _info->fmt.samplerate);
return 0;
}
@@ -580,6 +580,7 @@ dts_insert (DB_playItem_t *after, const char *fname) {
// it's dts
uint8_t buffer[BUFFER_SIZE];
size_t size = deadbeef->fread (buffer, 1, sizeof (buffer), fp);
+ trace ("got size: %d (requested %d)\n", size, sizeof (buffer));
ddb_dca_state_t state;
memset (&state, 0, sizeof (state));
state.state = dca_init (0);