00001
00022 #ifndef __OMX_SYMBIAN_OUTPUT_STREAM_H__
00023 #define __OMX_SYMBIAN_OUTPUT_STREAM_H__
00024
00025 #include <MdaAudioOutputStream.h>
00026 #include <Mda\Common\Audio.h>
00027
00028 class OmxSymbianOutputStream : public CActiveScheduler,
00029 public MMdaAudioOutputStreamCallback
00030 {
00031 public:
00032 OmxSymbianOutputStream();
00033 virtual ~OmxSymbianOutputStream();
00034
00035 int Open(int sampleRate, int channels);
00036 void Close();
00037
00038 int WriteAudioData(unsigned char* buffer, int length);
00039
00040
00041 void MaoscOpenComplete(TInt aError);
00042 void MaoscBufferCopied(TInt aError, const TDesC8 &aBuffer);
00043 void MaoscPlayComplete(TInt aError);
00044
00045 private:
00046 CTrapCleanup *iCleanup;
00047 CMdaAudioOutputStream *iOutputStream;
00048 TPtr8 iPlayBuffer;
00049 TBool iOpenComplete;
00050 TBool iPlayComplete;
00051 };
00052
00053 #endif // __OMX_SYMBIAN_OUTPUT_STREAM_H__