/****************************************************************************
CopyRight (c) Tencent Technology(ShenZhen) Co., Ltd
WinAdvanceFunction Header
This header file is provided for Windows only.
GME provides some additional functions. 
This file is not long supported, if u need call the api in this file please let us konwn.
And you mast download some-other part and extract to your installation folder from
http://dldir1.qq.com/hudongzhibo/QCloud_TGP/GME/pubilc/GME_Accompany_Plugin.zip
From the tencent clould or mail to seiyabai@tencent.com
*****************************************************************************/
#pragma once
#include "../tmg_sdk.h"
#include "av_error.h"

typedef enum  {
	AV_ACCOMPANY_SOURCE_TYPE_NONE = 0, ///< Default value
	AV_ACCOMPANY_SOURCE_TYPE_SYSTEM = 1, ///< we will hook the system sound as accompany source.
	AV_ACCOMPANY_SOURCE_TYPE_PROCESS = 2, ///< Open a music player as the accompany source.
}GMEAccompany_SourceType;
class ITMGAdvance_Win {
public:
    ~ITMGAdvance_Win() {}

	//Set some advance params to GME.
	virtual int SetAdvanceParameter(const char* key, const char* value) = 0;
	
	//Start playing mediaFilePath with player playerPath as accompany source
	//playerPath : The utf-8 string aim the path of palyer.
	//				Note : the player now we only support x86 exe
	//playerPathLength : the length of playerPath
	//mediaFilePath : the sound u wanner to play,  file format same as your player.
	//sourceType : the type form media player or system.
	virtual int StartAccompany(const char* playerPath,
								int playerPathLength,
								const char* mediaFilePath,
								int mediaFilePathLenght,
								GMEAccompany_SourceType sourceType) = 0;
	virtual int StopAccompany() = 0;

	//set the volume
	virtual int SetAccompanyVolume(int value) = 0;
	virtual int GetAccompanyVolume(int* pVolume) = 0;

	//Get the power of volume, you can use it to show the sound wave.
	virtual int GetAccompanyVolumeDynamic(int* pVolume) = 0;
	
	// Set the volume of the microphone devices
	//[in]vol--->Audio Volume reference range[0 to 100],default value is 100
	virtual int SetMicDeviceVolume(int vol) = 0;
	
	// Get the volume of microphone device
	virtual int GetMicDeviceVolume() = 0;
	
		
	// Set the volume of the speaker devices
	//[in]vol--->Audio Volume reference range[0 to 100],default value is 100
	virtual int SetSpeakerDeviceVolume(int vol) = 0;
	
	// Get the volume of speaker device
	virtual int GetSpeakerDeviceVolume() = 0;
};

QAVSDK_API ITMGAdvance_Win* QAVSDK_CALL ITMGAdvanceGetInstance();
