mirror of
https://github.com/libretro/RetroArch
synced 2025-04-03 10:21:31 +00:00
turn lots of audio functions static
This commit is contained in:
parent
f5832b17ab
commit
129e73c588
16
retroarch.c
16
retroarch.c
@ -5356,12 +5356,12 @@ const char *audio_driver_mixer_get_stream_name(unsigned i)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* compute_audio_buffer_statistics:
|
* audio_compute_buffer_statistics:
|
||||||
*
|
*
|
||||||
* Computes audio buffer statistics.
|
* Computes audio buffer statistics.
|
||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
bool compute_audio_buffer_statistics(audio_statistics_t *stats)
|
static bool audio_compute_buffer_statistics(audio_statistics_t *stats)
|
||||||
{
|
{
|
||||||
unsigned i, low_water_size, high_water_size, avg, stddev;
|
unsigned i, low_water_size, high_water_size, avg, stddev;
|
||||||
uint64_t accum = 0;
|
uint64_t accum = 0;
|
||||||
@ -5427,7 +5427,7 @@ bool compute_audio_buffer_statistics(audio_statistics_t *stats)
|
|||||||
static void report_audio_buffer_statistics(void)
|
static void report_audio_buffer_statistics(void)
|
||||||
{
|
{
|
||||||
audio_statistics_t audio_stats = {0.0f};
|
audio_statistics_t audio_stats = {0.0f};
|
||||||
if (!compute_audio_buffer_statistics(&audio_stats))
|
if (!audio_compute_buffer_statistics(&audio_stats))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@ -5942,7 +5942,7 @@ static void audio_driver_flush(const int16_t *data, size_t samples,
|
|||||||
*
|
*
|
||||||
* Audio sample render callback function.
|
* Audio sample render callback function.
|
||||||
**/
|
**/
|
||||||
void audio_driver_sample(int16_t left, int16_t right)
|
static void audio_driver_sample(int16_t left, int16_t right)
|
||||||
{
|
{
|
||||||
if (audio_suspended)
|
if (audio_suspended)
|
||||||
return;
|
return;
|
||||||
@ -6024,7 +6024,7 @@ static void audio_driver_menu_sample(void)
|
|||||||
* Returns: amount of frames sampled. Will be equal to @frames
|
* Returns: amount of frames sampled. Will be equal to @frames
|
||||||
* unless @frames exceeds (AUDIO_CHUNK_SIZE_NONBLOCKING / 2).
|
* unless @frames exceeds (AUDIO_CHUNK_SIZE_NONBLOCKING / 2).
|
||||||
**/
|
**/
|
||||||
size_t audio_driver_sample_batch(const int16_t *data, size_t frames)
|
static size_t audio_driver_sample_batch(const int16_t *data, size_t frames)
|
||||||
{
|
{
|
||||||
if (frames > (AUDIO_CHUNK_SIZE_NONBLOCKING >> 1))
|
if (frames > (AUDIO_CHUNK_SIZE_NONBLOCKING >> 1))
|
||||||
frames = AUDIO_CHUNK_SIZE_NONBLOCKING >> 1;
|
frames = AUDIO_CHUNK_SIZE_NONBLOCKING >> 1;
|
||||||
@ -6061,7 +6061,7 @@ size_t audio_driver_sample_batch(const int16_t *data, size_t frames)
|
|||||||
* This callback function will be used instead of
|
* This callback function will be used instead of
|
||||||
* audio_driver_sample when rewinding is activated.
|
* audio_driver_sample when rewinding is activated.
|
||||||
**/
|
**/
|
||||||
void audio_driver_sample_rewind(int16_t left, int16_t right)
|
static void audio_driver_sample_rewind(int16_t left, int16_t right)
|
||||||
{
|
{
|
||||||
if (audio_driver_rewind_ptr == 0)
|
if (audio_driver_rewind_ptr == 0)
|
||||||
return;
|
return;
|
||||||
@ -6083,7 +6083,7 @@ void audio_driver_sample_rewind(int16_t left, int16_t right)
|
|||||||
* Returns: amount of frames sampled. Will be equal to @frames
|
* Returns: amount of frames sampled. Will be equal to @frames
|
||||||
* unless @frames exceeds (AUDIO_CHUNK_SIZE_NONBLOCKING / 2).
|
* unless @frames exceeds (AUDIO_CHUNK_SIZE_NONBLOCKING / 2).
|
||||||
**/
|
**/
|
||||||
size_t audio_driver_sample_batch_rewind(const int16_t *data, size_t frames)
|
static size_t audio_driver_sample_batch_rewind(const int16_t *data, size_t frames)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
size_t samples = frames << 1;
|
size_t samples = frames << 1;
|
||||||
@ -9359,7 +9359,7 @@ void video_driver_frame(const void *data, unsigned width,
|
|||||||
video_info.osd_stat_params.color = COLOR_ABGR(
|
video_info.osd_stat_params.color = COLOR_ABGR(
|
||||||
red, green, blue, alpha);
|
red, green, blue, alpha);
|
||||||
|
|
||||||
compute_audio_buffer_statistics(&audio_stats);
|
audio_compute_buffer_statistics(&audio_stats);
|
||||||
|
|
||||||
snprintf(video_info.stat_text,
|
snprintf(video_info.stat_text,
|
||||||
sizeof(video_info.stat_text),
|
sizeof(video_info.stat_text),
|
||||||
|
10
retroarch.h
10
retroarch.h
@ -604,14 +604,6 @@ void audio_driver_set_nonblocking_state(bool enable);
|
|||||||
**/
|
**/
|
||||||
const char* config_get_audio_driver_options(void);
|
const char* config_get_audio_driver_options(void);
|
||||||
|
|
||||||
void audio_driver_sample(int16_t left, int16_t right);
|
|
||||||
|
|
||||||
size_t audio_driver_sample_batch(const int16_t *data, size_t frames);
|
|
||||||
|
|
||||||
void audio_driver_sample_rewind(int16_t left, int16_t right);
|
|
||||||
|
|
||||||
size_t audio_driver_sample_batch_rewind(const int16_t *data, size_t frames);
|
|
||||||
|
|
||||||
bool audio_driver_mixer_extension_supported(const char *ext);
|
bool audio_driver_mixer_extension_supported(const char *ext);
|
||||||
|
|
||||||
void audio_driver_dsp_filter_free(void);
|
void audio_driver_dsp_filter_free(void);
|
||||||
@ -674,8 +666,6 @@ enum audio_mixer_state audio_driver_mixer_get_stream_state(unsigned i);
|
|||||||
|
|
||||||
const char *audio_driver_mixer_get_stream_name(unsigned i);
|
const char *audio_driver_mixer_get_stream_name(unsigned i);
|
||||||
|
|
||||||
bool compute_audio_buffer_statistics(audio_statistics_t *stats);
|
|
||||||
|
|
||||||
void audio_driver_load_menu_sounds(void);
|
void audio_driver_load_menu_sounds(void);
|
||||||
|
|
||||||
extern audio_driver_t audio_rsound;
|
extern audio_driver_t audio_rsound;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user