* These functions are called from the main thread and used to prevent bad
* access. TODO: They should be no-ops in release builds.
*/
-VG_STATIC int audio_lock_checker_load(void)
+static int audio_lock_checker_load(void)
{
int value;
SDL_AtomicLock( &vg_audio.sl_checker );
return value;
}
-VG_STATIC void audio_lock_checker_store( int value )
+static void audio_lock_checker_store( int value )
{
SDL_AtomicLock( &vg_audio.sl_checker );
vg_audio.sync_locked = value;
SDL_AtomicUnlock( &vg_audio.sl_checker );
}
-VG_STATIC void audio_require_lock(void)
+static void audio_require_lock(void)
{
if( audio_lock_checker_load() )
return;
abort();
}
-VG_STATIC void audio_lock(void)
+static void audio_lock(void)
{
SDL_AtomicLock( &vg_audio.sl_sync );
audio_lock_checker_store(1);
}
-VG_STATIC void audio_unlock(void)
+static void audio_unlock(void)
{
audio_lock_checker_store(0);
SDL_AtomicUnlock( &vg_audio.sl_sync );
}
-VG_STATIC void audio_mixer_callback( void *user, u8 *stream, int frame_count );
-VG_STATIC void vg_audio_init(void)
+static void audio_mixer_callback( void *user, u8 *stream, int frame_count );
+static void vg_audio_init(void)
{
/* TODO: Move here? */
vg_console_reg_var( "debug_audio", &vg_audio.debug_ui,
}
}
-VG_STATIC void vg_audio_free(void)
+static void vg_audio_free(void)
{
vg_dsp_free();
SDL_CloseAudioDevice( vg_audio.sdl_output_device );
return 1;
}
-VG_STATIC void audio_decode_uncompressed_mono( i16 *src, u32 count, float *dst )
+static void audio_decode_uncompressed_mono( i16 *src, u32 count, float *dst )
{
for( u32 i=0; i<count; i++ ){
dst[ i*2 + 0 ] = ((float)src[i]) * (1.0f/32767.0f);
/*
* adapted from stb_vorbis.h, since the original does not handle mono->stereo
*/
-VG_STATIC int
+static int
stb_vorbis_get_samples_float_interleaved_stereo( stb_vorbis *f, float *buffer,
int len )
{
/*
* ........ more wrecked code sorry!
*/
-VG_STATIC int
+static int
stb_vorbis_get_samples_i16_downmixed( stb_vorbis *f, i16 *buffer, int len )
{
int n = 0,
vg_profile_end( &_vg_prof_audio_mix );
}
-VG_STATIC void audio_mixer_callback( void *user, u8 *stream, int byte_count )
+static void audio_mixer_callback( void *user, u8 *stream, int byte_count )
{
/*
* Copy data and move edit flags to commit flags
audio_unlock();
}
-VG_STATIC void audio_clip_load( audio_clip *clip, void *lin_alloc )
+static void audio_clip_load( audio_clip *clip, void *lin_alloc )
{
if( lin_alloc == NULL )
lin_alloc = vg_audio.audio_pool;
}
}
-VG_STATIC void audio_clip_loadn( audio_clip *arr, int count, void *lin_alloc )
+static void audio_clip_loadn( audio_clip *arr, int count, void *lin_alloc )
{
for( int i=0; i<count; i++ )
audio_clip_load( &arr[i], lin_alloc );
}
-VG_STATIC void audio_require_clip_loaded( audio_clip *clip )
+static void audio_require_clip_loaded( audio_clip *clip )
{
if( clip->data && clip->size )
return;
* Debugging
*/
-VG_STATIC void audio_debug_ui( m4x4f mtx_pv )
+static void audio_debug_ui( m4x4f mtx_pv )
{
if( !vg_audio.debug_ui )
return;