OpenTTD Source 20261112-master-gbcbec5e63f
sdl3_s.cpp File Reference

Playing sound via SDL3. More...

#include "../stdafx.h"
#include "../mixer.h"
#include "sdl_s.h"
#include <SDL3/SDL_audio.h>
#include <SDL3/SDL_init.h>
#include "../safeguards.h"

Go to the source code of this file.

Functions

void FillAudioStream (void *, SDL_AudioStream *stream, int bytes_requested, int)
 Callback that fills the sound buffer.

Variables

static FSoundDriver_SDL iFSoundDriver_SDL
 Factory for the SDL sound driver.
static SDL_AudioStream * _sdl_audio_stream = nullptr
 SDL audio stream.

Detailed Description

Playing sound via SDL3.

Definition in file sdl3_s.cpp.

Function Documentation

◆ FillAudioStream()

void FillAudioStream ( void * ,
SDL_AudioStream * stream,
int bytes_requested,
int  )

Callback that fills the sound buffer.

Parameters
streamSDL audio stream requesting more data.
bytes_requestedNumber of additional bytes requested.

Definition at line 32 of file sdl3_s.cpp.

Referenced by SoundDriver_SDL::Start().

Variable Documentation

◆ _sdl_audio_stream

SDL_AudioStream* _sdl_audio_stream = nullptr
static

SDL audio stream.

Definition at line 25 of file sdl3_s.cpp.

Referenced by SoundDriver_SDL::Start(), and SoundDriver_SDL::Stop().

◆ iFSoundDriver_SDL

FSoundDriver_SDL iFSoundDriver_SDL
static

Factory for the SDL sound driver.

Definition at line 22 of file sdl3_s.cpp.