emscriptenaudio: Remove unnecessary functions.

main
Ryan C. Gordon 2023-08-23 11:12:18 -04:00
parent c7588e4261
commit 981b8a337a
No known key found for this signature in database
GPG Key ID: FA148B892AB48044
1 changed files with 2 additions and 12 deletions

View File

@ -55,11 +55,6 @@ static void EMSCRIPTENAUDIO_PlayDevice(SDL_AudioDevice *device, const Uint8 *buf
}, 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)
{
@ -92,11 +87,6 @@ static int EMSCRIPTENAUDIO_CaptureFromDevice(SDL_AudioDevice *device, void *buff
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)
{
if (!device->hidden) {
@ -262,7 +252,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
} else if (navigator.webkitGetUserMedia !== undefined) {
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 {
// setup a ScriptProcessorNode
MAIN_THREAD_EM_ASM({
@ -274,7 +264,7 @@ static int EMSCRIPTENAUDIO_OpenDevice(SDL_AudioDevice *device)
dynCall('vi', $2, [$3]);
};
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;