CAudioInput Class Reference

class CAudioInput : public CBase

Inherits from

Public Member Functions
~CAudioInput ()
void BufferAck ()
void BufferArrives ( CRecorder *)
void BufferError ( CRecorder *, TInt )
void Close ()
TInt Flush ()
TInt GetBufferSizes ( TInt &, TInt &)
TInt GetSupportedSampleRates ( RArray < TInt > &)
TInt GetSupportedSampleRates ( RArray < TInt > &, RSoundSc &)
TInt Initialize (const TAudioInputParams &)
TAny * Interface ( TUid )
TInt NegotiateFormat (const TAudioInputParams &, TFormatData &)
CAudioInput * NewL ( MAudioInputObserver &)
TInt Pause ()
RSoundSc & RecordSoundDevice ()
void Release ()
TInt Resume ()
TInt SetFormat (const TAudioInputParams &)
TInt SetGain ( TInt )
TInt Start ()
void Stop ()
Private Member Functions
CAudioInput ( MAudioInputObserver &)
void AsyncCallbackL ()
TInt BufferLength ()
TInt Callback ( TAny *)
void Cancel ()
void CancelBusyRecorder ()
void CancelPendingRecorders ()
void CancelRecorders ()
void CheckFullInvariant ()
void CheckInvariant ( TBool )
void ConstructL ()
void HandleBufferAck ()
void InternalFlush ()
void InternalStop ()
TInt QLength ( TSglQue < CRecorder > &)
CRecorder * QPop ( TSglQue < CRecorder > &)
TBool QPop ( CRecorder *&, TSglQue < CRecorder > &)
void RecordAllIdle ()
void RequestCallback ()
void UseBuffer ( CRecorder *)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enum TRunningState { ERStateRunning , ERStatePaused , ERStateFinishing , ERStateFinished , ERStateFailed }
enum TState { EStateCreated2 , EStateInitialized2 , EStateRecordWait2 , EStateRecordWaitAck2 }
Private Attributes
CAsyncCallBack * iAsyncCallBack
TPtrC8 iBufPtr
TInt iBufferLength
TSglQue < CRecorder > iBusyQueue
RChunk iChunk
RBuf8 iConvBuff
CChannelAndSampleRateConverter * iConverter
TSglQue < CRecorder > iIdleQueue
MAudioInputObserver & iObserver
TSglQue < CRecorder > iPendingQueue
TRunningState iRState
TRecordSharedChunkBufConfig iRecordBufferConfig
RSoundSc iRecordSoundDevice
CRecorder * iRecorders
TSglQue < CRecorder > iRecordingQueue
TState iState

Constructor & Destructor Documentation

CAudioInput(MAudioInputObserver &)

CAudioInput ( MAudioInputObserver & aObserver ) [private]

Parameters

MAudioInputObserver & aObserver

~CAudioInput()

~CAudioInput ( )

Member Functions Documentation

AsyncCallbackL()

void AsyncCallbackL ( ) [private]

BufferAck()

void BufferAck ( )

BufferArrives(CRecorder *)

void BufferArrives ( CRecorder * aRecorder )

Parameters

CRecorder * aRecorder

BufferError(CRecorder *, TInt)

void BufferError ( CRecorder * aRecorder,
TInt aError
)

Parameters

CRecorder * aRecorder
TInt aError

BufferLength()

TInt BufferLength ( ) const [private, inline]

Callback(TAny *)

TInt Callback ( TAny * aPtr ) [private, static]

Parameters

TAny * aPtr

Cancel()

void Cancel ( ) [private]

CancelBusyRecorder()

void CancelBusyRecorder ( ) [private]

CancelPendingRecorders()

void CancelPendingRecorders ( ) [private]

CancelRecorders()

void CancelRecorders ( ) [private]

CheckFullInvariant()

void CheckFullInvariant ( ) [private, inline]

CheckInvariant(TBool)

void CheckInvariant ( TBool aKnownConstructed = ETrue ) [private, inline]

Parameters

TBool aKnownConstructed = ETrue

Close()

void Close ( )

ConstructL()

void ConstructL ( ) [private]

Flush()

TInt Flush ( )

GetBufferSizes(TInt &, TInt &)

TInt GetBufferSizes ( TInt & aMinSize,
TInt & aMaxSize
)

Parameters

TInt & aMinSize
TInt & aMaxSize

GetSupportedSampleRates(RArray< TInt > &)

