kernel/eka/include/drivers/soundsc.inl
changeset 9 96e5fb8b040d
equal deleted inserted replaced
-1:000000000000 9:96e5fb8b040d
       
     1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of the License "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // e32\include\drivers\soundsc.inl
       
    15 // The kernel side inline header file for the shared chunk sound driver.
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalTechnology
       
    22  @prototype
       
    23 */
       
    24 
       
    25 // class TSndScTransfer	
       
    26 
       
    27 inline TInt TSndScTransfer::GetNotStartedLen()
       
    28 	{return(iEndOffset-iStartedOffset);}
       
    29 
       
    30 inline TInt TSndScTransfer::GetStartOffset()
       
    31 	{return(iStartedOffset);}
       
    32 
       
    33 inline TInt TSndScTransfer::GetLengthTransferred()
       
    34 	{return(iLengthTransferred);}
       
    35 	
       
    36 // class TSoundScRequest	
       
    37 	
       
    38 inline TSoundScRequest::TSoundScRequest()
       
    39 	{iNext=NULL; iClientRequest=0;}	
       
    40 	
       
    41 // class TSoundScPlayRequest
       
    42 	
       
    43 inline void TSoundScPlayRequest::SetFail(TInt aCompletionReason)
       
    44 	{iCompletionReason=aCompletionReason; iTf.iTfState=TSndScTransfer::ETfDone;}
       
    45 	
       
    46 inline void TSoundScPlayRequest::UpdateProgress(TInt aLength)
       
    47 	{if (iTf.SetCompleted(aLength)) iCompletionReason=KErrNone;}	
       
    48 			
       
    49 // class TSoundScRequestQueue	
       
    50 		
       
    51 inline TBool TSoundScRequestQueue::IsEmpty()
       
    52 	{return(iPendRequestQ.IsEmpty());}
       
    53 	
       
    54 inline TBool TSoundScRequestQueue::IsAnchor(TSoundScRequest* aReq)
       
    55 	{return(aReq==&iPendRequestQ.iA);}	
       
    56 	
       
    57 // class DRecordBufferManager
       
    58 	
       
    59 inline TAudioBuffer* DRecordBufferManager::GetCurrentRecordBuffer()
       
    60 	{return(iCurrentBuffer);}
       
    61 	
       
    62 inline TAudioBuffer* DRecordBufferManager::GetNextRecordBuffer()
       
    63 	{return(iNextBuffer);}
       
    64 	
       
    65 // class DSoundScLdd
       
    66 
       
    67 inline DSoundScPdd* DSoundScLdd::Pdd()
       
    68 	{return((DSoundScPdd*)iPdd);}
       
    69 	
       
    70 inline void DSoundScLdd::CompletePlayRequest(TSoundScPlayRequest* aReq,TInt aResult)
       
    71 	{aReq->iCompletionReason=aResult; DoCompletePlayRequest(aReq);}	
       
    72 		
       
    73 inline DSoundScLdd* DSoundScPdd::Ldd()
       
    74 	{return(iLdd);}
       
    75 
       
    76 // class DSoundScPdd
       
    77 
       
    78 inline TInt DSoundScPdd::TimeTransferred(TInt64& /*aTime*/, TInt /*aState*/)
       
    79 	{return(KErrNotSupported);}