Classes | Macros | Typedefs | Enumerations | Functions | Variables
porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <math.h>
#include <limits.h>
Include dependency graph for porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Codebook
 
struct  CRCscan
 
union  float_conv
 
union  Floor
 
struct  Floor0
 
struct  Floor1
 
struct  Mapping
 
struct  MappingChannel
 
struct  Mode
 
struct  ProbedPage
 
struct  Residue
 
struct  stb_vorbis
 
struct  stb_vorbis_alloc
 
struct  stb_vorbis_comment
 
struct  stb_vorbis_info
 
struct  stbv__floor_ordering
 

Macros

#define __forceinline
 
#define ADDEND(SHIFT)   (((150-SHIFT) << 23) + (1 << 22))
 
#define array_size_required(count, size)   (count*(sizeof(void *)+(size)))
 
#define BUFFER_SIZE   32
 
#define BUFFER_SIZE   32
 
#define C   (PLAYBACK_LEFT | PLAYBACK_RIGHT | PLAYBACK_MONO)
 
#define CHECK(f)   ((void) 0)
 
#define check_endianness()
 
#define CODEBOOK_ELEMENT(c, off)   (c->multiplicands[off])
 
#define CODEBOOK_ELEMENT_BASE(c)   (0)
 
#define CODEBOOK_ELEMENT_FAST(c, off)   (c->multiplicands[off])
 
#define CRC32_POLY   0x04c11db7
 
#define DECODE(var, f, c)
 
#define DECODE_RAW(var, f, c)
 
#define DECODE_VQ(var, f, c)   DECODE_RAW(var,f,c)
 
#define EOP   (-1)
 
#define FALSE   0
 
#define FAST_HUFFMAN_TABLE_MASK   (FAST_HUFFMAN_TABLE_SIZE - 1)
 
#define FAST_HUFFMAN_TABLE_SIZE   (1 << STB_VORBIS_FAST_HUFFMAN_LENGTH)
 
#define FAST_SCALED_FLOAT_TO_INT(temp, x, s)   (temp.f = (x) + MAGIC(s), temp.i - ADDEND(s))
 
#define FASTDEF(x)   float_conv x
 
#define INVALID_BITS   (-1)
 
#define IS_PUSH_MODE(f)   ((f)->push_mode)
 
#define L   (PLAYBACK_LEFT | PLAYBACK_MONO)
 
#define LIBVORBIS_MDCT   0
 
#define LINE_OP(a, b)   a *= b
 
#define M_PI   3.14159265358979323846264f
 
#define MAGIC(SHIFT)   (1.5f * (1 << (23-SHIFT)) + 0.5f/(1 << SHIFT))
 
#define MAX_BLOCKSIZE   (1 << MAX_BLOCKSIZE_LOG)
 
#define MAX_BLOCKSIZE_LOG   13
 
#define NO_CODE   255
 
#define PAGEFLAG_continued_packet   1
 
#define PAGEFLAG_first_page   2
 
#define PAGEFLAG_last_page   4
 
#define PLAYBACK_LEFT   2
 
#define PLAYBACK_MONO   1
 
#define PLAYBACK_RIGHT   4
 
#define R   (PLAYBACK_RIGHT | PLAYBACK_MONO)
 
#define SAMPLE_unknown   0xffffffff
 
#define STB_VORBIS_ENDIAN   0
 
#define STB_VORBIS_FAST_HUFFMAN_LENGTH   10
 
#define STB_VORBIS_FAST_HUFFMAN_SHORT
 
#define STB_VORBIS_INCLUDE_STB_VORBIS_H
 
#define STB_VORBIS_MAX_CHANNELS   16
 
#define STB_VORBIS_PUSHDATA_CRC_COUNT   4
 
#define STBV_CDECL
 
#define temp_alloc(f, size)   (f->alloc.alloc_buffer ? setup_temp_malloc(f,size) : alloca(size))
 
#define temp_alloc_restore(f, p)   ((f)->temp_offset = (p))
 
#define temp_alloc_save(f)   ((f)->temp_offset)
 
#define temp_block_array(f, count, size)   make_block_array(temp_alloc(f,array_size_required(count,size)), count, size)
 
#define temp_free(f, p)   (void)0
 
#define TRUE   1
 
#define USE_MEMORY(z)   ((z)->stream)
 

Typedefs

typedef float codetype
 
typedef signed short int16
 
typedef signed int int32
 
typedef signed char int8
 
typedef struct stb_vorbis stb_vorbis
 
typedef char stb_vorbis_float_size_test[sizeof(float)==4 &&sizeof(int)==4]
 
typedef unsigned short uint16
 
typedef unsigned int uint32
 
typedef unsigned char uint8
 
typedef struct stb_vorbis vorb
 
typedef int16 YTYPE
 

Enumerations

enum  { VORBIS_packet_id = 1, VORBIS_packet_comment = 3, VORBIS_packet_setup = 5 }
 
