summaryrefslogtreecommitdiff
path: root/lib/rbcodec
diff options
context:
space:
mode:
Diffstat (limited to 'lib/rbcodec')
-rw-r--r--lib/rbcodec/codecs/alac.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/rbcodec/codecs/alac.c b/lib/rbcodec/codecs/alac.c
index 7139b629b8..0bf354080c 100644
--- a/lib/rbcodec/codecs/alac.c
+++ b/lib/rbcodec/codecs/alac.c
@@ -25,7 +25,7 @@
25 25
26CODEC_HEADER 26CODEC_HEADER
27 27
28/* The maximum buffer size handled. This amount of bytes is buffered for each 28/* The maximum buffer size handled. This amount of bytes is buffered for each
29 * frame. */ 29 * frame. */
30#define ALAC_BYTE_BUFFER_SIZE 32768 30#define ALAC_BYTE_BUFFER_SIZE 32768
31 31
@@ -57,14 +57,14 @@ enum codec_status codec_run(void)
57 stream_t input_stream; 57 stream_t input_stream;
58 uint64_t samplesdone; 58 uint64_t samplesdone;
59 int samplesdecoded; 59 int samplesdecoded;
60 unsigned int i; 60 uint32_t i;
61 unsigned char* buffer; 61 unsigned char* buffer;
62 alac_file alac; 62 alac_file alac;
63 intptr_t param; 63 intptr_t param;
64 unsigned long resume_time; 64 unsigned long resume_time;
65 uint32_t resume_offset; 65 uint32_t resume_offset;
66 unsigned int did_resume; 66 unsigned int did_resume;
67 int lookup_table_idx = 0; 67 uint32_t lookup_table_idx = 0;
68 68
69 /* Clean and initialize decoder structures */ 69 /* Clean and initialize decoder structures */
70 memset(&demux_res , 0, sizeof(demux_res)); 70 memset(&demux_res , 0, sizeof(demux_res));
@@ -97,10 +97,10 @@ enum codec_status codec_run(void)
97 if (resume_time) 97 if (resume_time)
98 did_resume = m4a_seek(&demux_res, &input_stream, 98 did_resume = m4a_seek(&demux_res, &input_stream,
99 (uint64_t)resume_time * ci->id3->frequency / 1000ULL, 99 (uint64_t)resume_time * ci->id3->frequency / 1000ULL,
100 &samplesdone, (int *) &i, &lookup_table_idx); 100 &samplesdone, &i, &lookup_table_idx);
101 else if (resume_offset) 101 else if (resume_offset)
102 did_resume = m4a_seek_raw(&demux_res, &input_stream, resume_offset, 102 did_resume = m4a_seek_raw(&demux_res, &input_stream, resume_offset,
103 &samplesdone, (int *) &i, &lookup_table_idx); 103 &samplesdone, &i, &lookup_table_idx);
104 else 104 else
105 did_resume = 0; 105 did_resume = 0;
106 106
@@ -123,7 +123,7 @@ enum codec_status codec_run(void)
123 if (action == CODEC_ACTION_SEEK_TIME) { 123 if (action == CODEC_ACTION_SEEK_TIME) {
124 if (m4a_seek(&demux_res, &input_stream, 124 if (m4a_seek(&demux_res, &input_stream,
125 (uint64_t)param * ci->id3->frequency / 1000ULL, 125 (uint64_t)param * ci->id3->frequency / 1000ULL,
126 &samplesdone, (int *) &i, &lookup_table_idx)) 126 &samplesdone, &i, &lookup_table_idx))
127 set_elapsed_samples(samplesdone); 127 set_elapsed_samples(samplesdone);
128 128
129 ci->seek_complete(); 129 ci->seek_complete();