1#ifndef SDLSOUNDDRIVER_HH
2#define SDLSOUNDDRIVER_HH
30 [[nodiscard]]
unsigned getSamples()
const override;
32 void uploadBuffer(std::span<const StereoFloat> buffer)
override;
36 [[nodiscard]]
unsigned getBufferFilled()
const;
37 [[nodiscard]]
unsigned getBufferFree()
const;
38 static void audioCallbackHelper(
void* userdata, uint8_t* strm,
int len);
39 void audioCallback(std::span<StereoFloat> stream);
43 SDL_AudioDeviceID deviceID;
46 unsigned fragmentSize;
47 unsigned readIdx = 0, writeIdx = 0;
This class manages the lifetime of a block of memory.
Contains the main loop of openMSX.
void uploadBuffer(std::span< const StereoFloat > buffer) override
void unmute() override
Unmute the sound system.
void mute() override
Mute the sound system.
~SDLSoundDriver() override
unsigned getFrequency() const override
Returns the actual sample frequency.
SDLSoundDriver(const SDLSoundDriver &)=delete
SDLSoundDriver & operator=(SDLSoundDriver &&)=delete
SDLSoundDriver & operator=(const SDLSoundDriver &)=delete
unsigned getSamples() const override
Get the number of samples that should be created 'per fragment'.
SDLSoundDriver(SDLSoundDriver &&)=delete
This file implemented 3 utility functions: