From dff09255a7ffa847915aaa6a764019bb05c0d52a Mon Sep 17 00:00:00 2001 From: casey langen Date: Tue, 13 Dec 2016 21:26:32 -0800 Subject: [PATCH] Fixed Linux compile. --- src/contrib/nomaddecoder/NomadDecoder.cpp | 14 +++++++------- src/contrib/nomaddecoder/NomadDecoder.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/contrib/nomaddecoder/NomadDecoder.cpp b/src/contrib/nomaddecoder/NomadDecoder.cpp index 2eb48b34b..edc4869ff 100644 --- a/src/contrib/nomaddecoder/NomadDecoder.cpp +++ b/src/contrib/nomaddecoder/NomadDecoder.cpp @@ -36,7 +36,7 @@ using namespace musik::core::sdk; -#define DEFAULT_READ_SAMPLE_SIZE 2304 +#define DEFAULT_READ_SAMPLE_SIZE 2304 * 4 static ssize_t nomadRead(void *datasource, void *buffer, size_t count) { IDataStream *stream = static_cast(datasource); @@ -65,7 +65,7 @@ static int nomadClose(void *datasource) { } NomadDecoder::NomadDecoder() { - this->nomad = nullptr; + this->nomadContext = nullptr; this->callbacks.read = &nomadRead; this->callbacks.lseek = &nomadSeek; this->callbacks.close = &nomadClose; @@ -75,20 +75,20 @@ NomadDecoder::~NomadDecoder() { } void NomadDecoder::Destroy() { - nomad_close(this->nomad); - this->nomad = nullptr; + nomad_close(this->nomadContext); + this->nomadContext = nullptr; delete this; } double NomadDecoder::SetPosition(double seconds) { - return !nomad_time_seek(this->nomad, seconds) ? seconds : -1; + return !nomad_time_seek(this->nomadContext, seconds) ? seconds : -1; } bool NomadDecoder::GetBuffer(IBuffer *buffer) { buffer->SetSamples(DEFAULT_READ_SAMPLE_SIZE); int read = nomad_read( - this->nomad, + this->nomadContext, (char *)buffer->BufferPointer(), DEFAULT_READ_SAMPLE_SIZE, SAMPLE_FORMAT_32_BIT_FLOAT); @@ -99,6 +99,6 @@ bool NomadDecoder::GetBuffer(IBuffer *buffer) { } bool NomadDecoder::Open(IDataStream *stream) { - int result = nomad_open_callbacks(&this->nomad, stream, &this->callbacks); + int result = nomad_open_callbacks(&this->nomadContext, stream, &this->callbacks); return result ? false : true; } diff --git a/src/contrib/nomaddecoder/NomadDecoder.h b/src/contrib/nomaddecoder/NomadDecoder.h index 2cb95cfc0..fcf3e8e83 100644 --- a/src/contrib/nomaddecoder/NomadDecoder.h +++ b/src/contrib/nomaddecoder/NomadDecoder.h @@ -53,5 +53,5 @@ class NomadDecoder : public musik::core::sdk::IDecoder { private: nomad_callbacks callbacks; - nomad *nomad; + nomad *nomadContext; };