Duckstation/src/common/null_audio_stream.cpp

26 lines
521 B
C++
Raw Normal View History

#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());
}
2020-01-11 03:28:40 +00:00
std::unique_ptr<AudioStream> AudioStream::CreateNullAudioStream()
{
2020-01-11 03:28:40 +00:00
return std::make_unique<NullAudioStream>();
}