enum  STBVorbisError {
  VORBIS__no_error, VORBIS_need_more_data =1, VORBIS_invalid_api_mixing, VORBIS_outofmem,
  VORBIS_feature_not_supported, VORBIS_too_many_channels, VORBIS_file_open_failure, VORBIS_seek_without_length,
  VORBIS_unexpected_eof =10, VORBIS_seek_invalid, VORBIS_invalid_setup =20, VORBIS_invalid_stream,
  VORBIS_missing_capture_pattern =30, VORBIS_invalid_stream_structure_version, VORBIS_continued_packet_flag_invalid, VORBIS_incorrect_stream_serial_number,
  VORBIS_invalid_first_page, VORBIS_bad_packet_type, VORBIS_cant_find_last_page, VORBIS_seek_failed,
  VORBIS_ogg_skeleton_not_supported, VORBIS__no_error, VORBIS_need_more_data =1, VORBIS_invalid_api_mixing,
  VORBIS_outofmem, VORBIS_feature_not_supported, VORBIS_too_many_channels, VORBIS_file_open_failure,
  VORBIS_seek_without_length, VORBIS_unexpected_eof =10, VORBIS_seek_invalid, VORBIS_invalid_setup =20,
  VORBIS_invalid_stream, VORBIS_missing_capture_pattern =30, VORBIS_invalid_stream_structure_version, VORBIS_continued_packet_flag_invalid,
  VORBIS_incorrect_stream_serial_number, VORBIS_invalid_first_page, VORBIS_bad_packet_type, VORBIS_cant_find_last_page,
  VORBIS_seek_failed, VORBIS_ogg_skeleton_not_supported, VORBIS__no_error, VORBIS_need_more_data =1,
  VORBIS_invalid_api_mixing, VORBIS_outofmem, VORBIS_feature_not_supported, VORBIS_too_many_channels,
  VORBIS_file_open_failure, VORBIS_seek_without_length, VORBIS_unexpected_eof =10, VORBIS_seek_invalid,
  VORBIS_invalid_setup =20, VORBIS_invalid_stream, VORBIS_missing_capture_pattern =30, VORBIS_invalid_stream_structure_version,
  VORBIS_continued_packet_flag_invalid, VORBIS_incorrect_stream_serial_number, VORBIS_invalid_first_page, VORBIS_bad_packet_type,
  VORBIS_cant_find_last_page, VORBIS_seek_failed, VORBIS_ogg_skeleton_not_supported, VORBIS__no_error,
  VORBIS_need_more_data =1, VORBIS_invalid_api_mixing, VORBIS_outofmem, VORBIS_feature_not_supported,
  VORBIS_too_many_channels, VORBIS_file_open_failure, VORBIS_seek_without_length, VORBIS_unexpected_eof =10,
  VORBIS_seek_invalid, VORBIS_invalid_setup =20, VORBIS_invalid_stream, VORBIS_missing_capture_pattern =30,
  VORBIS_invalid_stream_structure_version, VORBIS_continued_packet_flag_invalid, VORBIS_incorrect_stream_serial_number, VORBIS_invalid_first_page,
  VORBIS_bad_packet_type, VORBIS_cant_find_last_page, VORBIS_seek_failed, VORBIS_ogg_skeleton_not_supported,
  VORBIS__no_error, VORBIS_need_more_data =1, VORBIS_invalid_api_mixing, VORBIS_outofmem,
  VORBIS_feature_not_supported, VORBIS_too_many_channels, VORBIS_file_open_failure, VORBIS_seek_without_length,
  VORBIS_unexpected_eof =10, VORBIS_seek_invalid, VORBIS_invalid_setup =20, VORBIS_invalid_stream,
  VORBIS_missing_capture_pattern =30, VORBIS_invalid_stream_structure_version, VORBIS_continued_packet_flag_invalid, VORBIS_incorrect_stream_serial_number,
  VORBIS_invalid_first_page, VORBIS_bad_packet_type, VORBIS_cant_find_last_page, VORBIS_seek_failed,
  VORBIS_ogg_skeleton_not_supported
}
 

Functions

static void add_entry (Codebook *c, uint32 huff_code, int symbol, int count, int len, uint32 *values)
 
static unsigned int bit_reverse (unsigned int n)
 
static int capture_pattern (vorb *f)
 
static int codebook_decode (vorb *f, Codebook *c, float *output, int len)
 
static int codebook_decode_deinterleave_repeat (vorb *f, Codebook *c, float **outputs, int ch, int *c_inter_p, int *p_inter_p, int len, int total_decode)
 
static int codebook_decode_scalar_raw (vorb *f, Codebook *c)
 
static int codebook_decode_start (vorb *f, Codebook *c)
 
static int codebook_decode_step (vorb *f, Codebook *c, float *output, int len, int step)
 
static void compute_accelerated_huffman (Codebook *c)
 
static void compute_bitreverse (int n, uint16 *rev)
 
static int compute_codewords (Codebook *c, uint8 *len, int n, uint32 *values)
 
static void compute_samples (int mask, short *output, int num_c, float **data, int d_offset, int len)
 
static void compute_sorted_huffman (Codebook *c, uint8 *lengths, uint32 *values)
 
static void compute_stereo_samples (short *output, int num_c, float **data, int d_offset, int len)
 
static void compute_twiddle_factors (int n, float *A, float *B, float *C)
 
static void compute_window (int n, float *window)
 
static void convert_channels_short_interleaved (int buf_c, short *buffer, int data_c, float **data, int d_offset, int len)
 
static void convert_samples_short (int buf_c, short **buffer, int b_offset, int data_c, float **data, int d_offset, int samples)
 
static void copy_samples (short *dest, float *src, int len)
 
static void crc32_init (void)
 
static __forceinline uint32 crc32_update (uint32 crc, uint8 byte)
 
static void decode_residue (vorb *f, float *residue_buffers[], int ch, int n, int rn, uint8 *do_not_decode)
 
static int do_floor (vorb *f, Mapping *map, int i, int n, float *target, YTYPE *finalY, uint8 *step2_flag)
 
static __forceinline void draw_line (float *output, int x0, int y0, int x1, int y1, int n)
 
static int error (vorb *f, enum STBVorbisError e)
 
