mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-22 00:06:59 +02:00
Silence some warnings about unused functions.
This commit is contained in:
+8
-8
@@ -19987,7 +19987,7 @@ Timing
|
|||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
#if defined(MA_WIN32) && !defined(MA_POSIX)
|
#if defined(MA_WIN32) && !defined(MA_POSIX)
|
||||||
static LARGE_INTEGER g_ma_TimerFrequency; /* <-- Initialized to zero since it's static. */
|
static LARGE_INTEGER g_ma_TimerFrequency; /* <-- Initialized to zero since it's static. */
|
||||||
static void ma_timer_init(ma_timer* pTimer)
|
static MA_INLINE void ma_timer_init(ma_timer* pTimer)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER counter;
|
LARGE_INTEGER counter;
|
||||||
|
|
||||||
@@ -19999,7 +19999,7 @@ Timing
|
|||||||
pTimer->counter = counter.QuadPart;
|
pTimer->counter = counter.QuadPart;
|
||||||
}
|
}
|
||||||
|
|
||||||
static double ma_timer_get_time_in_seconds(ma_timer* pTimer)
|
static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)
|
||||||
{
|
{
|
||||||
LARGE_INTEGER counter;
|
LARGE_INTEGER counter;
|
||||||
if (!QueryPerformanceCounter(&counter)) {
|
if (!QueryPerformanceCounter(&counter)) {
|
||||||
@@ -20010,7 +20010,7 @@ Timing
|
|||||||
}
|
}
|
||||||
#elif defined(MA_APPLE) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
|
#elif defined(MA_APPLE) && (MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
|
||||||
static ma_uint64 g_ma_TimerFrequency = 0;
|
static ma_uint64 g_ma_TimerFrequency = 0;
|
||||||
static void ma_timer_init(ma_timer* pTimer)
|
static MA_INLINE void ma_timer_init(ma_timer* pTimer)
|
||||||
{
|
{
|
||||||
mach_timebase_info_data_t baseTime;
|
mach_timebase_info_data_t baseTime;
|
||||||
mach_timebase_info(&baseTime);
|
mach_timebase_info(&baseTime);
|
||||||
@@ -20019,7 +20019,7 @@ Timing
|
|||||||
pTimer->counter = mach_absolute_time();
|
pTimer->counter = mach_absolute_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
static double ma_timer_get_time_in_seconds(ma_timer* pTimer)
|
static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)
|
||||||
{
|
{
|
||||||
ma_uint64 newTimeCounter = mach_absolute_time();
|
ma_uint64 newTimeCounter = mach_absolute_time();
|
||||||
ma_uint64 oldTimeCounter = pTimer->counter;
|
ma_uint64 oldTimeCounter = pTimer->counter;
|
||||||
@@ -20044,7 +20044,7 @@ Timing
|
|||||||
#define MA_CLOCK_ID CLOCK_REALTIME
|
#define MA_CLOCK_ID CLOCK_REALTIME
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void ma_timer_init(ma_timer* pTimer)
|
static MA_INLINE void ma_timer_init(ma_timer* pTimer)
|
||||||
{
|
{
|
||||||
struct timespec newTime;
|
struct timespec newTime;
|
||||||
clock_gettime(MA_CLOCK_ID, &newTime);
|
clock_gettime(MA_CLOCK_ID, &newTime);
|
||||||
@@ -20052,7 +20052,7 @@ Timing
|
|||||||
pTimer->counter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec;
|
pTimer->counter = (newTime.tv_sec * 1000000000) + newTime.tv_nsec;
|
||||||
}
|
}
|
||||||
|
|
||||||
static double ma_timer_get_time_in_seconds(ma_timer* pTimer)
|
static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)
|
||||||
{
|
{
|
||||||
ma_uint64 newTimeCounter;
|
ma_uint64 newTimeCounter;
|
||||||
ma_uint64 oldTimeCounter;
|
ma_uint64 oldTimeCounter;
|
||||||
@@ -20066,7 +20066,7 @@ Timing
|
|||||||
return (newTimeCounter - oldTimeCounter) / 1000000000.0;
|
return (newTimeCounter - oldTimeCounter) / 1000000000.0;
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static void ma_timer_init(ma_timer* pTimer)
|
static MA_INLINE void ma_timer_init(ma_timer* pTimer)
|
||||||
{
|
{
|
||||||
struct timeval newTime;
|
struct timeval newTime;
|
||||||
gettimeofday(&newTime, NULL);
|
gettimeofday(&newTime, NULL);
|
||||||
@@ -20074,7 +20074,7 @@ Timing
|
|||||||
pTimer->counter = (newTime.tv_sec * 1000000) + newTime.tv_usec;
|
pTimer->counter = (newTime.tv_sec * 1000000) + newTime.tv_usec;
|
||||||
}
|
}
|
||||||
|
|
||||||
static double ma_timer_get_time_in_seconds(ma_timer* pTimer)
|
static MA_INLINE double ma_timer_get_time_in_seconds(ma_timer* pTimer)
|
||||||
{
|
{
|
||||||
ma_uint64 newTimeCounter;
|
ma_uint64 newTimeCounter;
|
||||||
ma_uint64 oldTimeCounter;
|
ma_uint64 oldTimeCounter;
|
||||||
|
|||||||
Reference in New Issue
Block a user