演示如何在S60进行混音。如果不进行手动混音就无法同时播放多个音效。

源代码在线查看: taudioshared.h

软件大小: 217 K
上传用户: lemon_zc1949
关键词: S60 混音 手动 播放
下载地址: 免注册下载 普通下载 VIP

相关代码

				   /*
				    *
				============================================================================
				    *  Name     : TAudioShared.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 __TAUDIOSHARED_H__
				#define __TAUDIOSHARED_H__
				
				// INCLUDES
				#include 
				#include "TSample.h"
				
				// CONSTANTS
				const TInt KMaxChannels = 16;
				const TInt KAudioShift = 12;
				
				// ENUMERATIONS
				enum TMixerCmd
					{
					ECmdStartMixer = 0,
					ECmdStopMixer,
					ECmdDestroyMixer
					};
				
				// CLASS DECLARATION
				/**
				*	TAudioShared is internal type for sound mixer application.
				*	This struct is used for inter-thread data trasfer and
				*	communication
				*/
				
				class TAudioShared
					{
					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			

相关资源