static float float32_unpack (uint32 x)
 
static void flush_packet (vorb *f)
 
static uint32 get32 (vorb *f)
 
static int get32_packet (vorb *f)
 
static uint8 get8 (vorb *z)
 
static int get8_packet (vorb *f)
 
static int get8_packet_raw (vorb *f)
 
static uint32 get_bits (vorb *f, int n)
 
static int get_seek_page_info (stb_vorbis *f, ProbedPage *z)
 
static float * get_window (vorb *f, int len)
 
static int getn (vorb *z, uint8 *data, int n)
 
static int go_to_page_before (stb_vorbis *f, unsigned int limit_offset)
 
static int ilog (int32 n)
 
static void imdct_step3_inner_r_loop (int lim, float *e, int d0, int k_off, float *A, int k1)
 
static void imdct_step3_inner_s_loop (int n, float *e, int i_off, int k_off, float *A, int a_off, int k0)
 
static void imdct_step3_inner_s_loop_ld654 (int n, float *e, int i_off, float *A, int base_n)
 
static void imdct_step3_iter0_loop (int n, float *e, int i_off, int k_off, float *A)
 
static int include_in_sort (Codebook *c, uint8 len)
 
static int init_blocksize (vorb *f, int b, int n)
 
static void inverse_mdct (float *buffer, int n, vorb *f, int blocktype)
 
static int is_whole_packet_present (stb_vorbis *f)
 
static __forceinline void iter_54 (float *z)
 
static int lookup1_values (int entries, int dim)
 
static void * make_block_array (void *mem, int count, int size)
 
static int maybe_start_packet (vorb *f)
 
static void neighbors (uint16 *x, int n, int *plow, int *phigh)
 
static int next_segment (vorb *f)
 
static int peek_decode_initial (vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode)
 
static int STBV_CDECL point_compare (const void *p, const void *q)
 
static int predict_point (int x, int x0, int x1, int y0, int y1)
 
static __forceinline void prep_huffman (vorb *f)
 
static int residue_decode (vorb *f, Codebook *book, float *target, int offset, int n, int rtype)
 
static int seek_to_sample_coarse (stb_vorbis *f, uint32 sample_number)
 
static int set_file_offset (stb_vorbis *f, unsigned int loc)
 
static void setup_free (vorb *f, void *p)
 
static void * setup_malloc (vorb *f, int sz)
 
static void setup_temp_free (vorb *f, void *p, int sz)
 
static void * setup_temp_malloc (vorb *f, int sz)
 
static void skip (vorb *z, int n)
 
static float square (float x)
 
static int start_decoder (vorb *f)
 
static int start_packet (vorb *f)
 
static int start_page (vorb *f)
 
static int start_page_no_capturepattern (vorb *f)
 
void stb_vorbis_close (stb_vorbis *f)
 
int stb_vorbis_decode_filename (const char *filename, int *channels, int *sample_rate, short **output)
 
int stb_vorbis_decode_frame_pushdata (stb_vorbis *f, const unsigned char *datablock, int datablock_length_in_bytes, int *channels, float ***output, int *samples)
 
int stb_vorbis_decode_memory (const unsigned char *mem, int len, int *channels, int *sample_rate, short **output)
 
void stb_vorbis_flush_pushdata (stb_vorbis *f)
 
stb_vorbis_comment stb_vorbis_get_comment (stb_vorbis *f)
 
int stb_vorbis_get_error (stb_vorbis *f)
 
unsigned int stb_vorbis_get_file_offset (stb_vorbis *f)
 
int stb_vorbis_get_frame_float (stb_vorbis *f, int *channels, float ***output)
 
int stb_vorbis_get_frame_short (stb_vorbis *f, int num_c, short **buffer, int num_samples)
 
int stb_vorbis_get_frame_short_interleaved (stb_vorbis *f, int num_c, short *buffer, int num_shorts)
 
stb_vorbis_info stb_vorbis_get_info (stb_vorbis *f)
 
int stb_vorbis_get_sample_offset (stb_vorbis *f)
 
int stb_vorbis_get_samples_float (stb_vorbis *f, int channels, float **buffer, int num_samples)
 
int stb_vorbis_get_samples_float_interleaved (stb_vorbis *f, int channels, float *buffer, int num_floats)
 
int stb_vorbis_get_samples_short (stb_vorbis *f, int channels, short **buffer, int num_samples)
 
int stb_vorbis_get_samples_short_interleaved (stb_vorbis *f, int channels, short *buffer, int num_shorts)
 
stb_vorbisstb_vorbis_open_file (FILE *f, int close_handle_on_close, int *error, const stb_vorbis_alloc *alloc_buffer)
 
stb_vorbisstb_vorbis_open_file_section (FILE *f, int close_handle_on_close, int *error, const stb_vorbis_alloc *alloc_buffer, unsigned int len)
 
stb_vorbisstb_vorbis_open_filename (const char *filename, int *error, const stb_vorbis_alloc *alloc_buffer)
 
stb_vorbisstb_vorbis_open_memory (const unsigned char *data, int len, int *error, const stb_vorbis_alloc *alloc_buffer)
 
stb_vorbisstb_vorbis_open_pushdata (const unsigned char *datablock, int datablock_length_in_bytes, int *datablock_memory_consumed_in_bytes, int *error, const stb_vorbis_alloc *alloc_buffer)
 
int stb_vorbis_seek (stb_vorbis *f, unsigned int sample_number)
 
int stb_vorbis_seek_frame (stb_vorbis *f, unsigned int sample_number)
 
int stb_vorbis_seek_start (stb_vorbis *f)
 
