summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2017-11-06 20:06:08 -0500
committerMichael Sevakis <jethead71@rockbox.org>2017-11-06 20:06:08 -0500
commit826f99e18701988d7e7cdc3d7019a20e1d697403 (patch)
treee3d9bcdc138426bba1c1bb6d70a6240ea206d0f3
parent1015e1f5ca4fb7eec096677985b21b94c2699a22 (diff)
downloadrockbox-826f99e18701988d7e7cdc3d7019a20e1d697403.tar.gz
rockbox-826f99e18701988d7e7cdc3d7019a20e1d697403.zip
libpcm: Get unbranded structure tag out of my way.
No functional changes. Change-Id: If372023cb605389a203a635b700eca20685ad49b
-rw-r--r--lib/rbcodec/codecs/aiff.c4
-rw-r--r--lib/rbcodec/codecs/au.c6
-rw-r--r--lib/rbcodec/codecs/libpcm/dialogic_oki_adpcm.c4
-rw-r--r--lib/rbcodec/codecs/libpcm/dvi_adpcm.c4
-rw-r--r--lib/rbcodec/codecs/libpcm/ieee_float.c4
-rw-r--r--lib/rbcodec/codecs/libpcm/itut_g711.c4
-rw-r--r--lib/rbcodec/codecs/libpcm/linear_pcm.c4
-rw-r--r--lib/rbcodec/codecs/libpcm/ms_adpcm.c4
-rw-r--r--lib/rbcodec/codecs/libpcm/pcm_common.h4
-rw-r--r--lib/rbcodec/codecs/libpcm/qt_ima_adpcm.c4
-rw-r--r--lib/rbcodec/codecs/libpcm/swf_adpcm.c4
-rw-r--r--lib/rbcodec/codecs/libpcm/yamaha_adpcm.c4
-rw-r--r--lib/rbcodec/codecs/smaf.c10
-rw-r--r--lib/rbcodec/codecs/vox.c4
-rw-r--r--lib/rbcodec/codecs/wav.c4
-rw-r--r--lib/rbcodec/codecs/wav64.c4
16 files changed, 36 insertions, 36 deletions
diff --git a/lib/rbcodec/codecs/aiff.c b/lib/rbcodec/codecs/aiff.c
index 9fee781c03..210c2065db 100644
--- a/lib/rbcodec/codecs/aiff.c
+++ b/lib/rbcodec/codecs/aiff.c
@@ -75,7 +75,7 @@ enum codec_status codec_main(enum codec_entry_call_reason reason)
75/* this is called for each file to process */ 75/* this is called for each file to process */
76enum codec_status codec_run(void) 76enum codec_status codec_run(void)
77{ 77{
78 struct pcm_format format; 78 struct libpcm_pcm_format format;
79 uint32_t bytesdone, decodedsamples; 79 uint32_t bytesdone, decodedsamples;
80 /* rockbox: comment 'set but unused' variables 80 /* rockbox: comment 'set but unused' variables
81 uint32_t num_sample_frames = 0; 81 uint32_t num_sample_frames = 0;
@@ -127,7 +127,7 @@ enum codec_status codec_run(void)
127 buf += 12; 127 buf += 12;
128 n -= 12; 128 n -= 12;
129 129
130 ci->memset(&format, 0, sizeof(struct pcm_format)); 130 ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
131 format.is_signed = true; 131 format.is_signed = true;
132 format.is_little_endian = false; 132 format.is_little_endian = false;
133 133
diff --git a/lib/rbcodec/codecs/au.c b/lib/rbcodec/codecs/au.c
index 18d4296125..388c241140 100644
--- a/lib/rbcodec/codecs/au.c
+++ b/lib/rbcodec/codecs/au.c
@@ -88,7 +88,7 @@ static unsigned int get_be32(uint8_t *buf)
88 return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; 88 return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
89} 89}
90 90
91static int convert_au_format(unsigned int encoding, struct pcm_format *fmt) 91static int convert_au_format(unsigned int encoding, struct libpcm_pcm_format *fmt)
92{ 92{
93 fmt->formattag = AU_FORMAT_UNSUPPORT; 93 fmt->formattag = AU_FORMAT_UNSUPPORT;
94 if (encoding < 8) 94 if (encoding < 8)
@@ -119,7 +119,7 @@ enum codec_status codec_main(enum codec_entry_call_reason reason)
119/* this is called for each file to process */ 119/* this is called for each file to process */
120enum codec_status codec_run(void) 120enum codec_status codec_run(void)
121{ 121{
122 struct pcm_format format; 122 struct libpcm_pcm_format format;
123 uint32_t bytesdone, decodedsamples; 123 uint32_t bytesdone, decodedsamples;
124 size_t n; 124 size_t n;
125 int bufcount; 125 int bufcount;
@@ -142,7 +142,7 @@ enum codec_status codec_run(void)
142 param = ci->id3->elapsed; 142 param = ci->id3->elapsed;
143 bytesdone = ci->id3->offset; 143 bytesdone = ci->id3->offset;
144 144
145 ci->memset(&format, 0, sizeof(struct pcm_format)); 145 ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
146 format.is_signed = true; 146 format.is_signed = true;
147 format.is_little_endian = false; 147 format.is_little_endian = false;
148 148
diff --git a/lib/rbcodec/codecs/libpcm/dialogic_oki_adpcm.c b/lib/rbcodec/codecs/libpcm/dialogic_oki_adpcm.c
index 60090aaa89..6aa5798e5c 100644
--- a/lib/rbcodec/codecs/libpcm/dialogic_oki_adpcm.c
+++ b/lib/rbcodec/codecs/libpcm/dialogic_oki_adpcm.c
@@ -46,9 +46,9 @@ static const int index_table[] ICONST_ATTR = {
46static struct adpcm_data cur_data; 46static struct adpcm_data cur_data;
47static int blocksperchunk; 47static int blocksperchunk;
48 48
49static struct pcm_format *fmt; 49static struct libpcm_pcm_format *fmt;
50 50
51static bool set_format(struct pcm_format *format) 51static bool set_format(struct libpcm_pcm_format *format)
52{ 52{
53 uint32_t max_chunk_count; 53 uint32_t max_chunk_count;
54 54
diff --git a/lib/rbcodec/codecs/libpcm/dvi_adpcm.c b/lib/rbcodec/codecs/libpcm/dvi_adpcm.c
index 2e702ca394..d91bb1b6f6 100644
--- a/lib/rbcodec/codecs/libpcm/dvi_adpcm.c
+++ b/lib/rbcodec/codecs/libpcm/dvi_adpcm.c
@@ -35,9 +35,9 @@
35 * [3] ffmpeg source code, libavcodec/adpcm.c 35 * [3] ffmpeg source code, libavcodec/adpcm.c
36 */ 36 */
37 37
38static struct pcm_format *fmt; 38static struct libpcm_pcm_format *fmt;
39 39
40static bool set_format(struct pcm_format *format) 40static bool set_format(struct libpcm_pcm_format *format)
41{ 41{
42 fmt = format; 42 fmt = format;
43 43
diff --git a/lib/rbcodec/codecs/libpcm/ieee_float.c b/lib/rbcodec/codecs/libpcm/ieee_float.c
index 97a7fcecd4..29e145b381 100644
--- a/lib/rbcodec/codecs/libpcm/ieee_float.c
+++ b/lib/rbcodec/codecs/libpcm/ieee_float.c
@@ -26,9 +26,9 @@
26 * IEEE float 26 * IEEE float
27 */ 27 */
28 28
29static struct pcm_format *fmt; 29static struct libpcm_pcm_format *fmt;
30 30
31static bool set_format(struct pcm_format *format) 31static bool set_format(struct libpcm_pcm_format *format)
32{ 32{
33 fmt = format; 33 fmt = format;
34 34
diff --git a/lib/rbcodec/codecs/libpcm/itut_g711.c b/lib/rbcodec/codecs/libpcm/itut_g711.c
index 88ff5f59e6..cbc302ca09 100644
--- a/lib/rbcodec/codecs/libpcm/itut_g711.c
+++ b/lib/rbcodec/codecs/libpcm/itut_g711.c
@@ -106,9 +106,9 @@ static const int16_t ulaw2linear16[256] ICONST_ATTR = {
106 24, 16, 8, 0 106 24, 16, 8, 0
107}; 107};
108 108
109static struct pcm_format *fmt; 109static struct libpcm_pcm_format *fmt;
110 110
111static bool set_format(struct pcm_format *format) 111static bool set_format(struct libpcm_pcm_format *format)
112{ 112{
113 fmt = format; 113 fmt = format;
114 114
diff --git a/lib/rbcodec/codecs/libpcm/linear_pcm.c b/lib/rbcodec/codecs/libpcm/linear_pcm.c
index 5c3c140b8c..fd0aaeb013 100644
--- a/lib/rbcodec/codecs/libpcm/linear_pcm.c
+++ b/lib/rbcodec/codecs/libpcm/linear_pcm.c
@@ -32,9 +32,9 @@
32#define DEC_DEPTH_32 (32 - PCM_OUTPUT_DEPTH) 32#define DEC_DEPTH_32 (32 - PCM_OUTPUT_DEPTH)
33 33
34 34
35static struct pcm_format *fmt; 35static struct libpcm_pcm_format *fmt;
36 36
37static bool set_format(struct pcm_format *format) 37static bool set_format(struct libpcm_pcm_format *format)
38{ 38{
39 fmt = format; 39 fmt = format;
40 40
diff --git a/lib/rbcodec/codecs/libpcm/ms_adpcm.c b/lib/rbcodec/codecs/libpcm/ms_adpcm.c
index a385d6c99f..b5fe463c74 100644
--- a/lib/rbcodec/codecs/libpcm/ms_adpcm.c
+++ b/lib/rbcodec/codecs/libpcm/ms_adpcm.c
@@ -37,14 +37,14 @@ static int16_t dec_coeff[2][2];
37static uint16_t delta[2]; 37static uint16_t delta[2];
38static int16_t sample[2][2]; 38static int16_t sample[2][2];
39 39
40static struct pcm_format *fmt; 40static struct libpcm_pcm_format *fmt;
41 41
42static const int16_t adaptation_table[] ICONST_ATTR = { 42static const int16_t adaptation_table[] ICONST_ATTR = {
43 230, 230, 230, 230, 307, 409, 512, 614, 43 230, 230, 230, 230, 307, 409, 512, 614,
44 768, 614, 512, 409, 307, 230, 230, 230 44 768, 614, 512, 409, 307, 230, 230, 230
45}; 45};
46 46
47static bool set_format(struct pcm_format *format) 47static bool set_format(struct libpcm_pcm_format *format)
48{ 48{
49 fmt = format; 49 fmt = format;
50 50
diff --git a/lib/rbcodec/codecs/libpcm/pcm_common.h b/lib/rbcodec/codecs/libpcm/pcm_common.h
index 90e29c98ee..626133dc41 100644
--- a/lib/rbcodec/codecs/libpcm/pcm_common.h
+++ b/lib/rbcodec/codecs/libpcm/pcm_common.h
@@ -47,7 +47,7 @@ else if ((data) < (min)) data = min;
47 */ 47 */
48#define MSADPCM_NUM_COEFF 7 48#define MSADPCM_NUM_COEFF 7
49 49
50struct pcm_format { 50struct libpcm_pcm_format {
51 /* 51 /*
52 * RIFF: wFormatTag (in 'fmt ' chunk) 52 * RIFF: wFormatTag (in 'fmt ' chunk)
53 * AIFF: compressionType (in 'COMM' chunk) 53 * AIFF: compressionType (in 'COMM' chunk)
@@ -138,7 +138,7 @@ struct pcm_codec {
138 * true: RIFF/AIFF header check OK 138 * true: RIFF/AIFF header check OK
139 * false: RIFF/AIFF header check NG 139 * false: RIFF/AIFF header check NG
140 */ 140 */
141 bool (*set_format)(struct pcm_format *format); 141 bool (*set_format)(struct libpcm_pcm_format *format);
142 142
143 /* 143 /*
144 * get seek position 144 * get seek position
diff --git a/lib/rbcodec/codecs/libpcm/qt_ima_adpcm.c b/lib/rbcodec/codecs/libpcm/qt_ima_adpcm.c
index d7b3360eb3..26deb7c045 100644
--- a/lib/rbcodec/codecs/libpcm/qt_ima_adpcm.c
+++ b/lib/rbcodec/codecs/libpcm/qt_ima_adpcm.c
@@ -33,9 +33,9 @@
33 * [3] ffmpeg source code, libavcodec/adpcm.c 33 * [3] ffmpeg source code, libavcodec/adpcm.c
34 */ 34 */
35 35
36static struct pcm_format *fmt; 36static struct libpcm_pcm_format *fmt;
37 37
38static bool set_format(struct pcm_format *format) 38static bool set_format(struct libpcm_pcm_format *format)
39{ 39{
40 fmt = format; 40 fmt = format;
41 41
diff --git a/lib/rbcodec/codecs/libpcm/swf_adpcm.c b/lib/rbcodec/codecs/libpcm/swf_adpcm.c
index c440fd1303..7eb74fdd19 100644
--- a/lib/rbcodec/codecs/libpcm/swf_adpcm.c
+++ b/lib/rbcodec/codecs/libpcm/swf_adpcm.c
@@ -45,11 +45,11 @@ static int blockbits = 0;
45static int lastbytebits = 0; 45static int lastbytebits = 0;
46static bool after_seek = false; 46static bool after_seek = false;
47 47
48static struct pcm_format *fmt; 48static struct libpcm_pcm_format *fmt;
49 49
50#define GET_SAMPLE_COUNT(s) ((((s) << 3) / fmt->channels - 22) / fmt->bitspersample + 1) 50#define GET_SAMPLE_COUNT(s) ((((s) << 3) / fmt->channels - 22) / fmt->bitspersample + 1)
51 51
52static bool set_format(struct pcm_format *format) 52static bool set_format(struct libpcm_pcm_format *format)
53{ 53{
54 fmt = format; 54 fmt = format;
55 55
diff --git a/lib/rbcodec/codecs/libpcm/yamaha_adpcm.c b/lib/rbcodec/codecs/libpcm/yamaha_adpcm.c
index c67fe7524a..946d7ed0ec 100644
--- a/lib/rbcodec/codecs/libpcm/yamaha_adpcm.c
+++ b/lib/rbcodec/codecs/libpcm/yamaha_adpcm.c
@@ -76,9 +76,9 @@ static bool has_block_header = false;
76static struct adpcm_data cur_data; 76static struct adpcm_data cur_data;
77static int blocksperchunk; 77static int blocksperchunk;
78 78
79static struct pcm_format *fmt; 79static struct libpcm_pcm_format *fmt;
80 80
81static bool set_format(struct pcm_format *format) 81static bool set_format(struct libpcm_pcm_format *format)
82{ 82{
83 fmt = format; 83 fmt = format;
84 84
diff --git a/lib/rbcodec/codecs/smaf.c b/lib/rbcodec/codecs/smaf.c
index e4ec6342b2..eed9d39db4 100644
--- a/lib/rbcodec/codecs/smaf.c
+++ b/lib/rbcodec/codecs/smaf.c
@@ -134,7 +134,7 @@ static unsigned int search_chunk(const unsigned char *name, int nlen, off_t *pos
134 return 0; 134 return 0;
135} 135}
136 136
137static bool parse_audio_track(struct pcm_format *fmt, unsigned int chunksize, off_t *pos) 137static bool parse_audio_track(struct libpcm_pcm_format *fmt, unsigned int chunksize, off_t *pos)
138{ 138{
139 const unsigned char *buf; 139 const unsigned char *buf;
140 size_t size; 140 size_t size;
@@ -185,7 +185,7 @@ static bool parse_audio_track(struct pcm_format *fmt, unsigned int chunksize, of
185 return true; 185 return true;
186} 186}
187 187
188static bool parse_score_track(struct pcm_format *fmt, off_t *pos) 188static bool parse_score_track(struct libpcm_pcm_format *fmt, off_t *pos)
189{ 189{
190 const unsigned char *buf; 190 const unsigned char *buf;
191 unsigned int chunksize; 191 unsigned int chunksize;
@@ -277,13 +277,13 @@ static bool parse_score_track(struct pcm_format *fmt, off_t *pos)
277 return true; 277 return true;
278} 278}
279 279
280static bool parse_header(struct pcm_format *fmt, off_t *pos) 280static bool parse_header(struct libpcm_pcm_format *fmt, off_t *pos)
281{ 281{
282 const unsigned char *buf; 282 const unsigned char *buf;
283 unsigned int chunksize; 283 unsigned int chunksize;
284 size_t size; 284 size_t size;
285 285
286 ci->memset(fmt, 0, sizeof(struct pcm_format)); 286 ci->memset(fmt, 0, sizeof(struct libpcm_pcm_format));
287 287
288 /* check File Chunk and Contents Info Chunk */ 288 /* check File Chunk and Contents Info Chunk */
289 buf = ci->request_buffer(&size, 16); 289 buf = ci->request_buffer(&size, 16);
@@ -319,7 +319,7 @@ static bool parse_header(struct pcm_format *fmt, off_t *pos)
319 return true; 319 return true;
320} 320}
321 321
322static struct pcm_format format; 322static struct libpcm_pcm_format format;
323static uint32_t bytesdone; 323static uint32_t bytesdone;
324 324
325static uint8_t *read_buffer(size_t *realsize) 325static uint8_t *read_buffer(size_t *realsize)
diff --git a/lib/rbcodec/codecs/vox.c b/lib/rbcodec/codecs/vox.c
index d84af24cfc..69eafc72ff 100644
--- a/lib/rbcodec/codecs/vox.c
+++ b/lib/rbcodec/codecs/vox.c
@@ -30,7 +30,7 @@ CODEC_HEADER
30 30
31static int32_t samples[PCM_SAMPLE_SIZE] IBSS_ATTR; 31static int32_t samples[PCM_SAMPLE_SIZE] IBSS_ATTR;
32 32
33static struct pcm_format format; 33static struct libpcm_pcm_format format;
34static uint32_t bytesdone; 34static uint32_t bytesdone;
35 35
36static uint8_t *read_buffer(size_t *realsize) 36static uint8_t *read_buffer(size_t *realsize)
@@ -78,7 +78,7 @@ enum codec_status codec_run(void)
78 bytesdone = ci->id3->offset; 78 bytesdone = ci->id3->offset;
79 ci->seek_buffer(0); 79 ci->seek_buffer(0);
80 80
81 ci->memset(&format, 0, sizeof(struct pcm_format)); 81 ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
82 82
83 /* set format */ 83 /* set format */
84 format.channels = 1; 84 format.channels = 1;
diff --git a/lib/rbcodec/codecs/wav.c b/lib/rbcodec/codecs/wav.c
index 3208e2b5b8..0441be78b8 100644
--- a/lib/rbcodec/codecs/wav.c
+++ b/lib/rbcodec/codecs/wav.c
@@ -94,7 +94,7 @@ static const struct pcm_codec *get_wave_codec(uint32_t formattag)
94 return 0; 94 return 0;
95} 95}
96 96
97static struct pcm_format format; 97static struct libpcm_pcm_format format;
98static uint32_t bytesdone; 98static uint32_t bytesdone;
99 99
100static bool set_msadpcm_coeffs(const uint8_t *buf) 100static bool set_msadpcm_coeffs(const uint8_t *buf)
@@ -202,7 +202,7 @@ enum codec_status codec_run(void)
202 ci->advance_buffer(12); 202 ci->advance_buffer(12);
203 203
204 firstblockposn = 12; 204 firstblockposn = 12;
205 ci->memset(&format, 0, sizeof(struct pcm_format)); 205 ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
206 format.is_signed = true; 206 format.is_signed = true;
207 format.is_little_endian = true; 207 format.is_little_endian = true;
208 208
diff --git a/lib/rbcodec/codecs/wav64.c b/lib/rbcodec/codecs/wav64.c
index 66bb3e3a11..a74c932e0e 100644
--- a/lib/rbcodec/codecs/wav64.c
+++ b/lib/rbcodec/codecs/wav64.c
@@ -94,7 +94,7 @@ static const struct pcm_codec *get_wave_codec(uint32_t formattag)
94 return 0; 94 return 0;
95} 95}
96 96
97static struct pcm_format format; 97static struct libpcm_pcm_format format;
98static uint32_t bytesdone; 98static uint32_t bytesdone;
99 99
100/* Read an unaligned 64-bit little endian unsigned integer from buffer. */ 100/* Read an unaligned 64-bit little endian unsigned integer from buffer. */
@@ -211,7 +211,7 @@ enum codec_status codec_run(void)
211 ci->advance_buffer(40); 211 ci->advance_buffer(40);
212 212
213 firstblockposn = 40; 213 firstblockposn = 40;
214 ci->memset(&format, 0, sizeof(struct pcm_format)); 214 ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
215 format.is_signed = true; 215 format.is_signed = true;
216 format.is_little_endian = true; 216 format.is_little_endian = true;
217 217