// BASNDUT.H
//
// Copyright (c) 1997-1999 Symbian Ltd.  All rights reserved.
//

// Started by JL, July 1996
// Sound utilities
//
#if !defined(__BASNDUT_H__)
#define __BASNDUT_H__

#if !defined(__E32BASE_H__)
#include <e32base.h>
#endif

#if !defined(__S32FILE_H__)
#include <s32file.h>
#endif

#if !defined(__BADESCA_H__)
#include <badesca.h> // for CDesCArray typedef which cannot be forward referenced
#endif

#if !defined(__BACMPBS_H__)
#include <bacmpbs.h>
#endif

const TInt KMaxAlarmSoundFileNameLength=0x20;

class RDevSound;

class SoundUtilities
	{
public:
	enum TDeviceVolume {EToneOff,EToneQuiet,EToneMedium,EToneLoud};		// must match TSoundVolume in d32snd.h
	enum {KMaxToneAmplitude=100};										// must match KMaxSineWaveAmplitude in d32snd.h
public:
	IMPORT_C static TInt PlayTone(TInt aFrequency,TTimeIntervalMicroSeconds32 aDuration,TInt aAmplitude,TDeviceVolume aVolume);
//
	IMPORT_C static TInt PopulateSoundNameList(RFs& aFs,RDevSound& aDevSound,CDesCArray& aList);
	IMPORT_C static void PopulateAlarmSoundFilesL(RFs& aFs,CDesCArray& aList);
	IMPORT_C static void PopulateAlgorithmicSoundsL(RDevSound& aDevSound,CDesCArray& aList);
//
	IMPORT_C static TPtrC SoundFileSearchPath();
	IMPORT_C static TInt SoundFileByName(RFs& aFs,TFileName& aFileName,const TDesC& aName);
	IMPORT_C static TBool IsSoundFileL(RFs& aFs,const TDesC& aFullFileName);
//
	IMPORT_C static TInt PopulateCompressorList(RFs& aFs,CCompressorList& aList);
	IMPORT_C static TCompressorPtr CreateCompressor(RFs& aFs,const TUid aUid);
//
	IMPORT_C static TStreamId SoundStreamIdL(CPersistentStore& aStore);
	};

#endif