unsigned int stb_vorbis_stream_length_in_samples (stb_vorbis *f)
 
float stb_vorbis_stream_length_in_seconds (stb_vorbis *f)
 
static int STBV_CDECL uint32_compare (const void *p, const void *q)
 
static stb_vorbisvorbis_alloc (stb_vorbis *f)
 
static int vorbis_decode_initial (vorb *f, int *p_left_start, int *p_left_end, int *p_right_start, int *p_right_end, int *mode)
 
static int vorbis_decode_packet (vorb *f, int *len, int *p_left, int *p_right)
 
static int vorbis_decode_packet_rest (vorb *f, int *len, Mode *m, int left_start, int left_end, int right_start, int right_end, int *p_left)
 
static void vorbis_deinit (stb_vorbis *p)
 
static uint32 vorbis_find_page (stb_vorbis *f, uint32 *end, uint32 *last)
 
static int vorbis_finish_frame (stb_vorbis *f, int len, int left, int right)
 
static void vorbis_init (stb_vorbis *p, const stb_vorbis_alloc *z)
 
static int vorbis_pump_first_frame (stb_vorbis *f)
 
static int vorbis_search_for_page_pushdata (vorb *f, uint8 *data, int data_len)
 
static int vorbis_validate (uint8 *data)
 

Variables

static int8 channel_position [7][6]
 
static uint32 crc_table [256]
 
static float inverse_db_table [256]
 
static uint8 ogg_page_header [4] = { 0x4f, 0x67, 0x67, 0x53 }
 

Macro Definition Documentation

◆ __forceinline

#define __forceinline

◆ ADDEND

#define ADDEND (   SHIFT)    (((150-SHIFT) << 23) + (1 << 22))

◆ array_size_required

#define array_size_required (   count,
  size 
)    (count*(sizeof(void *)+(size)))

◆ BUFFER_SIZE [1/2]

#define BUFFER_SIZE   32

◆ BUFFER_SIZE [2/2]

#define BUFFER_SIZE   32

◆ C

◆ CHECK

#define CHECK (   f)    ((void) 0)

◆ check_endianness

#define check_endianness ( )

◆ CODEBOOK_ELEMENT

#define CODEBOOK_ELEMENT (   c,
  off 
)    (c->multiplicands[off])

◆ CODEBOOK_ELEMENT_BASE

#define CODEBOOK_ELEMENT_BASE (   c)    (0)

◆ CODEBOOK_ELEMENT_FAST

#define CODEBOOK_ELEMENT_FAST (   c,
  off 
)    (c->multiplicands[off])

◆ CRC32_POLY

#define CRC32_POLY   0x04c11db7

◆ DECODE

#define DECODE (   var,
  f,
 
)
Value:
DECODE_RAW(var,f,c) \
if (c->sparse) var = c->sorted_values[var];

Definition at line 1736 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c.

◆ DECODE_RAW

#define DECODE_RAW (   var,
  f,
 
)
Value:
if (f->valid_bits < STB_VORBIS_FAST_HUFFMAN_LENGTH) \
prep_huffman(f); \
var = f->acc & FAST_HUFFMAN_TABLE_MASK; \
var = c->fast_huffman[var]; \
if (var >= 0) { \
int n = c->codeword_lengths[var]; \
f->acc >>= n; \
f->valid_bits -= n; \
if (f->valid_bits < 0) { f->valid_bits = 0; var = -1; } \
} else { \
}

Definition at line 1699 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c.

◆ DECODE_VQ

#define DECODE_VQ (   var,
  f,
 
)    DECODE_RAW(var,f,c)

◆ EOP

#define EOP   (-1)

◆ FALSE

#define FALSE   0

◆ FAST_HUFFMAN_TABLE_MASK

#define FAST_HUFFMAN_TABLE_MASK   (FAST_HUFFMAN_TABLE_SIZE - 1)

◆ FAST_HUFFMAN_TABLE_SIZE

#define FAST_HUFFMAN_TABLE_SIZE   (1 << STB_VORBIS_FAST_HUFFMAN_LENGTH)

◆ FAST_SCALED_FLOAT_TO_INT

#define FAST_SCALED_FLOAT_TO_INT (   temp,
  x,
  s 
)    (temp.f = (x) + MAGIC(s), temp.i - ADDEND(s))

◆ FASTDEF

#define FASTDEF (   x)    float_conv x

◆ INVALID_BITS

#define INVALID_BITS   (-1)

◆ IS_PUSH_MODE

#define IS_PUSH_MODE (   f)    ((f)->push_mode)

◆ L

#define L   (PLAYBACK_LEFT | PLAYBACK_MONO)

◆ LIBVORBIS_MDCT

#define LIBVORBIS_MDCT   0

◆ LINE_OP

#define LINE_OP (   a,
 
)    a *= b

◆ M_PI

#define M_PI   3.14159265358979323846264f

◆ MAGIC

#define MAGIC (   SHIFT)    (1.5f * (1 << (23-SHIFT)) + 0.5f/(1 << SHIFT))

◆ MAX_BLOCKSIZE

#define MAX_BLOCKSIZE   (1 << MAX_BLOCKSIZE_LOG)

◆ MAX_BLOCKSIZE_LOG

#define MAX_BLOCKSIZE_LOG   13

◆ NO_CODE

#define NO_CODE   255

◆ PAGEFLAG_continued_packet

#define PAGEFLAG_continued_packet   1

◆ PAGEFLAG_first_page

#define PAGEFLAG_first_page   2

◆ PAGEFLAG_last_page

