mirror of
https://github.com/mackron/miniaudio.git
synced 2026-04-23 16:54:03 +02:00
Fix some warnings with the Emscripten build.
This commit is contained in:
+5
-2
@@ -18653,10 +18653,13 @@ static void ma_device__on_notification_stopped(ma_device* pDevice)
|
|||||||
ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_stopped));
|
ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_stopped));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Not all platforms support reroute notifications. */
|
||||||
|
#if !defined(MA_EMSCRIPTEN)
|
||||||
static void ma_device__on_notification_rerouted(ma_device* pDevice)
|
static void ma_device__on_notification_rerouted(ma_device* pDevice)
|
||||||
{
|
{
|
||||||
ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_rerouted));
|
ma_device__on_notification(ma_device_notification_init(pDevice, ma_device_notification_type_rerouted));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Interruptions are only used on some platforms. */
|
/* Interruptions are only used on some platforms. */
|
||||||
#if defined(MA_APPLE_MOBILE)
|
#if defined(MA_APPLE_MOBILE)
|
||||||
@@ -39965,7 +39968,7 @@ static void ma_audio_worklet_processor_created__webaudio(EMSCRIPTEN_WEBAUDIO_T a
|
|||||||
|
|
||||||
/* With the audio worklet initialized we can now attach it to the graph. */
|
/* With the audio worklet initialized we can now attach it to the graph. */
|
||||||
if (pParameters->pConfig->deviceType == ma_device_type_capture || pParameters->pConfig->deviceType == ma_device_type_duplex) {
|
if (pParameters->pConfig->deviceType == ma_device_type_capture || pParameters->pConfig->deviceType == ma_device_type_duplex) {
|
||||||
ma_result attachmentResult = EM_ASM_INT({
|
ma_result attachmentResult = (ma_result)EM_ASM_INT({
|
||||||
var getUserMediaResult = 0;
|
var getUserMediaResult = 0;
|
||||||
var audioWorklet = emscriptenGetAudioObject($0);
|
var audioWorklet = emscriptenGetAudioObject($0);
|
||||||
var audioContext = emscriptenGetAudioObject($1);
|
var audioContext = emscriptenGetAudioObject($1);
|
||||||
@@ -39996,7 +39999,7 @@ static void ma_audio_worklet_processor_created__webaudio(EMSCRIPTEN_WEBAUDIO_T a
|
|||||||
|
|
||||||
/* If it's playback only we can now attach the worklet node to the graph. This has already been done for the duplex case. */
|
/* If it's playback only we can now attach the worklet node to the graph. This has already been done for the duplex case. */
|
||||||
if (pParameters->pConfig->deviceType == ma_device_type_playback) {
|
if (pParameters->pConfig->deviceType == ma_device_type_playback) {
|
||||||
ma_result attachmentResult = EM_ASM_INT({
|
ma_result attachmentResult = (ma_result)EM_ASM_INT({
|
||||||
var audioWorklet = emscriptenGetAudioObject($0);
|
var audioWorklet = emscriptenGetAudioObject($0);
|
||||||
var audioContext = emscriptenGetAudioObject($1);
|
var audioContext = emscriptenGetAudioObject($1);
|
||||||
audioWorklet.connect(audioContext.destination);
|
audioWorklet.connect(audioContext.destination);
|
||||||
|
|||||||
Reference in New Issue
Block a user