Added SDL_AUDIO_BYTESIZE

This commit is contained in:
Brick
2023-09-05 23:02:37 +01:00
committed by Sam Lantinga
parent 544351c98e
commit 53122593f8
12 changed files with 21 additions and 20 deletions

View File

@@ -38,7 +38,7 @@ static Uint8 *EMSCRIPTENAUDIO_GetDeviceBuf(SDL_AudioDevice *device, int *buffer_
static int EMSCRIPTENAUDIO_PlayDevice(SDL_AudioDevice *device, const Uint8 *buffer, int buffer_size)
{
const int framelen = (SDL_AUDIO_BITSIZE(device->spec.format) / 8) * device->spec.channels;
const int framelen = SDL_AUDIO_BYTESIZE(device->spec.format) * device->spec.channels;
MAIN_THREAD_EM_ASM({
var SDL3 = Module['SDL3'];
var numChannels = SDL3.audio.currentOutputBuffer['numberOfChannels'];