TInt GetSupportedSampleRates ( RArray < TInt > & aSupportedSampleRates )

Parameters

RArray < TInt > & aSupportedSampleRates

GetSupportedSampleRates(RArray< TInt > &, RSoundSc &)

TInt GetSupportedSampleRates ( RArray < TInt > & aSupportedSampleRates,
RSoundSc & aSoundDevice
)

Parameters

RArray < TInt > & aSupportedSampleRates
RSoundSc & aSoundDevice

HandleBufferAck()

void HandleBufferAck ( ) [private]

Initialize(const TAudioInputParams &)

TInt Initialize ( const TAudioInputParams & aParams )

Parameters

const TAudioInputParams & aParams

Interface(TUid)

TAny * Interface ( TUid aInterfaceUid )

Parameters

TUid aInterfaceUid

InternalFlush()

void InternalFlush ( ) [private]

InternalStop()

void InternalStop ( ) [private]

NegotiateFormat(const TAudioInputParams &, TFormatData &)

TInt NegotiateFormat ( const TAudioInputParams & aFormat,
TFormatData & aFormatData
)

Parameters

const TAudioInputParams & aFormat
TFormatData & aFormatData

NewL(MAudioInputObserver &)

CAudioInput * NewL ( MAudioInputObserver & aObserver ) [static]

Parameters

MAudioInputObserver & aObserver

Pause()

TInt Pause ( )

QLength(TSglQue< CRecorder > &)

TInt QLength ( TSglQue < CRecorder > & aQueue ) [private, static]

Parameters

TSglQue < CRecorder > & aQueue

QPop(TSglQue< CRecorder > &)

CRecorder * QPop ( TSglQue < CRecorder > & aQueue ) [private]

Parameters

TSglQue < CRecorder > & aQueue

QPop(CRecorder *&, TSglQue< CRecorder > &)

TBool QPop ( CRecorder *& aRecorder,
TSglQue < CRecorder > & aQueue
) [private, inline]

Parameters

CRecorder *& aRecorder
TSglQue < CRecorder > & aQueue

RecordAllIdle()

void RecordAllIdle ( ) [private]

RecordSoundDevice()

RSoundSc & RecordSoundDevice ( )

Release()

void Release ( )

RequestCallback()

void RequestCallback ( ) [private]

Resume()

TInt Resume ( )

SetFormat(const TAudioInputParams &)

TInt SetFormat ( const TAudioInputParams & aFormat )

Parameters

const TAudioInputParams & aFormat

SetGain(TInt)

TInt SetGain ( TInt aGain )

Parameters

TInt aGain

Start()

TInt Start ( )

Stop()

void Stop ( )

UseBuffer(CRecorder *)

void UseBuffer ( CRecorder * aRecorder ) [private]

Parameters

CRecorder * aRecorder

Member Enumerations Documentation

Enum TRunningState

Enumerators

ERStateRunning
ERStatePaused
ERStateFinishing
ERStateFinished
ERStateFailed

Enum TState

Enumerators

EStateCreated2
EStateInitialized2
EStateRecordWait2
EStateRecordWaitAck2

Member Data Documentation

CAsyncCallBack * iAsyncCallBack

CAsyncCallBack * iAsyncCallBack [private]

TPtrC8 iBufPtr

TPtrC8 iBufPtr [private]

TInt iBufferLength

TInt iBufferLength [private]

TSglQue< CRecorder > iBusyQueue

TSglQue < CRecorder > iBusyQueue [private]

RChunk iChunk

RChunk iChunk [private]

RBuf8 iConvBuff

RBuf8 iConvBuff [private]

CChannelAndSampleRateConverter * iConverter

CChannelAndSampleRateConverter * iConverter [private]

TSglQue< CRecorder > iIdleQueue

TSglQue < CRecorder > iIdleQueue [private]

MAudioInputObserver & iObserver

MAudioInputObserver & iObserver [private]

TSglQue< CRecorder > iPendingQueue

TSglQue < CRecorder > iPendingQueue [private]

TRunningState iRState

TRunningState iRState [private]

TRecordSharedChunkBufConfig iRecordBufferConfig

TRecordSharedChunkBufConfig iRecordBufferConfig [private]

RSoundSc iRecordSoundDevice

RSoundSc iRecordSoundDevice [private]

CRecorder * iRecorders

CRecorder * iRecorders [private]

TSglQue< CRecorder > iRecordingQueue

TSglQue < CRecorder > iRecordingQueue [private]

TState iState

TState iState [private]