mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-11 06:28:24 +02:00
ps2audio: Removed free of buffer that hasn't been allocated yet.
This commit is contained in:
@@ -62,8 +62,6 @@ static int PS2AUDIO_OpenDevice(SDL_AudioDevice *device)
|
|||||||
audsrv_set_volume(MAX_VOLUME);
|
audsrv_set_volume(MAX_VOLUME);
|
||||||
|
|
||||||
if (_this->hidden->channel < 0) {
|
if (_this->hidden->channel < 0) {
|
||||||
SDL_aligned_free(_this->hidden->rawbuf);
|
|
||||||
_this->hidden->rawbuf = NULL;
|
|
||||||
return SDL_SetError("Couldn't reserve hardware channel");
|
return SDL_SetError("Couldn't reserve hardware channel");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -101,7 +99,7 @@ static Uint8 *PS2AUDIO_GetDeviceBuf(SDL_AudioDevice *device, int *buffer_size)
|
|||||||
{
|
{
|
||||||
Uint8 *buffer = device->hidden->mixbufs[device->hidden->next_buffer];
|
Uint8 *buffer = device->hidden->mixbufs[device->hidden->next_buffer];
|
||||||
device->hidden->next_buffer = (device->hidden->next_buffer + 1) % NUM_BUFFERS;
|
device->hidden->next_buffer = (device->hidden->next_buffer + 1) % NUM_BUFFERS;
|
||||||
return buffer;;
|
return buffer;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void PS2AUDIO_CloseDevice(SDL_AudioDevice *device)
|
static void PS2AUDIO_CloseDevice(SDL_AudioDevice *device)
|
||||||
|
|||||||
Reference in New Issue
Block a user