From 5a5985932dfee0ee343df58325b6633896e136a3 Mon Sep 17 00:00:00 2001 From: casey langen Date: Sat, 31 Oct 2020 17:38:52 +0000 Subject: [PATCH] Fixed BSD compile. --- src/plugins/sndioout/SndioOut.cpp | 8 ++++---- src/plugins/sndioout/SndioOut.h | 4 +++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/plugins/sndioout/SndioOut.cpp b/src/plugins/sndioout/SndioOut.cpp index c1c87fda6..aae1fdbac 100644 --- a/src/plugins/sndioout/SndioOut.cpp +++ b/src/plugins/sndioout/SndioOut.cpp @@ -165,23 +165,23 @@ IDevice* SndioOut::GetDefaultDevice() { return nullptr; } -int SndioOut::Play(IBuffer *buffer, IBufferProvider *provider) { +OutputState SndioOut::Play(IBuffer *buffer, IBufferProvider *provider) { std::this_thread::yield(); if (this->state != StatePlaying) { - return OutputInvalidState; + return OutputState::InvalidState; } { LOCK() if (this->CountBuffersWithProvider(provider) >= BUFFER_COUNT) { - return OutputBufferFull; + return OutputState::BufferFull; } this->buffers.push_back(BufferContext{provider, buffer}); } NOTIFY() - return OutputBufferWritten; + return OutputState::BufferWritten; } void SndioOut::WriteLoop() { diff --git a/src/plugins/sndioout/SndioOut.h b/src/plugins/sndioout/SndioOut.h index d8016f85a..3bbc093bd 100644 --- a/src/plugins/sndioout/SndioOut.h +++ b/src/plugins/sndioout/SndioOut.h @@ -31,8 +31,10 @@ // POSSIBILITY OF SUCH DAMAGE. // ////////////////////////////////////////////////////////////////////////////// + #pragma once +#include #include #include #include @@ -57,7 +59,7 @@ class SndioOut : public IOutput { virtual void SetVolume(double volume) override; virtual double GetVolume() override; virtual void Stop() override; - virtual int Play(IBuffer *buffer, IBufferProvider *provider) override; + virtual musik::core::sdk::OutputState Play(IBuffer *buffer, IBufferProvider *provider) override; virtual double Latency() override; virtual void Drain() override; virtual IDeviceList* GetDeviceList() override;