#define PAGEFLAG_last_page   4

◆ PLAYBACK_LEFT

#define PLAYBACK_LEFT   2

◆ PLAYBACK_MONO

#define PLAYBACK_MONO   1

◆ PLAYBACK_RIGHT

#define PLAYBACK_RIGHT   4

◆ R

#define R   (PLAYBACK_RIGHT | PLAYBACK_MONO)

◆ SAMPLE_unknown

#define SAMPLE_unknown   0xffffffff

◆ STB_VORBIS_ENDIAN

#define STB_VORBIS_ENDIAN   0

◆ STB_VORBIS_FAST_HUFFMAN_LENGTH

#define STB_VORBIS_FAST_HUFFMAN_LENGTH   10

◆ STB_VORBIS_FAST_HUFFMAN_SHORT

#define STB_VORBIS_FAST_HUFFMAN_SHORT

◆ STB_VORBIS_INCLUDE_STB_VORBIS_H

#define STB_VORBIS_INCLUDE_STB_VORBIS_H

◆ STB_VORBIS_MAX_CHANNELS

#define STB_VORBIS_MAX_CHANNELS   16

◆ STB_VORBIS_PUSHDATA_CRC_COUNT

#define STB_VORBIS_PUSHDATA_CRC_COUNT   4

◆ STBV_CDECL

#define STBV_CDECL

◆ temp_alloc

#define temp_alloc (   f,
  size 
)    (f->alloc.alloc_buffer ? setup_temp_malloc(f,size) : alloca(size))

◆ temp_alloc_restore

#define temp_alloc_restore (   f,
 
)    ((f)->temp_offset = (p))

◆ temp_alloc_save

#define temp_alloc_save (   f)    ((f)->temp_offset)

◆ temp_block_array

#define temp_block_array (   f,
  count,
  size 
)    make_block_array(temp_alloc(f,array_size_required(count,size)), count, size)

◆ temp_free

#define temp_free (   f,
 
)    (void)0

◆ TRUE

#define TRUE   1

◆ USE_MEMORY

#define USE_MEMORY (   z)    ((z)->stream)

Typedef Documentation

◆ codetype

typedef float codetype

◆ int16

typedef signed short int16

◆ int32

typedef signed int int32

◆ int8

typedef signed char int8

◆ stb_vorbis

typedef struct stb_vorbis stb_vorbis

◆ stb_vorbis_float_size_test

typedef char stb_vorbis_float_size_test[sizeof(float)==4 &&sizeof(int)==4]

◆ uint16

typedef unsigned short uint16

◆ uint32

typedef unsigned int uint32

◆ uint8

typedef unsigned char uint8

◆ vorb

typedef struct stb_vorbis vorb

◆ YTYPE

typedef int16 YTYPE

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
VORBIS_packet_id 
VORBIS_packet_comment 
VORBIS_packet_setup 

Definition at line 1631 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c.

◆ STBVorbisError

Enumerator
VORBIS__no_error 
VORBIS_need_more_data 
VORBIS_invalid_api_mixing 
VORBIS_outofmem 
VORBIS_feature_not_supported 
VORBIS_too_many_channels 
VORBIS_file_open_failure 
VORBIS_seek_without_length 
VORBIS_unexpected_eof 
VORBIS_seek_invalid 
VORBIS_invalid_setup 
VORBIS_invalid_stream 
VORBIS_missing_capture_pattern 
VORBIS_invalid_stream_structure_version 
VORBIS_continued_packet_flag_invalid 
VORBIS_incorrect_stream_serial_number 
VORBIS_invalid_first_page 
VORBIS_bad_packet_type 
VORBIS_cant_find_last_page 
VORBIS_seek_failed 
VORBIS_ogg_skeleton_not_supported 
VORBIS__no_error 
VORBIS_need_more_data 
VORBIS_invalid_api_mixing 
VORBIS_outofmem 
VORBIS_feature_not_supported 
VORBIS_too_many_channels 
VORBIS_file_open_failure 
VORBIS_seek_without_length 
VORBIS_unexpected_eof 
VORBIS_seek_invalid 
VORBIS_invalid_setup 
VORBIS_invalid_stream 
VORBIS_missing_capture_pattern 
VORBIS_invalid_stream_structure_version 
VORBIS_continued_packet_flag_invalid 
VORBIS_incorrect_stream_serial_number 
VORBIS_invalid_first_page 
VORBIS_bad_packet_type 
VORBIS_cant_find_last_page 
VORBIS_seek_failed 
VORBIS_ogg_skeleton_not_supported 
VORBIS__no_error 
VORBIS_need_more_data 
VORBIS_invalid_api_mixing 
VORBIS_outofmem 
VORBIS_feature_not_supported 
VORBIS_too_many_channels 
VORBIS_file_open_failure 
VORBIS_seek_without_length 
VORBIS_unexpected_eof 
VORBIS_seek_invalid 
VORBIS_invalid_setup 
VORBIS_invalid_stream 
VORBIS_missing_capture_pattern 
VORBIS_invalid_stream_structure_version 
VORBIS_continued_packet_flag_invalid 
VORBIS_incorrect_stream_serial_number 
VORBIS_invalid_first_page 
VORBIS_bad_packet_type 
VORBIS_cant_find_last_page 
VORBIS_seek_failed 
VORBIS_ogg_skeleton_not_supported 
VORBIS__no_error 
VORBIS_need_more_data 
VORBIS_invalid_api_mixing 
VORBIS_outofmem 
VORBIS_feature_not_supported 
VORBIS_too_many_channels 
VORBIS_file_open_failure 
VORBIS_seek_without_length 
VORBIS_unexpected_eof 
VORBIS_seek_invalid 
VORBIS_invalid_setup 
VORBIS_invalid_stream 
VORBIS_missing_capture_pattern 
VORBIS_invalid_stream_structure_version 
VORBIS_continued_packet_flag_invalid 
VORBIS_incorrect_stream_serial_number 
VORBIS_invalid_first_page 
VORBIS_bad_packet_type 
VORBIS_cant_find_last_page 
VORBIS_seek_failed 
VORBIS_ogg_skeleton_not_supported 
VORBIS__no_error 
VORBIS_need_more_data 
VORBIS_invalid_api_mixing 
VORBIS_outofmem 
VORBIS_feature_not_supported 
VORBIS_too_many_channels 
VORBIS_file_open_failure 
VORBIS_seek_without_length 
VORBIS_unexpected_eof 
VORBIS_seek_invalid 
VORBIS_invalid_setup 
VORBIS_invalid_stream 
VORBIS_missing_capture_pattern 
VORBIS_invalid_stream_structure_version 
VORBIS_continued_packet_flag_invalid 
VORBIS_incorrect_stream_serial_number 
VORBIS_invalid_first_page 
VORBIS_bad_packet_type 
VORBIS_cant_find_last_page 
VORBIS_seek_failed 
VORBIS_ogg_skeleton_not_supported 

