www.pudn.com > SoundMixer_Example_v1_0.zip > SoundMixerContainer.h


   /* 
    * 
============================================================================ 
    *  Name     : SoundMixerContainer.h 
    *  Part of  : SoundMixer 
    *  Created  : 03/01/2003 by Forum Nokia 
    *  Description: 
    *     This is the project specification file for SoundMixer. 
    *     Initial content was generated by Series 60 AppWizard. 
    * 
    *  Version  : 1.0.0 
    *  Copyright: Forum Nokia 
    * 
============================================================================ 
    */ 
 
#ifndef __SOUNDMIXERCONTAINER_H__ 
#define __SOUNDMIXERCONTAINER_H__ 
 
// INCLUDES 
#include  
#include  
#include  
#include  
#include "TSample.h" 
 
// FORWARD DECLARATIONS 
class CSndMixer; 
 
// CLASS DECLARATION 
/** 
*  CSoundMixerContainer  container control class. 
*   
*/ 
class CSoundMixerContainer  
	: public CCoeControl 
	, public MCoeForegroundObserver 
	{ 
    public: // Constructors and destructor 
         
		// Second phase constructor 
        void ConstructL(const TRect& aRect); 
 
		// Default destructor 
        ~CSoundMixerContainer(); 
 
    public: // CCoeControl 
 
		TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType ); 
 
	private: // MCoeForegroundObserver 
 
		void HandleGainingForeground(); 
		void HandleLosingForeground(); 
 
	private: 
 
		/// Static callback function for timer,  
		/// called periodically 
		/// @param aPtr pointer to this class 
		static TInt TimerCallBack( TAny* aPtr ); 
 
		/// Timer function called from TimerCallBack 
		/// takes care for everything moving in this example 
		TInt DoTimer(); 
 
	public: // for AppUI 
 
		/// Stops mixer 
		void StopMixer(); 
 
		/// Starts mixer 
		void StartMixer(); 
 
		/// increases volume 
		void VolumeUp(); 
 
		/// decreases volume 
		void VolumeDown(); 
 
 
 
    private: // data 
         
 
		CSndMixer*	iSndMixer;			// Sound mixer 
 
		TSample		iMusicSample;		// sampled music 
		TSample		iEffectSample;		// sound effect 
		TSample		iEffectSample2;		// sound effect 
		 
		TPoint		iPosition[ 8 ];		// positions for blocks 
		TPoint		iSpeed[ 8 ];		// speeds for blocks 
 
		CPeriodic* iTimer;				// timer which calls TimerCallBack 
		 
    }; 
 
 
#endif