mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-23 14:25:37 +00:00
26 lines
521 B
C++
26 lines
521 B
C++
#include "null_audio_stream.h"
|
|
|
|
NullAudioStream::NullAudioStream() = default;
|
|
|
|
NullAudioStream::~NullAudioStream() = default;
|
|
|
|
bool NullAudioStream::OpenDevice()
|
|
{
|
|
return true;
|
|
}
|
|
|
|
void NullAudioStream::PauseDevice(bool paused) {}
|
|
|
|
void NullAudioStream::CloseDevice() {}
|
|
|
|
void NullAudioStream::FramesAvailable()
|
|
{
|
|
// drop any buffer as soon as they're available
|
|
DropFrames(GetSamplesAvailable());
|
|
}
|
|
|
|
std::unique_ptr<AudioStream> AudioStream::CreateNullAudioStream()
|
|
{
|
|
return std::make_unique<NullAudioStream>();
|
|
}
|