00001 // Copyright (C) 2002-2018 Nikolaus Gebhardt 00002 // This file is part of the "irrKlang" library. 00003 // For conditions of distribution and use, see copyright notice in irrKlang.h 00004 00005 #ifndef __I_IRRKLANG_AUDIO_RECORDER_H_INCLUDED__ 00006 #define __I_IRRKLANG_AUDIO_RECORDER_H_INCLUDED__ 00007 00008 #include "ik_IRefCounted.h" 00009 #include "ik_ISoundSource.h" 00010 00011 00012 namespace irrklang 00013 { 00014 class ICapturedAudioDataReceiver; 00015 00017 00019 class IAudioRecorder : public virtual IRefCounted 00020 { 00021 public: 00022 00024 00034 virtual bool startRecordingBufferedAudio(ik_s32 sampleRate=22000, 00035 ESampleFormat sampleFormat=ESF_S16, 00036 ik_s32 channelCount=1) = 0; 00037 00039 00050 virtual bool startRecordingCustomHandledAudio(ICapturedAudioDataReceiver* receiver, 00051 ik_s32 sampleRate=22000, 00052 ESampleFormat sampleFormat=ESF_S16, 00053 ik_s32 channelCount=1) = 0; 00054 00056 virtual void stopRecordingAudio() = 0; 00057 00059 00064 virtual ISoundSource* addSoundSourceFromRecordedAudio(const char* soundName) = 0; 00065 00067 00068 virtual void clearRecordedAudioDataBuffer() = 0; 00069 00071 virtual bool isRecording() = 0; 00072 00074 00075 virtual SAudioStreamFormat getAudioFormat() = 0; 00076 00078 00084 virtual void* getRecordedAudioData() = 0; 00085 00087 00089 virtual const char* getDriverName() = 0; 00090 }; 00091 00092 00094 00095 class ICapturedAudioDataReceiver : public IRefCounted 00096 { 00097 public: 00098 00100 00103 virtual void OnReceiveAudioDataStreamChunk(unsigned char* audioData, unsigned long lengthInBytes) = 0; 00104 }; 00105 00106 00107 } // end namespace irrklang 00108 00109 00110 #endif
The irrKlang
Engine Documentation © 2003-2018 by Nikolaus Gebhardt. Generated
by Doxygen
(1.6.1) |