35 lines
1.6 KiB
C
35 lines
1.6 KiB
C
#include <stdint.h>
|
|
#include <string.h>
|
|
|
|
#define BITS_TO_DIV(b) (float)((1 << (b - 1)) - 1)
|
|
|
|
void audio_multiple_channels_to_mono(float* buffer, size_t buffer_len, float* out, int channels);
|
|
|
|
void audio_multiple_channels_to_stereo(float* buffer, size_t buffer_len, float* out, int channels);
|
|
|
|
void audio_multiple_channels_to_mono_int32(int32_t* buffer, size_t buffer_len, int32_t* out, int channels);
|
|
|
|
void audio_multiple_channels_to_stereo_int32(int32_t* buffer, size_t buffer_len, int32_t* out, int channels);
|
|
|
|
void audio_int32_to_int16(int32_t* restrict data, size_t data_len, int16_t* restrict buffer, int bitDepth);
|
|
|
|
void audio_int32_to_bytes(int32_t* restrict data, size_t data_len, int8_t* restrict buffer, int bitDepth);
|
|
|
|
void audio_bytes_to_int32(int8_t* restrict data, size_t data_len, int32_t* restrict buffer, int bitDepth);
|
|
|
|
void audio_int32_to_float32(int32_t* restrict data, size_t data_len, float* restrict buffer, int bitDepth);
|
|
|
|
//special case
|
|
void audio_int24_to_float32(int8_t* restrict data, size_t data_len, float* restrict buffer, int bitDepth);
|
|
|
|
void audio_int16_to_float32(int16_t* restrict data, size_t data_len, float* restrict buffer, int bitDepth);
|
|
|
|
void audio_int8_to_float32(int8_t* restrict data, size_t data_len, float* restrict buffer, int bitDepth);
|
|
|
|
void audio_float32_to_int32(float* restrict data, size_t data_len, int32_t* restrict buffer, int bitDepth);
|
|
|
|
void audio_float32_to_int24(float* restrict data, size_t data_len, int8_t* restrict buffer);
|
|
|
|
void audio_float32_to_int16(float* restrict data, size_t data_len, int16_t* restrict buffer);
|
|
|
|
void audio_float32_to_int8(float* restrict data, size_t data_len, int8_t* restrict buffer); |