#include "mpg123lib_intern.h"
#include "sample.h"
#include "debug.h"
#include "swap_bytes_impl.h"
Go to the source code of this file.
|
static int | good_enc (const int enc) |
|
void attribute_align_arg | mpg123_rates (const long **list, size_t *number) |
|
void attribute_align_arg | mpg123_encodings (const int **list, size_t *number) |
|
int attribute_align_arg | mpg123_encsize (int encoding) |
|
static int | rate2num (mpg123_pars *mp, long r) |
|
static int | enc2num (int encoding) |
|
static int | cap_fit (mpg123_pars *p, struct audioformat *nf, int f0, int f2) |
|
static int | imin (int a, int b) |
|
static int | imax (int a, int b) |
|
static int | enc_chan_fit (mpg123_pars *p, long rate, struct audioformat *nnf, int f0, int f2, int try_float) |
|
int | frame_output_format (mpg123_handle *fr) |
|
int attribute_align_arg | mpg123_format_none (mpg123_handle *mh) |
|
int attribute_align_arg | mpg123_fmt_none (mpg123_pars *mp) |
|
int attribute_align_arg | mpg123_format_all (mpg123_handle *mh) |
|
int attribute_align_arg | mpg123_fmt_all (mpg123_pars *mp) |
|
int attribute_align_arg | mpg123_format2 (mpg123_handle *mh, long rate, int channels, int encodings) |
|
int attribute_align_arg | mpg123_format (mpg123_handle *mh, long rate, int channels, int encodings) |
|
int attribute_align_arg | mpg123_fmt2 (mpg123_pars *mp, long rate, int channels, int encodings) |
|
int attribute_align_arg | mpg123_fmt (mpg123_pars *mp, long rate, int channels, int encodings) |
|
int attribute_align_arg | mpg123_format_support (mpg123_handle *mh, long rate, int encoding) |
|
int attribute_align_arg | mpg123_fmt_support (mpg123_pars *mp, long rate, int encoding) |
|
void | invalidate_format (struct audioformat *af) |
|
off_t | decoder_synth_bytes (mpg123_handle *fr, off_t s) |
|
off_t | samples_to_bytes (mpg123_handle *fr, off_t s) |
|
off_t | bytes_to_samples (mpg123_handle *fr, off_t b) |
|
off_t | outblock_bytes (mpg123_handle *fr, off_t s) |
|
static void | chop_fourth_byte (struct outbuffer *buf) |
|
static void | conv_s32_to_u32 (struct outbuffer *buf) |
|
static void | conv_s16_to_u16 (struct outbuffer *buf) |
|
static void | conv_s16_to_f32 (struct outbuffer *buf) |
|
static void | conv_s16_to_s32 (struct outbuffer *buf) |
|
void | swap_endian (struct outbuffer *buf, int block) |
|
void | postprocess_buffer (mpg123_handle *fr) |
|
◆ ENCRANGE
◆ MPG123_FLOAT_ENC
◆ bytes_to_samples()
Definition at line 570 of file format.c.
572 return b / fr->
af.encsize / fr->
af.channels;
GLboolean GLboolean GLboolean b
◆ cap_fit()
◆ chop_fourth_byte()
Definition at line 590 of file format.c.
592 unsigned char *wpos =
buf->data;
593 unsigned char *rpos =
buf->data;
598 buf->fill = wpos-
buf->data;
GLenum GLuint GLenum GLsizei const GLchar * buf
Referenced by postprocess_buffer().
◆ conv_s16_to_f32()
Definition at line 635 of file format.c.
639 float *
out = (
float*)
buf->data;
GLuint GLuint GLsizei count
GLenum GLenum GLenum GLenum GLenum scale
GLenum GLuint GLenum GLsizei const GLchar * buf
static float(__cdecl *square_half_float)(float x
Referenced by postprocess_buffer().
◆ conv_s16_to_s32()
◆ conv_s16_to_u16()
Definition at line 623 of file format.c.
GLuint GLuint GLsizei count
unsigned short int uint16_t
GLenum GLuint GLenum GLsizei const GLchar * buf
Referenced by postprocess_buffer().
◆ conv_s32_to_u32()
◆ decoder_synth_bytes()
Definition at line 558 of file format.c.
560 return s * fr->
af.dec_encsize * fr->
af.channels;
◆ enc2num()
static int enc2num |
( |
int |
encoding | ) |
|
|
static |
◆ enc_chan_fit()
◆ frame_output_format()
Definition at line 226 of file format.c.
277 merror(
"Unable to set up output format! Constraints: %s%s%liHz." 296 , f0,
f2, try_float ))
299 , f0,
f2, try_float ))
331 for(
i=f0;
i<
f2;
i++)
for(rrn=rn-1; rrn>=0; --rrn)
342 for(
i=f0;
i<
f2;
i++)
for(rrn=rn-1; rrn>=0; --rrn)
350 merror(
"Unable to set up output format! Constraints: %s%s%li, %li or %liHz." 363 if(nf.rate == fr->
af.rate && nf.channels == fr->
af.channels && nf.encoding == fr->
af.encoding)
370 debug1(
"New format with %i channels!", nf.channels);
371 fr->
af.rate = nf.rate;
372 fr->
af.channels = nf.channels;
373 fr->
af.encoding = nf.encoding;
376 if(fr->
af.encsize < 1)
378 error1(
"Some unknown encoding??? (%i)", fr->
af.encoding);
387 if(fr->
af.encsize > 2)
392 switch(fr->
af.encoding)
407 fr->
af.dec_enc = fr->
af.encoding;
struct mpg123_pars_struct p
int attribute_align_arg mpg123_encsize(int encoding)
◆ good_enc()
◆ imax()
Definition at line 179 of file format.c.
181 return a >
b ?
a :
b;
GLboolean GLboolean GLboolean b
GLboolean GLboolean GLboolean GLboolean a
Referenced by pwlarc_intersect().
◆ imin()
◆ invalidate_format()
◆ outblock_bytes()
Definition at line 576 of file format.c.
580 : (fr->
af.encsize > fr->
af.dec_encsize
582 : fr->
af.dec_encsize);
◆ postprocess_buffer()
Definition at line 700 of file format.c.
708 switch(fr->
af.dec_enc)
712 switch(fr->
af.encoding)
729 switch(fr->
af.encoding)
764 #ifdef WORDS_BIGENDIAN
768 #ifdef WORDS_BIGENDIAN
struct mpg123_pars_struct p
int attribute_align_arg mpg123_encsize(int encoding)
◆ rate2num()
◆ samples_to_bytes()
Definition at line 565 of file format.c.
567 return s * fr->
af.encsize * fr->
af.channels;
◆ swap_endian()
Definition at line 689 of file format.c.
static unsigned int block
GLuint GLuint GLsizei count
GLenum GLuint GLenum GLsizei const GLchar * buf
static void swap_bytes(void *buf, size_t samplesize, size_t samplecount)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Referenced by postprocess_buffer().
◆ bufsizeerr
◆ enc_16bit_range
◆ enc_24bit_range
◆ enc_8bit_range
◆ enc_float_range
◆ good_encodings
◆ my_encodings
◆ my_rates
Initial value:=
{
8000, 11025, 12000,
16000, 22050, 24000,
32000, 44100, 48000,
}
Definition at line 33 of file format.c.
Referenced by frame_output_format(), mpg123_rates(), and rate2num().