diff options
Diffstat (limited to 'src/uscxml/plugins/invoker/audio/AudioToolbox.h')
-rw-r--r-- | src/uscxml/plugins/invoker/audio/AudioToolbox.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/uscxml/plugins/invoker/audio/AudioToolbox.h b/src/uscxml/plugins/invoker/audio/AudioToolbox.h new file mode 100644 index 0000000..3e04d8f --- /dev/null +++ b/src/uscxml/plugins/invoker/audio/AudioToolbox.h @@ -0,0 +1,32 @@ +#ifndef AUDIOTOOLBOX_H_GX4SW17C +#define AUDIOTOOLBOX_H_GX4SW17C + +#include "PCMConverter.h" +#include <AudioToolbox/AudioToolbox.h> + +namespace uscxml { + +class AudioToolbox : public PCMConverter { +public: + AudioToolbox(const std::string filename); + virtual ~AudioToolbox(); + virtual void seek(unsigned int pos); + virtual int read(char* buffer, unsigned int size); + + virtual void setOutFormat(const PCMFormat& format); + virtual PCMFormat getInFormat(); + +protected: + ExtAudioFileRef _afId; + AudioStreamBasicDescription _outputFormat; + AudioStreamBasicDescription _inputFormat; + + ALenum formatToALEnum(AudioStreamBasicDescription); + bool alEnumToFormat(AudioStreamBasicDescription&, ALenum); +}; + +} + +#endif /* end of include guard: AUDIOTOOLBOX_H_GX4SW17C */ + + |