Definition at line 363 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c.

Function Documentation

◆ add_entry()

static void add_entry ( Codebook c,
uint32  huff_code,
int  symbol,
int  count,
int  len,
uint32 values 
)
static

◆ bit_reverse()

static unsigned int bit_reverse ( unsigned int  n)
static

◆ capture_pattern()

static int capture_pattern ( vorb f)
static

◆ codebook_decode()

static int codebook_decode ( vorb f,
Codebook c,
float *  output,
int  len 
)
static

◆ codebook_decode_deinterleave_repeat()

static int codebook_decode_deinterleave_repeat ( vorb f,
Codebook c,
float **  outputs,
int  ch,
int *  c_inter_p,
int *  p_inter_p,
int  len,
int  total_decode 
)
static

◆ codebook_decode_scalar_raw()

static int codebook_decode_scalar_raw ( vorb f,
Codebook c 
)
static

◆ codebook_decode_start()

static int codebook_decode_start ( vorb f,
Codebook c 
)
static

◆ codebook_decode_step()

static int codebook_decode_step ( vorb f,
Codebook c,
float *  output,
int  len,
int  step 
)
static

◆ compute_accelerated_huffman()

static void compute_accelerated_huffman ( Codebook c)
static

◆ compute_bitreverse()

static void compute_bitreverse ( int  n,
uint16 rev 
)
static

◆ compute_codewords()

static int compute_codewords ( Codebook c,
uint8 len,
int  n,
uint32 values 
)
static

◆ compute_samples()

static void compute_samples ( int  mask,
short *  output,
int  num_c,
float **  data,
int  d_offset,
int  len 
)
static

◆ compute_sorted_huffman()

static void compute_sorted_huffman ( Codebook c,
uint8 lengths,
uint32 values 
)
static

◆ compute_stereo_samples()

static void compute_stereo_samples ( short *  output,
int  num_c,
float **  data,
int  d_offset,
int  len 
)
static

◆ compute_twiddle_factors()

static void compute_twiddle_factors ( int  n,
float *  A,
float *  B,
float *  C 
)
static

◆ compute_window()

static void compute_window ( int  n,
float *  window 
)
static

◆ convert_channels_short_interleaved()

static void convert_channels_short_interleaved ( int  buf_c,
short *  buffer,
int  data_c,
float **  data,
int  d_offset,
int  len 
)
static

◆ convert_samples_short()

static void convert_samples_short ( int  buf_c,
short **  buffer,
int  b_offset,
int  data_c,
float **  data,
int  d_offset,
int  samples 
)
static

◆ copy_samples()

static void copy_samples ( short *  dest,
float *  src,
int  len 
)
static

◆ crc32_init()

static void crc32_init ( void  )
static

◆ crc32_update()

static __forceinline uint32 crc32_update ( uint32  crc,
uint8  byte 
)
static

◆ decode_residue()

static void decode_residue ( vorb f,
float *  residue_buffers[],
int  ch,
int  n,
int  rn,
uint8 do_not_decode 
)
static

◆ do_floor()

static int do_floor ( vorb f,
Mapping map,
int  i,
int  n,
float *  target,
YTYPE finalY,
uint8 step2_flag 
)
static

◆ draw_line()

static __forceinline void draw_line ( float *  output,
int  x0,
int  y0,
int  x1,
int  y1,
int  n 
)
static

◆ error()

static int error ( vorb f,
enum STBVorbisError  e 
)
static

◆ float32_unpack()

static float float32_unpack ( uint32  x)
static

◆ flush_packet()

static void flush_packet ( vorb f)
static

◆ get32()

static uint32 get32 ( vorb f)
static

◆ get32_packet()

static int get32_packet ( vorb f)
static

◆ get8()

static uint8 get8 ( vorb z)
static

◆ get8_packet()

static int get8_packet ( vorb f)
static

◆ get8_packet_raw()

static int get8_packet_raw ( vorb f)
static

◆ get_bits()

static uint32 get_bits ( vorb f,
int  n 
)
static

◆ get_seek_page_info()

static int get_seek_page_info ( stb_vorbis f,
ProbedPage z 
)
static

◆ get_window()

static float* get_window ( vorb f,
int  len 
)
static

◆ getn()

