From 6a74a5dd3b625f1143e301b9d6a840e3b4969bd3 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Thu, 22 May 2008 09:58:19 +0000 Subject: Commit FS#9015. Rework of musepack buffered seek. Now a static seek buffer of 8192 entries is used. The seeking precision is adapted to the length of the file (e.g. 26ms for files <=3.5min and 0.4s for files ~60min). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17604 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libmusepack/decoder.h | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'apps/codecs/libmusepack/decoder.h') diff --git a/apps/codecs/libmusepack/decoder.h b/apps/codecs/libmusepack/decoder.h index b035ae9..41ffe1c 100644 --- a/apps/codecs/libmusepack/decoder.h +++ b/apps/codecs/libmusepack/decoder.h @@ -49,7 +49,7 @@ enum { MPC_V_MEM = 2304, MPC_DECODER_MEMSIZE = 16384, // overall buffer size (words) - MPC_SEEK_BUFFER_SIZE = 65536, // seek buffer size (words) + MPC_SEEK_BUFFER_SIZE = 8192, // seek buffer size (words) }; typedef struct { @@ -78,9 +78,6 @@ typedef struct mpc_decoder_t { mpc_uint32_t DecodedFrames; mpc_uint32_t OverallFrames; - mpc_uint32_t MaxDecodedFrames; // Maximum frames decoded (indicates usable seek table entries) - mpc_uint16_t SeekTableIndex; - mpc_uint32_t SeekTableCounter; mpc_int32_t SampleRate; // Sample frequency mpc_uint32_t StreamVersion; // version of bitstream @@ -110,8 +107,10 @@ typedef struct mpc_decoder_t { mpc_int8_t SCFI_R [32]; // describes order of transmitted SCF mpc_bool_t MS_Flag[32]; // MS used? - mpc_uint32_t* SeekTable; - mpc_uint8_t SeekTable_Step; + mpc_uint32_t SeekTableCounter; // used to sum up skip info, if SeekTable_Step != 1 + mpc_uint32_t MaxDecodedFrames; // Maximum frames decoded (indicates usable seek table entries) + mpc_uint32_t* SeekTable; // seek table itself + mpc_uint8_t SeekTable_Step; // frames per seek table index #ifdef MPC_FIXED_POINT mpc_uint8_t SCF_shift[256]; -- cgit v1.1