Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]

#include <MdaAudioInputStream.h>

Class MMdaAudioInputStreamCallback

class MMdaAudioInputStreamCallback;

Description

An interface class that notifies the client of the progress of the audio input streaming.

It must be implemented by users of the CMdaAudioInputStream class.

An object that implements this interface is passed to CMdaAudioInputStream::NewL(MMdaAudioInputStreamCallback &).

Members

Defined in MMdaAudioInputStreamCallback:


Member functions


MaiscOpenComplete(TInt)

virtual void MaiscOpenComplete(TInt aError)=0;

Description

A callback function that is called when CMdaAudioInputStream::Open(TMdaPackage *) has completed, indicating that the audio input stream is ready for use.

Parameters

TInt aError

An error value which indicates if open was successful or not. KErrNone if the open succeeded, otherwise one of the system error codes.


MaiscBufferCopied(TInt,const TDesC8 &)

virtual void MaiscBufferCopied(TInt aError, const TDesC8 &aBuffer)=0;

Description

A callback function that is called when a chunk of audio data has been copied to the descriptor specified in a CMdaAudioInputStream::ReadL(TDes8 &).

It is also called as part of a 'cleanup' operation when CMdaAudioInputStream::Stop() is used. In such circumstances, the remaining audio data in the FIFO since the last ReadL() and the Stop() command is returned. In addition aError is set to KErrAbort.

Use this callback to retrieve the pointers to your recorded data and to issue subsequent ReadL() calls, and be prepared to shut down you recording functions if KErrAbort (input stream closed) is returned in aError.

Parameters

TInt aError

An error value indicating if the copy was successful. KErrNone if the copy succeeded, KErrAbort if the input stream was closed for some reason, otherwise one of the system error codes.

const TDesC8 &aBuffer

A reference to the buffer that has been copied.


MaiscRecordComplete(TInt)

virtual void MaiscRecordComplete(TInt aError)=0;

Description

A callback function that is called when the input stream is closed using CMdaAudioInputStream::Stop().

This callback is usually 'paired' with a MMdaAudioInputStreamCallback::MaiscBufferCopied(TInt,const TDesC8 &) that returns the last remaining audio data in the FIFO between the last CMdaAudioInputStream::ReadL(TDes8 &) and the Stop() command.

Parameters

TInt aError

An error value indicating if the record was successful. KErrNone if the stop succeeded, otherwise one of the system error codes.