static int getn ( vorb z,
uint8 data,
int  n 
)
static

◆ go_to_page_before()

static int go_to_page_before ( stb_vorbis f,
unsigned int  limit_offset 
)
static

◆ ilog()

static int ilog ( int32  n)
static

◆ imdct_step3_inner_r_loop()

static void imdct_step3_inner_r_loop ( int  lim,
float *  e,
int  d0,
int  k_off,
float *  A,
int  k1 
)
static

◆ imdct_step3_inner_s_loop()

static void imdct_step3_inner_s_loop ( int  n,
float *  e,
int  i_off,
int  k_off,
float *  A,
int  a_off,
int  k0 
)
static

◆ imdct_step3_inner_s_loop_ld654()

static void imdct_step3_inner_s_loop_ld654 ( int  n,
float *  e,
int  i_off,
float *  A,
int  base_n 
)
static

◆ imdct_step3_iter0_loop()

static void imdct_step3_iter0_loop ( int  n,
float *  e,
int  i_off,
int  k_off,
float *  A 
)
static

◆ include_in_sort()

static int include_in_sort ( Codebook c,
uint8  len 
)
static

◆ init_blocksize()

static int init_blocksize ( vorb f,
int  b,
int  n 
)
static

◆ inverse_mdct()

static void inverse_mdct ( float *  buffer,
int  n,
vorb f,
int  blocktype 
)
static

◆ is_whole_packet_present()

static int is_whole_packet_present ( stb_vorbis f)
static

◆ iter_54()

static __forceinline void iter_54 ( float *  z)
static

◆ lookup1_values()

static int lookup1_values ( int  entries,
int  dim 
)
static

◆ make_block_array()

static void* make_block_array ( void *  mem,
int  count,
int  size 
)
static

◆ maybe_start_packet()

static int maybe_start_packet ( vorb f)
static

◆ neighbors()

static void neighbors ( uint16 x,
int  n,
int *  plow,
int *  phigh 
)
static

◆ next_segment()

static int next_segment ( vorb f)
static

◆ peek_decode_initial()

static int peek_decode_initial ( vorb f,
int *  p_left_start,
int *  p_left_end,
int *  p_right_start,
int *  p_right_end,
int *  mode 
)
static

◆ point_compare()

static int STBV_CDECL point_compare ( const void *  p,
const void *  q 
)
static

◆ predict_point()

static int predict_point ( int  x,
int  x0,
int  x1,
int  y0,
int  y1 
)
static

◆ prep_huffman()

static __forceinline void prep_huffman ( vorb f)
static

◆ residue_decode()

static int residue_decode ( vorb f,
Codebook book,
float *  target,
int  offset,
int  n,
int  rtype 
)
static

◆ seek_to_sample_coarse()

static int seek_to_sample_coarse ( stb_vorbis f,
uint32  sample_number 
)
static

◆ set_file_offset()

static int set_file_offset ( stb_vorbis f,
unsigned int  loc 
)
static

◆ setup_free()

static void setup_free ( vorb f,
void *  p 
)
static

◆ setup_malloc()

static void* setup_malloc ( vorb f,
int  sz 
)
static

◆ setup_temp_free()

static void setup_temp_free ( vorb f,
void *  p,
int  sz 
)
static

◆ setup_temp_malloc()

static void* setup_temp_malloc ( vorb f,
int  sz 
)
static

◆ skip()

static void skip ( vorb z,
int  n 
)
static

◆ square()

static float square ( float  x)
static

◆ start_decoder()

static int start_decoder ( vorb f)
static

◆ start_packet()

static int start_packet ( vorb f)
static

◆ start_page()

static int start_page ( vorb f)
static

◆ start_page_no_capturepattern()

static int start_page_no_capturepattern ( vorb f)
static

◆ stb_vorbis_close()

void stb_vorbis_close ( stb_vorbis f)

◆ stb_vorbis_decode_filename()

int stb_vorbis_decode_filename ( const char *  filename,
int *  channels,
int *  sample_rate,
short **  output 
)

◆ stb_vorbis_decode_frame_pushdata()

int stb_vorbis_decode_frame_pushdata ( stb_vorbis f,
const unsigned char *  datablock,
int  datablock_length_in_bytes,
int *  channels,
float ***  output,
int *  samples 
)

◆ stb_vorbis_decode_memory()

int stb_vorbis_decode_memory ( const unsigned char *  mem,
int  len,
int *  channels,
int *  sample_rate,
short **  output 
)

◆ stb_vorbis_flush_pushdata()

void stb_vorbis_flush_pushdata ( stb_vorbis f)

◆ stb_vorbis_get_comment()

stb_vorbis_comment stb_vorbis_get_comment ( stb_vorbis f)

◆ stb_vorbis_get_error()

int stb_vorbis_get_error ( stb_vorbis f)

◆ stb_vorbis_get_file_offset()

unsigned int stb_vorbis_get_file_offset ( stb_vorbis f)

◆ stb_vorbis_get_frame_float()

int stb_vorbis_get_frame_float ( stb_vorbis f,
int *  channels,
float ***  output 
)

◆ stb_vorbis_get_frame_short()

int stb_vorbis_get_frame_short ( stb_vorbis f,
int  num_c,
short **  buffer,
int  num_samples 
)

◆ stb_vorbis_get_frame_short_interleaved()

int stb_vorbis_get_frame_short_interleaved ( stb_vorbis f,
int  num_c,
short *  buffer,
int  num_shorts 
)

◆ stb_vorbis_get_info()

stb_vorbis_info stb_vorbis_get_info ( stb_vorbis f)

