Duckstation/src/common/null_audio_stream.cpp
2020-06-09 02:05:49 +10:00

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>();
}