os/kernelhwsrv/kernel/eka/include/d32soundsc.inl
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// e32\include\drivers\d32soundsc.inl
sl@0
    15
// User side inline header file for the shared chunk sound driver.
sl@0
    16
// 
sl@0
    17
//
sl@0
    18
sl@0
    19
/**
sl@0
    20
 @file
sl@0
    21
 @publishedPartner
sl@0
    22
 @prototype
sl@0
    23
*/
sl@0
    24
sl@0
    25
inline TVersion RSoundSc::VersionRequired()
sl@0
    26
	{
sl@0
    27
	const TInt KSoundScMajorVersionNumber=1;
sl@0
    28
	const TInt KSoundScMinorVersionNumber=0;
sl@0
    29
	const TInt KSoundScBuildVersionNumber=KE32BuildVersionNumber;
sl@0
    30
	return TVersion(KSoundScMajorVersionNumber,KSoundScMinorVersionNumber,KSoundScBuildVersionNumber);
sl@0
    31
	}
sl@0
    32
sl@0
    33
#ifndef __KERNEL_MODE__
sl@0
    34
sl@0
    35
inline TInt RSoundSc::Open(TInt aUnit)
sl@0
    36
	{return(DoCreate(KDevSoundScName,VersionRequired(),aUnit,NULL,NULL,EOwnerProcess));}
sl@0
    37
	
sl@0
    38
inline void RSoundSc::Caps(TDes8& aCapsBuf)
sl@0
    39
	{DoControl(EControlGetCaps,(TAny*)&aCapsBuf);}
sl@0
    40
	
sl@0
    41
inline void RSoundSc::AudioFormat(TDes8& aFormatBuf)
sl@0
    42
	{DoControl(EControlGetAudioFormat,(TAny*)&aFormatBuf);}
sl@0
    43
	
sl@0
    44
inline TInt RSoundSc::SetAudioFormat(const TDesC8& aFormatBuf)
sl@0
    45
	{return(DoControl(EMsgControlSetAudioFormat,(TAny*)&aFormatBuf));}
sl@0
    46
sl@0
    47
inline void RSoundSc::GetBufferConfig(TDes8& aConfigBuf)
sl@0
    48
	{DoControl(EControlGetBufConfig,(TAny*)&aConfigBuf);}
sl@0
    49
 	
sl@0
    50
inline TInt RSoundSc::SetBufferChunkCreate(const TDesC8& aConfigBuf,RChunk& aChunk)
sl@0
    51
 	{return(aChunk.SetReturnedHandle(DoControl(EMsgControlSetBufChunkCreate,(TAny*)&aConfigBuf)));}
sl@0
    52
 		
sl@0
    53
inline TInt RSoundSc::SetBufferChunkOpen(const TDesC8& aConfigBuf,RChunk& aChunk)
sl@0
    54
 	{return(DoControl(EMsgControlSetBufChunkOpen,(TAny*)&aConfigBuf,(TAny*)aChunk.Handle()));}
sl@0
    55
 	
sl@0
    56
inline TInt RSoundSc::Volume()
sl@0
    57
	{return(DoControl(EControlGetVolume));}
sl@0
    58
	
sl@0
    59
inline TInt RSoundSc::SetVolume(TInt aVolume)
sl@0
    60
	{return(DoControl(EMsgControlSetVolume,(TAny*)aVolume));}
sl@0
    61
	
sl@0
    62
inline void RSoundSc::PlayData(TRequestStatus& aStatus,TInt aBufferOffset,TInt aLength,TUint aFlags)
sl@0
    63
	{
sl@0
    64
	SRequestPlayDataInfo info = {aBufferOffset,aLength,aFlags};
sl@0
    65
	DoRequest(EMsgRequestPlayData,aStatus,&info);
sl@0
    66
	}
sl@0
    67
	
sl@0
    68
inline void RSoundSc::RecordData(TRequestStatus& aStatus, TInt& aLength)
sl@0
    69
	{DoRequest(ERequestRecordData,aStatus,(TAny*)&aLength);}	
sl@0
    70
sl@0
    71
inline TInt RSoundSc::ReleaseBuffer(TInt aChunkOffset)
sl@0
    72
	{return(DoControl(EControlReleaseBuffer,(TAny*)aChunkOffset));}
sl@0
    73
		
sl@0
    74
inline void RSoundSc::CancelPlayData()
sl@0
    75
	{DoCancel(1<<EMsgRequestPlayData);}
sl@0
    76
	
sl@0
    77
inline void RSoundSc::CancelRecordData()
sl@0
    78
	{DoCancel(1<<ERequestRecordData);}	
sl@0
    79
sl@0
    80
inline void RSoundSc::Cancel(const TRequestStatus& aStatus)
sl@0
    81
	{DoControl(EMsgControlCancelSpecific,(TAny*)&aStatus);}
sl@0
    82
		
sl@0
    83
inline TInt RSoundSc::BytesTransferred()
sl@0
    84
	{return(DoControl(EControlBytesTransferred));}
sl@0
    85
	
sl@0
    86
inline void RSoundSc::ResetBytesTransferred()
sl@0
    87
	{DoControl(EControlResetBytesTransferred);}
sl@0
    88
	
sl@0
    89
inline TInt RSoundSc::Pause()
sl@0
    90
	{return(DoControl(EMsgControlPause));}
sl@0
    91
	
sl@0
    92
inline TInt RSoundSc::Resume()
sl@0
    93
	{return(DoControl(EMsgControlResume));}
sl@0
    94
	
sl@0
    95
inline void RSoundSc::NotifyChangeOfHwConfig(TRequestStatus& aStatus,TBool& aHeadsetPresent)
sl@0
    96
	{DoRequest(ERequestNotifyChangeOfHwConfig,aStatus,(TAny*)&aHeadsetPresent);}
sl@0
    97
sl@0
    98
inline void RSoundSc::CancelNotifyChangeOfHwConfig()
sl@0
    99
	{DoCancel(1<<ERequestNotifyChangeOfHwConfig);}
sl@0
   100
	
sl@0
   101
inline TInt RSoundSc::CustomConfig(TInt aFunction,TAny* aParam)
sl@0
   102
	{return(DoControl(EMsgControlCustomConfig,(TAny*)aFunction,(TAny*)aParam));}
sl@0
   103
sl@0
   104
inline TInt RSoundSc::TimePlayed(TTimeIntervalMicroSecondsBuf& aTimePlayed)
sl@0
   105
	{return(DoControl(EControlTimePlayed,(TAny*)&aTimePlayed));}
sl@0
   106
sl@0
   107
inline TInt RSoundSc::TimeRecorded(TTimeIntervalMicroSecondsBuf& aTimeRecorded)
sl@0
   108
	{return(DoControl(EControlTimeRecorded,(TAny*)&aTimeRecorded));}
sl@0
   109
sl@0
   110
#endif	// __KERNEL_MODE__
sl@0
   111