mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-24 01:04:02 +02:00
Fix some compilation warnings.
Public issue https://github.com/dr-soft/miniaudio/issues/139
This commit is contained in:
@@ -13,14 +13,14 @@
|
|||||||
#pragma GCC diagnostic ignored "-Wlong-long"
|
#pragma GCC diagnostic ignored "-Wlong-long"
|
||||||
#pragma GCC diagnostic ignored "-Wc++11-long-long"
|
#pragma GCC diagnostic ignored "-Wc++11-long-long"
|
||||||
#endif
|
#endif
|
||||||
#define spx_uint64_t unsigned __int64
|
typedef unsigned __int64 spx_uint64_t;
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
#pragma GCC diagnostic pop
|
#pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
#else
|
#else
|
||||||
#define MA_HAS_STDINT
|
#define MA_HAS_STDINT
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#define spx_uint64_t uint64_t
|
typedef uint64_t spx_uint64_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int ma_speex_resampler_get_required_input_frame_count(SpeexResamplerState* st, spx_uint64_t out_len, spx_uint64_t* in_len);
|
int ma_speex_resampler_get_required_input_frame_count(SpeexResamplerState* st, spx_uint64_t out_len, spx_uint64_t* in_len);
|
||||||
|
|||||||
+11
-4
@@ -5937,8 +5937,12 @@ static MA_INLINE ma_bool32 ma_is_big_endian()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-variable"
|
||||||
|
#endif
|
||||||
/* Standard sample rates, in order of priority. */
|
/* Standard sample rates, in order of priority. */
|
||||||
ma_uint32 g_maStandardSampleRatePriorities[] = {
|
static ma_uint32 g_maStandardSampleRatePriorities[] = {
|
||||||
MA_SAMPLE_RATE_48000, /* Most common */
|
MA_SAMPLE_RATE_48000, /* Most common */
|
||||||
MA_SAMPLE_RATE_44100,
|
MA_SAMPLE_RATE_44100,
|
||||||
|
|
||||||
@@ -5959,7 +5963,7 @@ ma_uint32 g_maStandardSampleRatePriorities[] = {
|
|||||||
MA_SAMPLE_RATE_384000
|
MA_SAMPLE_RATE_384000
|
||||||
};
|
};
|
||||||
|
|
||||||
ma_format g_maFormatPriorities[] = {
|
static ma_format g_maFormatPriorities[] = {
|
||||||
ma_format_s16, /* Most common */
|
ma_format_s16, /* Most common */
|
||||||
ma_format_f32,
|
ma_format_f32,
|
||||||
|
|
||||||
@@ -5970,7 +5974,9 @@ ma_format g_maFormatPriorities[] = {
|
|||||||
|
|
||||||
ma_format_u8 /* Low quality */
|
ma_format_u8 /* Low quality */
|
||||||
};
|
};
|
||||||
|
#if defined(__GNUC__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/******************************************************************************
|
/******************************************************************************
|
||||||
@@ -11595,7 +11601,7 @@ static ma_result ma_device_init_internal__wasapi(ma_context* pContext, ma_device
|
|||||||
DWORD streamFlags = 0;
|
DWORD streamFlags = 0;
|
||||||
MA_REFERENCE_TIME periodDurationInMicroseconds;
|
MA_REFERENCE_TIME periodDurationInMicroseconds;
|
||||||
ma_bool32 wasInitializedUsingIAudioClient3 = MA_FALSE;
|
ma_bool32 wasInitializedUsingIAudioClient3 = MA_FALSE;
|
||||||
WAVEFORMATEXTENSIBLE wf = {0};
|
WAVEFORMATEXTENSIBLE wf;
|
||||||
ma_WASAPIDeviceInterface* pDeviceInterface = NULL;
|
ma_WASAPIDeviceInterface* pDeviceInterface = NULL;
|
||||||
ma_IAudioClient2* pAudioClient2;
|
ma_IAudioClient2* pAudioClient2;
|
||||||
ma_uint32 nativeSampleRate;
|
ma_uint32 nativeSampleRate;
|
||||||
@@ -11628,6 +11634,7 @@ static ma_result ma_device_init_internal__wasapi(ma_context* pContext, ma_device
|
|||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MA_ZERO_OBJECT(&wf);
|
||||||
|
|
||||||
/* Try enabling hardware offloading. */
|
/* Try enabling hardware offloading. */
|
||||||
if (!pData->noHardwareOffloading) {
|
if (!pData->noHardwareOffloading) {
|
||||||
|
|||||||
Reference in New Issue
Block a user