![Murat Suri](/assets/img/avatar_default.png)
* Remove redundant mutex locking in DecoderFactories (the access is already locked by the callee)
51 lines
1.4 KiB
C++
51 lines
1.4 KiB
C++
// Copyright (c) 2008-2010 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones
|
|
// This file is part of the "cAudio Engine"
|
|
// For conditions of distribution and use, see copyright notice in cAudio.h
|
|
|
|
#pragma once
|
|
|
|
#include "../include/IAudioDecoder.h"
|
|
#include "../include/cAudioDefines.h"
|
|
#include "../Headers/cMemoryOverride.h"
|
|
|
|
#ifdef CAUDIO_COMPILE_WITH_WAV_DECODER
|
|
|
|
namespace cAudio
|
|
{
|
|
class cWavDecoder : public IAudioDecoder, public cMemoryOverride
|
|
{
|
|
public:
|
|
|
|
cWavDecoder(IDataSource* stream);
|
|
~cWavDecoder();
|
|
|
|
virtual AudioFormats getFormat();
|
|
virtual int getFrequency();
|
|
virtual bool isSeekingSupported();
|
|
virtual bool isValid();
|
|
virtual int readAudioData(void* output, int amount);
|
|
virtual bool setPosition(int position, bool relative);
|
|
virtual bool seek(float seconds,bool relative);
|
|
virtual float getTotalTime();
|
|
virtual int getTotalSize();
|
|
virtual int getCompressedSize();
|
|
virtual float getCurrentTime();
|
|
virtual int getCurrentPosition();
|
|
virtual int getCurrentCompressedPosition();
|
|
|
|
private:
|
|
short Channels;
|
|
int SampleRate;
|
|
int ByteRate;
|
|
short BlockAlign;
|
|
short BitsPerSample;
|
|
int DataSize;
|
|
int DataOffset;
|
|
|
|
bool Valid;
|
|
};
|
|
};
|
|
|
|
#endif
|
|
|