◆ stb_vorbis_get_sample_offset()

int stb_vorbis_get_sample_offset ( stb_vorbis f)

◆ stb_vorbis_get_samples_float()

int stb_vorbis_get_samples_float ( stb_vorbis f,
int  channels,
float **  buffer,
int  num_samples 
)

◆ stb_vorbis_get_samples_float_interleaved()

int stb_vorbis_get_samples_float_interleaved ( stb_vorbis f,
int  channels,
float *  buffer,
int  num_floats 
)

◆ stb_vorbis_get_samples_short()

int stb_vorbis_get_samples_short ( stb_vorbis f,
int  channels,
short **  buffer,
int  num_samples 
)

◆ stb_vorbis_get_samples_short_interleaved()

int stb_vorbis_get_samples_short_interleaved ( stb_vorbis f,
int  channels,
short *  buffer,
int  num_shorts 
)

◆ stb_vorbis_open_file()

stb_vorbis * stb_vorbis_open_file ( FILE *  f,
int  close_handle_on_close,
int *  error,
const stb_vorbis_alloc alloc_buffer 
)

◆ stb_vorbis_open_file_section()

stb_vorbis * stb_vorbis_open_file_section ( FILE *  f,
int  close_handle_on_close,
int *  error,
const stb_vorbis_alloc alloc_buffer,
unsigned int  len 
)

◆ stb_vorbis_open_filename()

stb_vorbis * stb_vorbis_open_filename ( const char *  filename,
int *  error,
const stb_vorbis_alloc alloc_buffer 
)

◆ stb_vorbis_open_memory()

stb_vorbis * stb_vorbis_open_memory ( const unsigned char *  data,
int  len,
int *  error,
const stb_vorbis_alloc alloc_buffer 
)

◆ stb_vorbis_open_pushdata()

stb_vorbis * stb_vorbis_open_pushdata ( const unsigned char *  datablock,
int  datablock_length_in_bytes,
int *  datablock_memory_consumed_in_bytes,
int *  error,
const stb_vorbis_alloc alloc_buffer 
)

◆ stb_vorbis_seek()

int stb_vorbis_seek ( stb_vorbis f,
unsigned int  sample_number 
)

◆ stb_vorbis_seek_frame()

int stb_vorbis_seek_frame ( stb_vorbis f,
unsigned int  sample_number 
)

◆ stb_vorbis_seek_start()

int stb_vorbis_seek_start ( stb_vorbis f)

◆ stb_vorbis_stream_length_in_samples()

unsigned int stb_vorbis_stream_length_in_samples ( stb_vorbis f)

◆ stb_vorbis_stream_length_in_seconds()

float stb_vorbis_stream_length_in_seconds ( stb_vorbis f)

◆ uint32_compare()

static int STBV_CDECL uint32_compare ( const void *  p,
const void *  q 
)
static

◆ vorbis_alloc()

static stb_vorbis* vorbis_alloc ( stb_vorbis f)
static

◆ vorbis_decode_initial()

static int vorbis_decode_initial ( vorb f,
int *  p_left_start,
int *  p_left_end,
int *  p_right_start,
int *  p_right_end,
int *  mode 
)
static

◆ vorbis_decode_packet()

static int vorbis_decode_packet ( vorb f,
int *  len,
int *  p_left,
int *  p_right 
)
static

◆ vorbis_decode_packet_rest()

static int vorbis_decode_packet_rest ( vorb f,
int *  len,
Mode m,
int  left_start,
int  left_end,
int  right_start,
int  right_end,
int *  p_left 
)
static

◆ vorbis_deinit()

static void vorbis_deinit ( stb_vorbis p)
static

◆ vorbis_find_page()

static uint32 vorbis_find_page ( stb_vorbis f,
uint32 end,
uint32 last 
)
static

◆ vorbis_finish_frame()

static int vorbis_finish_frame ( stb_vorbis f,
int  len,
int  left,
int  right 
)
static

◆ vorbis_init()

static void vorbis_init ( stb_vorbis p,
const stb_vorbis_alloc z 
)
static

◆ vorbis_pump_first_frame()

static int vorbis_pump_first_frame ( stb_vorbis f)
static

◆ vorbis_search_for_page_pushdata()

static int vorbis_search_for_page_pushdata ( vorb f,
uint8 data,
int  data_len 
)
static

◆ vorbis_validate()

static int vorbis_validate ( uint8 data)
static

Variable Documentation

◆ channel_position

int8 channel_position[7][6]
static
Initial value:
=
{
{ 0 },
{ C },
{ L, R },
{ L, C, R },
{ L, R, L, R },
{ L, C, R, L, R },
{ L, C, R, L, R, C },
}

Definition at line 5106 of file porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c.

◆ crc_table

uint32 crc_table[256]
static

◆ inverse_db_table

float inverse_db_table[256]
static

◆ ogg_page_header

uint8 ogg_page_header[4] = { 0x4f, 0x67, 0x67, 0x53 }
static
R
#define R
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:5104
DECODE_RAW
#define DECODE_RAW(var, f, c)
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:1699
C
#define C
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:5103
f
f
codebook_decode_scalar_raw
static int codebook_decode_scalar_raw(vorb *f, Codebook *c)
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:1638
L
#define L
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:5102
STB_VORBIS_FAST_HUFFMAN_LENGTH
#define STB_VORBIS_FAST_HUFFMAN_LENGTH
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:475
FAST_HUFFMAN_TABLE_MASK
#define FAST_HUFFMAN_TABLE_MASK
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/stb_vorbis.c:661


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:15:00