emscriptenaudio: Remove unnecessary functions.
parent
c7588e4261
commit
981b8a337a
|
@ -55,11 +55,6 @@ static void EMSCRIPTENAUDIO_PlayDevice(SDL_AudioDevice *device, const Uint8 *buf
|
||||||
}, buffer, buffer_size / framelen);
|
}, buffer, buffer_size / framelen);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HandleAudioProcess(SDL_AudioDevice *device) // this fires when the main thread is idle.
|
|
||||||
{
|
|
||||||
SDL_OutputAudioThreadIterate(device);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void EMSCRIPTENAUDIO_FlushCapture(SDL_AudioDevice *device)
|
static void EMSCRIPTENAUDIO_FlushCapture(SDL_AudioDevice *device)
|
||||||
{
|
{
|
||||||
|
@ -92,11 +87,6 @@ static int EMSCRIPTENAUDIO_CaptureFromDevice(SDL_AudioDevice *device, void *buff
|
||||||
return buflen;
|
return buflen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void HandleCaptureProcess(SDL_AudioDevice *device) // this fires when the main thread is idle.
|
|
||||||
{
|
|
||||||
SDL_CaptureAudioThreadIterate(device);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void EMSCRIPTENAUDIO_CloseDevice(SDL_AudioDevice *device)
|
static void EMSCRIPTENAUDIO_CloseDevice(SDL_AudioDevice *device)
|
||||||
{
|
{
|
||||||
if (!device->hidden) {
|
if (!device->hidden) {
|
||||||
|
@ -262,7 +252,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
|
||||||
} else if (navigator.webkitGetUserMedia !== undefined) {
|
} else if (navigator.webkitGetUserMedia !== undefined) {
|
||||||
navigator.webkitGetUserMedia({ audio: true, video: false }, have_microphone, no_microphone);
|
navigator.webkitGetUserMedia({ audio: true, video: false }, have_microphone, no_microphone);
|
||||||
}
|
}
|
||||||
}, device->spec.channels, device->sample_frames, HandleCaptureProcess, device);
|
}, device->spec.channels, device->sample_frames, SDL_CaptureAudioThreadIterate, device);
|
||||||
} else {
|
} else {
|
||||||
// setup a ScriptProcessorNode
|
// setup a ScriptProcessorNode
|
||||||
MAIN_THREAD_EM_ASM({
|
MAIN_THREAD_EM_ASM({
|
||||||
|
@ -274,7 +264,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
|
||||||
dynCall('vi', $2, [$3]);
|
dynCall('vi', $2, [$3]);
|
||||||
};
|
};
|
||||||
SDL3.audio.scriptProcessorNode['connect'](SDL3.audioContext['destination']);
|
SDL3.audio.scriptProcessorNode['connect'](SDL3.audioContext['destination']);
|
||||||
}, device->spec.channels, device->sample_frames, HandleAudioProcess, device);
|
}, device->spec.channels, device->sample_frames, SDL_OutputAudioThreadIterate, device);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue