libpcm: Get unbranded structure tag out of my way.

No functional changes.

Change-Id: If372023cb605389a203a635b700eca20685ad49b
This commit is contained in:
Michael Sevakis 2017-11-06 20:06:08 -05:00
parent 1015e1f5ca
commit 826f99e187
16 changed files with 36 additions and 36 deletions

View file

@ -75,7 +75,7 @@ enum codec_status codec_main(enum codec_entry_call_reason reason)
/* this is called for each file to process */ /* this is called for each file to process */
enum codec_status codec_run(void) enum codec_status codec_run(void)
{ {
struct pcm_format format; struct libpcm_pcm_format format;
uint32_t bytesdone, decodedsamples; uint32_t bytesdone, decodedsamples;
/* rockbox: comment 'set but unused' variables /* rockbox: comment 'set but unused' variables
uint32_t num_sample_frames = 0; uint32_t num_sample_frames = 0;
@ -127,7 +127,7 @@ enum codec_status codec_run(void)
buf += 12; buf += 12;
n -= 12; n -= 12;
ci->memset(&format, 0, sizeof(struct pcm_format)); ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
format.is_signed = true; format.is_signed = true;
format.is_little_endian = false; format.is_little_endian = false;

View file

@ -88,7 +88,7 @@ static unsigned int get_be32(uint8_t *buf)
return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3]; return (buf[0] << 24) | (buf[1] << 16) | (buf[2] << 8) | buf[3];
} }
static int convert_au_format(unsigned int encoding, struct pcm_format *fmt) static int convert_au_format(unsigned int encoding, struct libpcm_pcm_format *fmt)
{ {
fmt->formattag = AU_FORMAT_UNSUPPORT; fmt->formattag = AU_FORMAT_UNSUPPORT;
if (encoding < 8) if (encoding < 8)
@ -119,7 +119,7 @@ enum codec_status codec_main(enum codec_entry_call_reason reason)
/* this is called for each file to process */ /* this is called for each file to process */
enum codec_status codec_run(void) enum codec_status codec_run(void)
{ {
struct pcm_format format; struct libpcm_pcm_format format;
uint32_t bytesdone, decodedsamples; uint32_t bytesdone, decodedsamples;
size_t n; size_t n;
int bufcount; int bufcount;
@ -142,7 +142,7 @@ enum codec_status codec_run(void)
param = ci->id3->elapsed; param = ci->id3->elapsed;
bytesdone = ci->id3->offset; bytesdone = ci->id3->offset;
ci->memset(&format, 0, sizeof(struct pcm_format)); ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
format.is_signed = true; format.is_signed = true;
format.is_little_endian = false; format.is_little_endian = false;

View file

@ -46,9 +46,9 @@ static const int index_table[] ICONST_ATTR = {
static struct adpcm_data cur_data; static struct adpcm_data cur_data;
static int blocksperchunk; static int blocksperchunk;
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
uint32_t max_chunk_count; uint32_t max_chunk_count;

View file

@ -35,9 +35,9 @@
* [3] ffmpeg source code, libavcodec/adpcm.c * [3] ffmpeg source code, libavcodec/adpcm.c
*/ */
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
fmt = format; fmt = format;

View file

@ -26,9 +26,9 @@
* IEEE float * IEEE float
*/ */
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
fmt = format; fmt = format;

View file

@ -106,9 +106,9 @@ static const int16_t ulaw2linear16[256] ICONST_ATTR = {
24, 16, 8, 0 24, 16, 8, 0
}; };
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
fmt = format; fmt = format;

View file

@ -32,9 +32,9 @@
#define DEC_DEPTH_32 (32 - PCM_OUTPUT_DEPTH) #define DEC_DEPTH_32 (32 - PCM_OUTPUT_DEPTH)
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
fmt = format; fmt = format;

View file

@ -37,14 +37,14 @@ static int16_t dec_coeff[2][2];
static uint16_t delta[2]; static uint16_t delta[2];
static int16_t sample[2][2]; static int16_t sample[2][2];
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
static const int16_t adaptation_table[] ICONST_ATTR = { static const int16_t adaptation_table[] ICONST_ATTR = {
230, 230, 230, 230, 307, 409, 512, 614, 230, 230, 230, 230, 307, 409, 512, 614,
768, 614, 512, 409, 307, 230, 230, 230 768, 614, 512, 409, 307, 230, 230, 230
}; };
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
fmt = format; fmt = format;

View file

@ -47,7 +47,7 @@ else if ((data) < (min)) data = min;
*/ */
#define MSADPCM_NUM_COEFF 7 #define MSADPCM_NUM_COEFF 7
struct pcm_format { struct libpcm_pcm_format {
/* /*
* RIFF: wFormatTag (in 'fmt ' chunk) * RIFF: wFormatTag (in 'fmt ' chunk)
* AIFF: compressionType (in 'COMM' chunk) * AIFF: compressionType (in 'COMM' chunk)
@ -138,7 +138,7 @@ struct pcm_codec {
* true: RIFF/AIFF header check OK * true: RIFF/AIFF header check OK
* false: RIFF/AIFF header check NG * false: RIFF/AIFF header check NG
*/ */
bool (*set_format)(struct pcm_format *format); bool (*set_format)(struct libpcm_pcm_format *format);
/* /*
* get seek position * get seek position

View file

@ -33,9 +33,9 @@
* [3] ffmpeg source code, libavcodec/adpcm.c * [3] ffmpeg source code, libavcodec/adpcm.c
*/ */
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
fmt = format; fmt = format;

View file

@ -45,11 +45,11 @@ static int blockbits = 0;
static int lastbytebits = 0; static int lastbytebits = 0;
static bool after_seek = false; static bool after_seek = false;
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
#define GET_SAMPLE_COUNT(s) ((((s) << 3) / fmt->channels - 22) / fmt->bitspersample + 1) #define GET_SAMPLE_COUNT(s) ((((s) << 3) / fmt->channels - 22) / fmt->bitspersample + 1)
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
fmt = format; fmt = format;

View file

@ -76,9 +76,9 @@ static bool has_block_header = false;
static struct adpcm_data cur_data; static struct adpcm_data cur_data;
static int blocksperchunk; static int blocksperchunk;
static struct pcm_format *fmt; static struct libpcm_pcm_format *fmt;
static bool set_format(struct pcm_format *format) static bool set_format(struct libpcm_pcm_format *format)
{ {
fmt = format; fmt = format;

View file

@ -134,7 +134,7 @@ static unsigned int search_chunk(const unsigned char *name, int nlen, off_t *pos
return 0; return 0;
} }
static bool parse_audio_track(struct pcm_format *fmt, unsigned int chunksize, off_t *pos) static bool parse_audio_track(struct libpcm_pcm_format *fmt, unsigned int chunksize, off_t *pos)
{ {
const unsigned char *buf; const unsigned char *buf;
size_t size; size_t size;
@ -185,7 +185,7 @@ static bool parse_audio_track(struct pcm_format *fmt, unsigned int chunksize, of
return true; return true;
} }
static bool parse_score_track(struct pcm_format *fmt, off_t *pos) static bool parse_score_track(struct libpcm_pcm_format *fmt, off_t *pos)
{ {
const unsigned char *buf; const unsigned char *buf;
unsigned int chunksize; unsigned int chunksize;
@ -277,13 +277,13 @@ static bool parse_score_track(struct pcm_format *fmt, off_t *pos)
return true; return true;
} }
static bool parse_header(struct pcm_format *fmt, off_t *pos) static bool parse_header(struct libpcm_pcm_format *fmt, off_t *pos)
{ {
const unsigned char *buf; const unsigned char *buf;
unsigned int chunksize; unsigned int chunksize;
size_t size; size_t size;
ci->memset(fmt, 0, sizeof(struct pcm_format)); ci->memset(fmt, 0, sizeof(struct libpcm_pcm_format));
/* check File Chunk and Contents Info Chunk */ /* check File Chunk and Contents Info Chunk */
buf = ci->request_buffer(&size, 16); buf = ci->request_buffer(&size, 16);
@ -319,7 +319,7 @@ static bool parse_header(struct pcm_format *fmt, off_t *pos)
return true; return true;
} }
static struct pcm_format format; static struct libpcm_pcm_format format;
static uint32_t bytesdone; static uint32_t bytesdone;
static uint8_t *read_buffer(size_t *realsize) static uint8_t *read_buffer(size_t *realsize)

View file

@ -30,7 +30,7 @@ CODEC_HEADER
static int32_t samples[PCM_SAMPLE_SIZE] IBSS_ATTR; static int32_t samples[PCM_SAMPLE_SIZE] IBSS_ATTR;
static struct pcm_format format; static struct libpcm_pcm_format format;
static uint32_t bytesdone; static uint32_t bytesdone;
static uint8_t *read_buffer(size_t *realsize) static uint8_t *read_buffer(size_t *realsize)
@ -78,7 +78,7 @@ enum codec_status codec_run(void)
bytesdone = ci->id3->offset; bytesdone = ci->id3->offset;
ci->seek_buffer(0); ci->seek_buffer(0);
ci->memset(&format, 0, sizeof(struct pcm_format)); ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
/* set format */ /* set format */
format.channels = 1; format.channels = 1;

View file

@ -94,7 +94,7 @@ static const struct pcm_codec *get_wave_codec(uint32_t formattag)
return 0; return 0;
} }
static struct pcm_format format; static struct libpcm_pcm_format format;
static uint32_t bytesdone; static uint32_t bytesdone;
static bool set_msadpcm_coeffs(const uint8_t *buf) static bool set_msadpcm_coeffs(const uint8_t *buf)
@ -202,7 +202,7 @@ enum codec_status codec_run(void)
ci->advance_buffer(12); ci->advance_buffer(12);
firstblockposn = 12; firstblockposn = 12;
ci->memset(&format, 0, sizeof(struct pcm_format)); ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
format.is_signed = true; format.is_signed = true;
format.is_little_endian = true; format.is_little_endian = true;

View file

@ -94,7 +94,7 @@ static const struct pcm_codec *get_wave_codec(uint32_t formattag)
return 0; return 0;
} }
static struct pcm_format format; static struct libpcm_pcm_format format;
static uint32_t bytesdone; static uint32_t bytesdone;
/* Read an unaligned 64-bit little endian unsigned integer from buffer. */ /* Read an unaligned 64-bit little endian unsigned integer from buffer. */
@ -211,7 +211,7 @@ enum codec_status codec_run(void)
ci->advance_buffer(40); ci->advance_buffer(40);
firstblockposn = 40; firstblockposn = 40;
ci->memset(&format, 0, sizeof(struct pcm_format)); ci->memset(&format, 0, sizeof(struct libpcm_pcm_format));
format.is_signed = true; format.is_signed = true;
format.is_little_endian = true; format.is_little_endian = true;