mirror of
https://github.com/clangen/musikcube.git
synced 2024-11-19 20:13:36 +00:00
Fixed BSD compile.
This commit is contained in:
parent
e0a2da7102
commit
5a5985932d
@ -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() {
|
||||
|
@ -31,8 +31,10 @@
|
||||
// POSSIBILITY OF SUCH DAMAGE.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <musikcore/sdk/constants.h>
|
||||
#include <musikcore/sdk/IOutput.h>
|
||||
#include <sndio.h>
|
||||
#include <mutex>
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user