cAudio 2.3.0
3d Audio Engine
Loading...
Searching...
No Matches
cRawDecoder.h
1// Copyright (c) 2008-2011 Raynaldo (Wildicv) Rivera, Joshua (Dark_Kilauea) Jones, Murat (wolfmanfx) Sari
2// This file is part of the "cAudio Engine"
3// For conditions of distribution and use, see copyright notice in cAudio.h
4
5#pragma once
6
7#include "IAudioDecoder.h"
8#include "cMemoryOverride.h"
9
10namespace cAudio
11{
13 {
14 public:
15
16 cRawDecoder(IDataSource* stream, unsigned int frequency, AudioFormats format);
18
19 virtual AudioFormats getFormat();
20 virtual int getFrequency();
21 virtual bool isSeekingSupported();
22 virtual bool isValid();
23 virtual int readAudioData(void* output, int amount);
24 virtual bool setPosition(int position, bool relative);
25 virtual bool seek(float seconds,bool relative);
26 virtual float getTotalTime();
27 virtual int getTotalSize();
28 virtual int getCompressedSize();
29 virtual float getCurrentTime();
30 virtual int getCurrentPosition();
31 virtual int getCurrentCompressedPosition();
32 virtual cAudioString getType() const;
33
34 private:
35 unsigned int Frequency;
36 AudioFormats Format;
37 };
38};
Interface for all Audio Decoders in cAudio.
Definition: IAudioDecoder.h:16
Interface for data providers in cAudio.
Definition: IDataSource.h:13
Overrides the memory allocations for classes derived from it and makes them use the cAudio memory sys...
virtual int readAudioData(void *output, int amount)
Reads a section of data out of the audio stream.
Definition: cRawDecoder.cpp:39
virtual cAudioString getType() const
Returns the IAudioDecoderType.
virtual int getCurrentPosition()
If available, returns the current position in the decoded audio stream in bytes. Returns a negative n...
virtual int getCompressedSize()
Returns the compressed (original) size of the audio stream, before decoding.
Definition: cRawDecoder.cpp:85
virtual bool isSeekingSupported()
Returns whether seeking is supported.
Definition: cRawDecoder.cpp:29
virtual bool isValid()
Returns whether the stream is valid for this codec.
Definition: cRawDecoder.cpp:34
virtual float getCurrentTime()
If seeking is supported, will return the current position in the stream in seconds....
Definition: cRawDecoder.cpp:90
virtual int getTotalSize()
If available, returns the total decoded size of the audio stream. Returns a negative number if this c...
Definition: cRawDecoder.cpp:80
virtual int getCurrentCompressedPosition()
Returns the position in the compressed (original) audio stream before decoding.
virtual AudioFormats getFormat()
Returns the format of the audio data.
Definition: cRawDecoder.cpp:19
virtual bool setPosition(int position, bool relative)
Sets the position in the stream to read from.
Definition: cRawDecoder.cpp:44
virtual float getTotalTime()
If seeking is supported, will return the length of the audio steam in seconds. Returns a negative num...
Definition: cRawDecoder.cpp:66
virtual bool seek(float seconds, bool relative)
If seeking is supported, will seek the stream to seconds.
Definition: cRawDecoder.cpp:50
virtual int getFrequency()
Returns the frequency (sample rate) of the audio data.
Definition: cRawDecoder.cpp:24
Main namespace for the entire cAudio library.
Definition: cAudioCapture.h:16
AudioFormats
Enumeration of audio formats supported by the engine.
Definition: EAudioFormats.h:11