Add ma_offset_pcm_frames_{const_}ptr_f32.

This also silences a warning on GCC.
This commit is contained in:
David Reid
2021-01-03 18:08:29 +10:00
parent 1dcdd44088
commit 816a5a34dd
+3 -1
View File
@@ -5675,6 +5675,8 @@ Offsets a pointer by the specified number of PCM frames.
*/
MA_API void* ma_offset_pcm_frames_ptr(void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels);
MA_API const void* ma_offset_pcm_frames_const_ptr(const void* p, ma_uint64 offsetInFrames, ma_format format, ma_uint32 channels);
static MA_INLINE float* ma_offset_pcm_frames_ptr_f32(float* p, ma_uint64 offsetInFrames, ma_uint32 channels) { return (float*)ma_offset_pcm_frames_const_ptr((void*)p, offsetInFrames, ma_format_f32, channels); }
static MA_INLINE const float* ma_offset_pcm_frames_const_ptr_f32(const float* p, ma_uint64 offsetInFrames, ma_uint32 channels) { return (const float*)ma_offset_pcm_frames_const_ptr((const void*)p, offsetInFrames, ma_format_f32, channels); }
/*
@@ -11118,7 +11120,7 @@ Timing
*******************************************************************************/
#ifdef MA_WIN32
static LARGE_INTEGER g_ma_TimerFrequency = {{0}};
static LARGE_INTEGER g_ma_TimerFrequency; /* <-- Initialized to zero since it's static. */
static void ma_timer_init(ma_timer* pTimer)
{
LARGE_INTEGER counter;