sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32\include\drivers\d32soundsc.inl sl@0: // User side inline header file for the shared chunk sound driver. sl@0: // sl@0: // sl@0: sl@0: /** sl@0: @file sl@0: @publishedPartner sl@0: @prototype sl@0: */ sl@0: sl@0: inline TVersion RSoundSc::VersionRequired() sl@0: { sl@0: const TInt KSoundScMajorVersionNumber=1; sl@0: const TInt KSoundScMinorVersionNumber=0; sl@0: const TInt KSoundScBuildVersionNumber=KE32BuildVersionNumber; sl@0: return TVersion(KSoundScMajorVersionNumber,KSoundScMinorVersionNumber,KSoundScBuildVersionNumber); sl@0: } sl@0: sl@0: #ifndef __KERNEL_MODE__ sl@0: sl@0: inline TInt RSoundSc::Open(TInt aUnit) sl@0: {return(DoCreate(KDevSoundScName,VersionRequired(),aUnit,NULL,NULL,EOwnerProcess));} sl@0: sl@0: inline void RSoundSc::Caps(TDes8& aCapsBuf) sl@0: {DoControl(EControlGetCaps,(TAny*)&aCapsBuf);} sl@0: sl@0: inline void RSoundSc::AudioFormat(TDes8& aFormatBuf) sl@0: {DoControl(EControlGetAudioFormat,(TAny*)&aFormatBuf);} sl@0: sl@0: inline TInt RSoundSc::SetAudioFormat(const TDesC8& aFormatBuf) sl@0: {return(DoControl(EMsgControlSetAudioFormat,(TAny*)&aFormatBuf));} sl@0: sl@0: inline void RSoundSc::GetBufferConfig(TDes8& aConfigBuf) sl@0: {DoControl(EControlGetBufConfig,(TAny*)&aConfigBuf);} sl@0: sl@0: inline TInt RSoundSc::SetBufferChunkCreate(const TDesC8& aConfigBuf,RChunk& aChunk) sl@0: {return(aChunk.SetReturnedHandle(DoControl(EMsgControlSetBufChunkCreate,(TAny*)&aConfigBuf)));} sl@0: sl@0: inline TInt RSoundSc::SetBufferChunkOpen(const TDesC8& aConfigBuf,RChunk& aChunk) sl@0: {return(DoControl(EMsgControlSetBufChunkOpen,(TAny*)&aConfigBuf,(TAny*)aChunk.Handle()));} sl@0: sl@0: inline TInt RSoundSc::Volume() sl@0: {return(DoControl(EControlGetVolume));} sl@0: sl@0: inline TInt RSoundSc::SetVolume(TInt aVolume) sl@0: {return(DoControl(EMsgControlSetVolume,(TAny*)aVolume));} sl@0: sl@0: inline void RSoundSc::PlayData(TRequestStatus& aStatus,TInt aBufferOffset,TInt aLength,TUint aFlags) sl@0: { sl@0: SRequestPlayDataInfo info = {aBufferOffset,aLength,aFlags}; sl@0: DoRequest(EMsgRequestPlayData,aStatus,&info); sl@0: } sl@0: sl@0: inline void RSoundSc::RecordData(TRequestStatus& aStatus, TInt& aLength) sl@0: {DoRequest(ERequestRecordData,aStatus,(TAny*)&aLength);} sl@0: sl@0: inline TInt RSoundSc::ReleaseBuffer(TInt aChunkOffset) sl@0: {return(DoControl(EControlReleaseBuffer,(TAny*)aChunkOffset));} sl@0: sl@0: inline void RSoundSc::CancelPlayData() sl@0: {DoCancel(1<