2010-02-09 05:18:39 +01:00
|
|
|
// 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
|
|
|
|
|
|
|
|
#ifndef CRAWDECODER_H_INCLUDED
|
|
|
|
#define CRAWDECODER_H_INCLUDED
|
|
|
|
|
|
|
|
#include "../include/IAudioDecoder.h"
|
|
|
|
|
|
|
|
namespace cAudio
|
|
|
|
{
|
|
|
|
|
|
|
|
class cRawDecoder : public IAudioDecoder
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
|
|
|
cRawDecoder(IDataSource* stream, unsigned int frequency, AudioFormats format);
|
|
|
|
~cRawDecoder();
|
|
|
|
|
|
|
|
//!Retruns the format of the audio data
|
|
|
|
virtual AudioFormats getFormat();
|
|
|
|
|
|
|
|
//!Returns the frequency of the audio data
|
|
|
|
virtual int getFrequency();
|
|
|
|
|
|
|
|
//!Returns whether seeking is supported
|
|
|
|
virtual bool isSeekingSupported();
|
|
|
|
|
2009-12-07 23:25:08 +01:00
|
|
|
//!Returns whether the stream is valid for this codec
|
2010-02-09 05:18:39 +01:00
|
|
|
virtual bool isValid();
|
|
|
|
|
|
|
|
//!Reads a section of data out of the audio stream
|
|
|
|
virtual int readAudioData(void* output, int amount);
|
|
|
|
|
|
|
|
//!Sets the position to read data out of
|
|
|
|
virtual bool setPosition(int position, bool relative);
|
|
|
|
|
|
|
|
//!If seeking is supported, will seek the stream to seconds
|
|
|
|
virtual bool seek(float seconds,bool relative);
|
|
|
|
|
|
|
|
private:
|
|
|
|
unsigned int Frequency;
|
|
|
|
AudioFormats Format;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2009-08-11 19:57:20 +02:00
|
|
|
#endif //! CRAWDECODER_H_INCLUDED
|