Second commit to correct FlacDecoder's filename case.

This commit is contained in:
Casey Langen 2016-05-28 13:56:46 -07:00
parent e5eac21ae6
commit 81889baf32
5 changed files with 7 additions and 14 deletions

View File

@ -2,7 +2,7 @@
#include <iostream>
#define BUFFER_COUNT 3
#define BUFFER_COUNT 8
using namespace musik::core::audio;

View File

@ -2,7 +2,7 @@ set (flacdecoder_SOURCES
stdafx.cpp
flacdecoder_plugin.cpp
FlacDecoderFactory.cpp
FLACDecoder.cpp
FlacDecoder.cpp
)
add_definitions(

View File

@ -35,15 +35,11 @@
#include "FlacDecoder.h"
#include <complex>
#ifndef WIN32
#include <string.h> //needed for mempcpy
#endif
static inline void copy(float* dst, float* src, size_t count) {
#ifdef WIN32
CopyMemory(dst, src, count * sizeof(float));
CopyMemory(dst, src, count * sizeof(float));
#else
memcpy(dst, src, count * sizeof(float));
memcpy(dst, src, count * sizeof(float));
#endif
}
@ -64,13 +60,12 @@ FlacDecoder::~FlacDecoder() {
this->decoder = NULL;
}
if(this->outputBuffer) {
if (this->outputBuffer) {
delete this->outputBuffer;
this->outputBuffer = NULL;
}
}
FLAC__StreamDecoderReadStatus FlacDecoder::FlacRead(
const FLAC__StreamDecoder *decoder,
FLAC__byte buffer[],
@ -134,7 +129,6 @@ FLAC__StreamDecoderLengthStatus FlacDecoder::FlacFileSize(
return FLAC__STREAM_DECODER_LENGTH_STATUS_OK;
}
bool FlacDecoder::Open(musik::core::io::IDataStream *stream){
this->stream = stream;
@ -223,7 +217,6 @@ FLAC__StreamDecoderWriteStatus FlacDecoder::FlacWrite(
return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE;
}
void FlacDecoder::Destroy() {
delete this;
}
@ -244,7 +237,7 @@ bool FlacDecoder::GetBuffer(IBuffer *buffer) {
/* read the next chunk */
if (FLAC__stream_decoder_process_single(this->decoder)) {
if(this->outputBuffer && this->outputBufferSize > 0) {
if (this->outputBuffer && this->outputBufferSize > 0) {
buffer->SetSamples(this->outputBufferSize / this->channels);
copy(buffer->BufferPointer(), this->outputBuffer, this->outputBufferSize);
this->outputBufferSize = 0;

View File

@ -36,7 +36,7 @@
#include <algorithm>
#include "FlacDecoderFactory.h"
#include "FLACDecoder.h"
#include "FlacDecoder.h"
using namespace musik::core::audio;