Audio input streaming problem
| Tue, 2005-02-01 10:57 | |
|
Hello everyone,
I am using the symbian series 60 v2.0 sdk and I am having trouble recording audio from the microphone using the CMdaAudioInputStream class. I do everything according to the documentation: I open the stream given it a setting struct, The open callback is successfull so after that I start recording. I use CMdaAudioInputStream::ReadL and call it 3 times with 3 different buffers. The recording starts and I see that the buffer copied callback comes back all right and the recording is going good. The Problem I have is that when I use CMdaAudioInputStream::Stop() to stop the recording I don't get the callback that the recording completed (MaiscRecordComplete), I get 3 MaiscBufferCopied callbacks with KErrAborted, but no call back that the record it self was completed. So to know when the recording finished I wait for the 3 buffers to comeback with KErrAborted, But then on the emulator when my program exists I get a panic saying that something on the heap was not cleaned, after debugging it I saw that a part of the CMdaAudioInputStream class is not cleaned. Can anyone please help me? Specially with understanding why MaiscRecordComplete is never called ? even though the documentation says it should? Thanks in advance |
|






Forum posts: 17
Thats why when we call a Stop() API then may be some of the part of I/O stream buffer is empty that's why MaiscRecordComplete is not called.
Otherwise you can place a check statement in MaiscBufferCopied and call a Stop() API before ReadL() API, in that case program counter will definately go to MaiscRecordComplete .
It is because MaiscBufferCopied callback will be called only when the buferr is completely filled with data.