CAudioInput Class Reference

class CAudioInput : public CBase

Inherits from

Public Member Functions
~CAudioInput()
voidBufferAck()
voidBufferArrives(CRecorder *)
voidBufferError(CRecorder *, TInt)
voidClose()
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()
voidRelease()
TInt Resume()
TInt SetFormat(const TAudioInputParams &)
TInt SetGain(TInt)
TInt Start()
voidStop()
Private Member Functions
CAudioInput(MAudioInputObserver &)
voidAsyncCallbackL()
TInt BufferLength()
TInt Callback(TAny *)
voidCancel()
voidCancelBusyRecorder()
voidCancelPendingRecorders()
voidCancelRecorders()
voidCheckFullInvariant()
voidCheckInvariant(TBool)
voidConstructL()
voidHandleBufferAck()
voidInternalFlush()
voidInternalStop()
TInt QLength(TSglQue< CRecorder > &)
CRecorder *QPop(TSglQue< CRecorder > &)
TBool QPop(CRecorder *&, TSglQue< CRecorder > &)
voidRecordAllIdle()
voidRequestCallback()
voidUseBuffer(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
enumTRunningState { ERStateRunning, ERStatePaused, ERStateFinishing, ERStateFinished, ERStateFailed }
enumTState { 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()

voidAsyncCallbackL()[private]

BufferAck()

voidBufferAck()

BufferArrives(CRecorder *)

voidBufferArrives(CRecorder *aRecorder)

Parameters

CRecorder * aRecorder

BufferError(CRecorder *, TInt)

voidBufferError(CRecorder *aRecorder,
TIntaError
)

Parameters

CRecorder * aRecorder
TInt aError

BufferLength()

TInt BufferLength()const [private, inline]

Callback(TAny *)

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

Parameters

TAny * aPtr

Cancel()

voidCancel()[private]

CancelBusyRecorder()

voidCancelBusyRecorder()[private]

CancelPendingRecorders()

voidCancelPendingRecorders()[private]

CancelRecorders()

voidCancelRecorders()[private]

CheckFullInvariant()

voidCheckFullInvariant()[private, inline]

CheckInvariant(TBool)

voidCheckInvariant(TBoolaKnownConstructed = ETrue)[private, inline]

Parameters

TBool aKnownConstructed = ETrue

Close()

voidClose()

ConstructL()

voidConstructL()[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()

voidHandleBufferAck()[private]

Initialize(const TAudioInputParams &)

TInt Initialize(const TAudioInputParams &aParams)

Parameters

const TAudioInputParams & aParams

Interface(TUid)

TAny *Interface(TUidaInterfaceUid)

Parameters

TUid aInterfaceUid

InternalFlush()

voidInternalFlush()[private]

InternalStop()

voidInternalStop()[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()

voidRecordAllIdle()[private]

RecordSoundDevice()

RSoundSc &RecordSoundDevice()

Release()

voidRelease()

RequestCallback()

voidRequestCallback()[private]

Resume()

TInt Resume()

SetFormat(const TAudioInputParams &)

TInt SetFormat(const TAudioInputParams &aFormat)

Parameters

const TAudioInputParams & aFormat

SetGain(TInt)

TInt SetGain(TIntaGain)

Parameters

TInt aGain

Start()

TInt Start()

Stop()

voidStop()

UseBuffer(CRecorder *)

voidUseBuffer(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]