From 4a17612bffd07e6e1925ef9905c4ebebf4eecfd9 Mon Sep 17 00:00:00 2001
From: pionere <[EMAIL REDACTED]>
Date: Mon, 17 Jan 2022 12:04:32 +0100
Subject: [PATCH] get rid of BeginLoopIteration
---
src/audio/SDL_audio.c | 9 ---------
src/audio/SDL_sysaudio.h | 1 -
src/audio/wasapi/SDL_wasapi.c | 7 -------
src/audio/wasapi/SDL_wasapi.h | 1 -
4 files changed, 18 deletions(-)
diff --git a/src/audio/SDL_audio.c b/src/audio/SDL_audio.c
index c47617dc27b..53c099a02b9 100644
--- a/src/audio/SDL_audio.c
+++ b/src/audio/SDL_audio.c
@@ -245,11 +245,6 @@ SDL_AudioThreadDeinit_Default(_THIS)
{ /* no-op. */
}
-static void
-SDL_AudioBeginLoopIteration_Default(_THIS)
-{ /* no-op. */
-}
-
static void
SDL_AudioWaitDevice_Default(_THIS)
{ /* no-op. */
@@ -346,7 +341,6 @@ finish_audio_entry_points_init(void)
FILL_STUB(OpenDevice);
FILL_STUB(ThreadInit);
FILL_STUB(ThreadDeinit);
- FILL_STUB(BeginLoopIteration);
FILL_STUB(WaitDevice);
FILL_STUB(PlayDevice);
FILL_STUB(GetDeviceBuf);
@@ -704,7 +698,6 @@ SDL_RunAudio(void *devicep)
/* Loop, filling the audio buffers */
while (!SDL_AtomicGet(&device->shutdown)) {
- current_audio.impl.BeginLoopIteration(device);
data_len = device->callbackspec.size;
/* Fill the current buffer with sound */
@@ -810,8 +803,6 @@ SDL_CaptureAudio(void *devicep)
int still_need;
Uint8 *ptr;
- current_audio.impl.BeginLoopIteration(device);
-
if (SDL_AtomicGet(&device->paused)) {
SDL_Delay(delay); /* just so we don't cook the CPU. */
if (device->stream) {
diff --git a/src/audio/SDL_sysaudio.h b/src/audio/SDL_sysaudio.h
index cd44d7eb4d4..0ed4da92a50 100644
--- a/src/audio/SDL_sysaudio.h
+++ b/src/audio/SDL_sysaudio.h
@@ -68,7 +68,6 @@ typedef struct SDL_AudioDriverImpl
int (*OpenDevice) (_THIS, void *handle, const char *devname, int iscapture);
void (*ThreadInit) (_THIS); /* Called by audio thread at start */
void (*ThreadDeinit) (_THIS); /* Called by audio thread at end */
- void (*BeginLoopIteration)(_THIS); /* Called by audio thread at top of loop */
void (*WaitDevice) (_THIS);
void (*PlayDevice) (_THIS);
Uint8 *(*GetDeviceBuf) (_THIS);
diff --git a/src/audio/wasapi/SDL_wasapi.c b/src/audio/wasapi/SDL_wasapi.c
index 942e66e9bf4..d80ecf622bc 100644
--- a/src/audio/wasapi/SDL_wasapi.c
+++ b/src/audio/wasapi/SDL_wasapi.c
@@ -691,12 +691,6 @@ WASAPI_ThreadDeinit(_THIS)
WASAPI_PlatformThreadDeinit(this);
}
-void
-WASAPI_BeginLoopIteration(_THIS)
-{
- /* no-op. */
-}
-
static void
WASAPI_Deinitialize(void)
{
@@ -727,7 +721,6 @@ WASAPI_Init(SDL_AudioDriverImpl * impl)
impl->DetectDevices = WASAPI_DetectDevices;
impl->ThreadInit = WASAPI_ThreadInit;
impl->ThreadDeinit = WASAPI_ThreadDeinit;
- impl->BeginLoopIteration = WASAPI_BeginLoopIteration;
impl->OpenDevice = WASAPI_OpenDevice;
impl->PlayDevice = WASAPI_PlayDevice;
impl->WaitDevice = WASAPI_WaitDevice;
diff --git a/src/audio/wasapi/SDL_wasapi.h b/src/audio/wasapi/SDL_wasapi.h
index 7fd02b45fff..af79637b78c 100644
--- a/src/audio/wasapi/SDL_wasapi.h
+++ b/src/audio/wasapi/SDL_wasapi.h
@@ -74,7 +74,6 @@ int WASAPI_ActivateDevice(_THIS, const SDL_bool isrecovery);
void WASAPI_PlatformThreadInit(_THIS);
void WASAPI_PlatformThreadDeinit(_THIS);
void WASAPI_PlatformDeleteActivationHandler(void *handler);
-void WASAPI_BeginLoopIteration(_THIS);
#ifdef __cplusplus
}