From 4233c41ce2b35e5ff1dffca14adf7b42e751980c Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 5 Jul 2023 11:51:38 -0400 Subject: [PATCH] pulseaudio: Removed unnecessary variable. --- src/audio/pulseaudio/SDL_pulseaudio.c | 5 ++--- src/audio/pulseaudio/SDL_pulseaudio.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/audio/pulseaudio/SDL_pulseaudio.c b/src/audio/pulseaudio/SDL_pulseaudio.c index c0462f786..50d2072e7 100644 --- a/src/audio/pulseaudio/SDL_pulseaudio.c +++ b/src/audio/pulseaudio/SDL_pulseaudio.c @@ -640,8 +640,7 @@ static int PULSEAUDIO_OpenDevice(SDL_AudioDevice *device) /* Allocate mixing buffer */ if (!iscapture) { - h->mixlen = device->buffer_size; - h->mixbuf = (Uint8 *)SDL_malloc(h->mixlen); + h->mixbuf = (Uint8 *)SDL_malloc(device->buffer_size); if (h->mixbuf == NULL) { return SDL_OutOfMemory(); } @@ -653,7 +652,7 @@ static int PULSEAUDIO_OpenDevice(SDL_AudioDevice *device) /* Reduced prebuffering compared to the defaults. */ paattr.fragsize = device->buffer_size; - paattr.tlength = h->mixlen; + paattr.tlength = device->buffer_size; paattr.prebuf = -1; paattr.maxlength = -1; paattr.minreq = -1; diff --git a/src/audio/pulseaudio/SDL_pulseaudio.h b/src/audio/pulseaudio/SDL_pulseaudio.h index 709f00daa..10a7d9d12 100644 --- a/src/audio/pulseaudio/SDL_pulseaudio.h +++ b/src/audio/pulseaudio/SDL_pulseaudio.h @@ -36,7 +36,6 @@ struct SDL_PrivateAudioData /* Raw mixing buffer */ Uint8 *mixbuf; - int mixlen; int bytes_requested; /* bytes of data the hardware wants _now_. */