www.pudn.com > Tetris.rar > TAudioShared.h


#ifndef __TAUDIOSHARED_H 
#define __TAUDIOSHARED_H 
 
 
#include "TSample.h" 
 
#include  
 
 
const TInt KMaxChannels = 16; 
const TInt KAudioShift	= 12; 
 
enum TMixerCmd 
{ 
	ECmdStartMixer = 0, 
	ECmdStopMixer, 
	ECmdDestroyMixer 
}; 
 
class TAudioShared 
{ 
// Data 
public: 
	/// for thread end signaling 
	RSemaphore	iAliveMutex; 
 
	/// for sample attribute change signaling 
	RMutex	iMutex; 
 
	/// pause flag 
	TBool	iPaused; 
 
	/// sample attributes 
	TSample iSample[ KMaxChannels ]; 
	TInt	iVolume[ KMaxChannels ]; 
	TInt	iFrequency[ KMaxChannels ]; 
	TBool	iPlayStarted[ KMaxChannels ]; 
 
	/// main volume 
	TInt	iMainVolume; 
 
	/// Command parameter 
	TMixerCmd	iCmd; 
}; 
 
#endif