亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? o_karaoke.c

?? ZORAN 962/966 SOURCE CODE,DVD chip
?? C
?? 第 1 頁 / 共 3 頁
字號:
/* **************************************************************************************
*  Copyright (c) 2005 ZORAN Corporation, All Rights Reserved
*  THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF ZORAN CORPORATION
*
*  File: $Workfile: o_karaoke.c$
*
* Description:
* ========
* Project definition of the MSO_KARAOKE
*
****************************************************************************************/
#include "Config.h"				// Global Configuration - do not remove!
#include "Include\SysDefs.h"	// Global definition - do not remove!

#ifdef _DEBUG
#undef IFTRACE
#define IFTRACE if (gTraceUI)
#include "Debug\DbgMain.h"
#endif //_DEBUG

#ifdef INTERNAL_KARAOKE

/***************************************************************************************
* Include files
****************************************************************************************/
#include <stdio.h>
#include <string.h>
#include "include\sysdefs.h"
#include "Playcore\Coremain\coregdef.h"
#include "Playcore\Ps\Ps.h"

//Include API Files
#include "CoreAPI\CoreAPI.h"

// Included UI LOW LEVEL files

// Included UI MENU SYSTEM files
#include "GUI\Menu_system\ms_object.h"
#include "GUI\Menu_system\osd_rendering.h"
#include "GUI\Menu_system\ms_screen.h"
#include "GUI\Menu_system\ms_menu.h"
#include "GUI\Menu_system\ms_component.h"
#include "GUI\Menu_system\ms_container.h"
#include "GUI\Menu_system\ms_display.h"

#include "GUI\Object_class\Text\mso_text.h"
#include "GUI\Object_class\Hscroll\mso_hscroll_text.h"
#include "GUI\Object_class\Page\mso_page.h"
#include "GUI\Object_class\Button\mso_button.h"
#include "GUI\Object_class\Vlist\mso_vlist.h"
#include "GUI\Object_class\Choice\mso_choice.h"
#include "GUI\Object_class\Hslider\mso_hslider.h"

// Included CUSTOMER files
#include "Components\Message\o_message_handler.h"
#include "Resource\Bitmap\bitmap.h"
#include "Menu\menu_operation_def.h"
#include "Menu_config\menu_config_common.h"

// Included string related files
#include "Library\String_generate.h"
#include "Library\Number.h"
#include "Strings\Strings.h"
#include "Library\Container_misc.h"


#ifndef DEBUG_UI_TRACE
#undef dbg_printf(sMsg)
#define dbg_printf(sMsg)
#undef	dbgm_printf(sMsg, mode)
#define dbgm_printf(sMsg, mode)
#endif

// Include the module header file
#include "Components\Karaoke\o_karaoke.h"
// Include custom header file: customer specific definitions, over-writing common ones.
#include "Components\Karaoke\o_karaoke_config.h"
// Include configuration header file: named constants, macros and typedefs.
#include "Components\Custom\Karaoke\o_karaoke_custom.h"


/***************************************************************************************
* 	Utility functions
****************************************************************************************/
static BOOL _AddItemsToKaraokeKit(MSO_VLIST __NEAR* pList);
STATIC int _CalculateKeyShift(int iHardwareValue);
STATIC int _CalculateEcho(int iHardwareValue);

/***************************************************************************************
* 	Operation functions
****************************************************************************************/
static MS_OP _KaraokeOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
static MS_OP _KaraokeKitOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
static MS_OP _KaraokekitVlistOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
static MS_OP _KaraokeOnOffChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);

#ifdef D_KARAOKE_LRMODE
static MS_OP _LRModeChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
#endif//D_KARAOKE_LRMODE

static MS_OP _KeyShiftHSliderOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
static MS_OP _EchoHSliderOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
static MS_OP _VoiceCancelChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);

#ifdef D_KARAOKE_MELODY
static MS_OP _MelodyChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
#endif//D_KARAOKE_MELODY

#ifdef D_KARAOKE_MIC_EFFECT
static MS_OP _MicEffectChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
#endif//D_KARAOKE_MIC_EFFECT

#ifdef D_VOCAL_SUPPORT_ENABLED
static MS_OP _VocalEffectChoiceOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam);
#endif // D_VOCAL_SUPPORT_ENABLED

/***************************************************************************************
* 	Display functions
****************************************************************************************/
static BOOL _KaraokeFillOSDSeg(MSO_OBJECT __NEAR* pThis, MS_AREA __NEAR* pAbsArea);

/***************************************************************************************
* 	Choice item action functions
****************************************************************************************/
STATIC void _KaraokeOnOffChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#ifdef D_KARAOKE_LRMODE
STATIC void _LRModeChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#endif//D_KARAOKE_LRMODE
STATIC UINT16 _KeyShiftSliderAction(HSLIDER_ACTION eType, UINT16 wValue);
STATIC UINT16 _EchoSliderAction(HSLIDER_ACTION eType, UINT16 wValue);
STATIC void _VoiceCancelChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#ifdef D_KARAOKE_MELODY
STATIC void _MelodyChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#endif//D_KARAOKE_MELODY

#ifdef D_KARAOKE_MIC_EFFECT
STATIC void _MicEffectChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#endif//D_KARAOKE_MIC_EFFECT

#ifdef  D_VOCAL_SUPPORT_ENABLED
STATIC void  _VocalEffectChoiceAction(MSO_OBJECT __NEAR* pThis, enMutatorType eType, UINT16 wValue);
#endif//D_VOCAL_SUPPORT_ENABLED

/***************************************************************************************
* 	Include customization file.
****************************************************************************************/

// Include custom code file: customer specific code, over-writing common one.
#include "Components\Custom\Karaoke\o_karaoke_custom.c"
// Include configuration file: constants.
#include "Components\Karaoke\o_karaoke_config.c"


/***************************************************************************************
* 	Utility functions
****************************************************************************************/
static BOOL _AddItemsToKaraokeKit(MSO_VLIST __NEAR* pList)
{
	if(NULL != pList)
	{
		UINT8 cIndex;
		UINT8 cNumItems;
		UINT8 cTotalItemsInToolkit = 0;
		MSO_OBJECT __NEAR* pObject;

		// Get the total number of tools in the toolkit
		while(NULL != aKaraokeKit[cTotalItemsInToolkit])
			cTotalItemsInToolkit++;

		pList->moParam.mwTotalItems = cTotalItemsInToolkit;
		
		cNumItems = MIN(pList->moParam.mcNumVisibleItems, (pList->moParam.mwTotalItems - pList->moParam.mwFirstDisplayItem));
		
		for(cIndex = 0; cIndex < cNumItems; cIndex++)
		{			
			pObject = OVLIST_CreateAndAppendItem(pList, aKaraokeKit[pList->moParam.mwFirstDisplayItem + cIndex]);
			
			MS_SendOperation(pObject, MS_OP_OPEN, 0);
			MS_SendOperation(pObject, MS_OP_INIT, 0);		
		}			
		return TRUE;
	}	
	return FALSE;
}

/***************************************************************************************
*	Function	: 	_CalculateKeyShift
*
*	In		: 	iHardwareValue	=	Hardware value of the keyshift.
*
*	Out		: 	None.
*
*	Return	:	Hardware value of the keyshift translated to slider value.
*
*	Desc 	:	Translates the actual value to a slider value.
****************************************************************************************/
CONST KARAOKE_KEYSHIFT_SETTING aKeyShiftStages[] = 
{	
	KARAOKE_KEY_SHIFT_L7, KARAOKE_KEY_SHIFT_L6, KARAOKE_KEY_SHIFT_L5, KARAOKE_KEY_SHIFT_L4,
	KARAOKE_KEY_SHIFT_L3, KARAOKE_KEY_SHIFT_L2, KARAOKE_KEY_SHIFT_L1,
	KARAOKE_KEY_SHIFT_OFF,
	KARAOKE_KEY_SHIFT_R1, KARAOKE_KEY_SHIFT_R2, KARAOKE_KEY_SHIFT_R3, KARAOKE_KEY_SHIFT_R4,
	KARAOKE_KEY_SHIFT_R5, KARAOKE_KEY_SHIFT_R6, KARAOKE_KEY_SHIFT_R7
 };

STATIC int _CalculateKeyShift(int iHardwareValue)
{
	int iKeyShift = 0;

	while (aKeyShiftStages[iKeyShift ] != iHardwareValue)
	{ 
		iKeyShift ++;
	}
	return iKeyShift;
}


/***************************************************************************************
*	Function	: 	_CalculateEcho
*
*	In		: 	iHardwareValue	=	Hardware value of Echo.
*
*	Out		: 	None.
*
*	Return	:	Hardware value of the Echo translated to slider value.
*
*	Desc 	:	Translates the actual value to a slider value.
****************************************************************************************/
STATIC int _CalculateEcho(int iHardwareValue)
{
	return (iHardwareValue * ECHO_SLIDER_MAX_VALUE  / HW_MAX_ECHO_DELAY);
}

/***************************************************************************************
* 	Operation functions
****************************************************************************************/

/***************************************************************************************
*	Function 	: 	_KaraokeOperation
*
*	In		:
*
*	Out		:
*
*	Desc 	:	MSO_KARAOKE user operation function.
****************************************************************************************/
#pragma argsused
static MS_OP _KaraokeOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	// Pre-processing
	switch(MsOp)
	{
	case MS_OP_INIT:
		{
#ifdef D_GUI_O_KARAOKE_TIMEOUT
			MSO_KARAOKE __NEAR* pKaraoke = (MSO_KARAOKE __NEAR*)pThis;
			pKaraoke->moParam.mwTimeOut = KARAOKE_TIMEOUT_SECONDS * 10;
#endif
			MS_ComponentInitFocus((MSO_COMPONENT __NEAR*)pThis);
		}
		break;

	case MS_OP_TICK:
		if (!CoreAPI_IsBitsteamAllowedKaraoke())
		{
			MS_SendOperation(pThis, MS_OP_CLOSE_PARENT, 0);
		}
#ifdef D_GUI_O_KARAOKE_TIMEOUT
		else
		{
			MSO_KARAOKE __NEAR* pKaraoke = (MSO_KARAOKE __NEAR*)pThis;
			if (pKaraoke->moParam.mwTimeOut)
			{
				pKaraoke->moParam.mwTimeOut--;
				if (0 == pKaraoke->moParam.mwTimeOut)
				{
					MS_SendOperation(pThis, MS_OP_CLOSE_PARENT, 0);
				}
			}
		}
#endif
		break;

#ifdef D_GUI_O_KARAOKE_TIMEOUT
	case MS_OP_UP:
	case MS_OP_DOWN:
	case MS_OP_RIGHT:
	case MS_OP_LEFT:
	case MS_OP_ENTER:
		{
			MSO_KARAOKE __NEAR* pKaraoke = (MSO_KARAOKE __NEAR*)pThis;
			pKaraoke->moParam.mwTimeOut = KARAOKE_TIMEOUT_SECONDS * 10;
		}
		break;
#endif

	case MS_OP_LR:
		{
			// There are two ways to modify the L/R mode:
			// 1. Pressing the L/R key on the remote control.
			// 2. Pressing the L/R Mode button on the Karaoke component. 
			// If the L/R key is pressed, the value displayed for the L/R mode on the karaoke component 
			// needs to be refreshed. An easy solution(Kerchak solution) is to close the karaoke component.
			MS_SendOperation(pThis, MS_OP_CLOSE_PARENT, 0);
		}
		break;
		
	case MS_OP_KARAOKE:
		{
			MS_SendOperation(pThis, MS_OP_CLOSE_PARENT, 0);
		}
		return MS_OP_NONE;

	case MS_OP_CLOSE_PARENT:
		{
			// When close the componet, save setting
			CoreAPI_UpdatePlayerSetting(PS_UPDATE_SAVE_SETTINGS, 0);
		}
		break;

	default:
		break;
	}	
	return MS_ComponentBasicOperation(pThis, MsOp, lParam);
}

/***************************************************************************************
*	Function 	: 	_KaraokeKitOperation
*
*	In		:
*
*	Out		:
*
*	Desc 	:	The karaoke kit operation function.
****************************************************************************************/
#pragma argsused
static MS_OP _KaraokeKitOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	//Pre-processing
	// TODO : if any	

	MsOp = VScrollListOperation(pThis, MsOp, lParam);

	// Post-processing
	switch(MsOp)
	{		
	case MS_OP_REFRESH:
		{			
			MSO_VLIST __NEAR* pList = (MSO_VLIST __NEAR*)MS_GetObjectListPtr(pThis);				
			MS_ASSERT(NULL != pList);

			if(pList->moParam.mwTotalItems > pList->moParam.mcNumVisibleItems)
			{
				// Remove all items.
				MS_SendOperation((MSO_OBJECT __NEAR*)pList, MS_OP_EMPTY, 0);

				_AddItemsToKaraokeKit(pList);
				MS_DisplayAddObject(pThis);	

				// Set focus to the appropriate list item.
				if(MS_IsFocused(pList))
				{
					MSO_OBJECT __NEAR* pObject = MS_GetObjectListPtr(pList);
						
					if(!MS_IS_FOCUS_ON_LASTITEM(pList))	
						MS_ScreenSetFocusObject(pObject);
					else
					{						
						// Make sure we do not set focus on the Value VScroll list.					
						while(NULL != pObject->mpNext)
							pObject = pObject->mpNext;						
						MS_ScreenSetFocusObject(pObject);
					}
				}
			}			
		}
		return MS_OP_NONE;
		
	default:
		break;
	}	
	return MsOp;
}

/***************************************************************************************
*	Function 	: 	_KaraokekitVlistOperation
*
*	In		:
*
*	Out		:
*
*	Desc 	:	The karaoke kit VLIST operation function.
****************************************************************************************/
#pragma argsused
static MS_OP _KaraokekitVlistOperation(MSO_OBJECT __NEAR* pThis, MS_OP MsOp, UINT32 lParam)
{
	switch(MsOp)
	{
	case MS_OP_INIT:
		return MS_OP_NONE;
		
	case MS_OP_OPEN:
		_AddItemsToKaraokeKit((MSO_VLIST __NEAR*)pThis);
		break;
		
	default:
		break;
	}	
	return VListOperation(pThis, MsOp, lParam);
}

/***************************************************************************************
*	Function 	: 	_KaraokeOnOffChoiceOperation
*
*	In		:
*

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区欧美| 人人超碰91尤物精品国产| 欧美日韩一区二区电影| 国产一区二区三区国产| 看片的网站亚洲| 奇米四色…亚洲| 色婷婷国产精品| 欧美性受xxxx黑人xyx性爽| 一本色道久久综合精品竹菊| 精品国产乱码久久久久久夜甘婷婷| 欧美美女一区二区在线观看| 欧美色综合久久| 日本一区二区三区高清不卡| 国产日韩欧美在线一区| 美国欧美日韩国产在线播放| 国产成人免费视频精品含羞草妖精 | 处破女av一区二区| 国产一区在线精品| 日韩午夜电影在线观看| 日韩一区二区免费在线电影| 亚洲精品国产无套在线观| 亚洲福中文字幕伊人影院| 日本不卡中文字幕| 成人激情黄色小说| 欧美色手机在线观看| 《视频一区视频二区| 亚洲www啪成人一区二区麻豆 | 色婷婷综合久色| 亚洲色图色小说| 精品一区二区免费| 91久久精品国产91性色tv| 日韩无一区二区| 蜜桃免费网站一区二区三区| 日韩精品一区二区三区四区 | 亚洲激情自拍视频| 91精品办公室少妇高潮对白| 一区二区三区在线播| 国产综合一区二区| 在线观看日韩国产| 国产调教视频一区| 一区二区高清免费观看影视大全| 色综合天天性综合| 精品欧美乱码久久久久久1区2区| 国产精品成人免费| 久久99精品国产麻豆不卡| 欧美电影免费观看完整版| 国产一区二三区好的| 国产午夜亚洲精品不卡| 99精品视频在线观看免费| 精品日韩一区二区三区免费视频| 看电影不卡的网站| 国产精品久久久久久久久久久免费看| av成人动漫在线观看| 精品国产百合女同互慰| 国产成人日日夜夜| 亚洲欧美激情一区二区| 成人精品免费看| 一区二区三区四区不卡视频| 91精品国产91久久久久久一区二区| 国产精品久久久久久久久免费樱桃| 99久久综合狠狠综合久久| 亚洲国产美女搞黄色| 日韩欧美高清在线| aaa欧美色吧激情视频| 天天色综合成人网| 在线播放日韩导航| 国产高清不卡一区| 亚洲成人久久影院| 国产欧美精品一区二区三区四区| 91免费精品国自产拍在线不卡| 国产日韩欧美精品一区| 欧美色涩在线第一页| 国产精华液一区二区三区| 亚洲亚洲人成综合网络| 国产日韩欧美精品一区| 欧美蜜桃一区二区三区| 五月婷婷综合网| 国产精品你懂的| 不卡一二三区首页| 美日韩一区二区| 亚洲精品乱码久久久久久| 国产网站一区二区| 91精品国产手机| 色av综合在线| 成人午夜激情片| 久久成人18免费观看| 亚洲国产一二三| 中文字幕亚洲在| 国产午夜精品福利| 精品日韩在线一区| 欧美一级一区二区| 欧美日韩免费视频| 在线观看日韩av先锋影音电影院| 国产激情一区二区三区四区| 蜜臀va亚洲va欧美va天堂| 香蕉久久一区二区不卡无毒影院| 成人免费一区二区三区视频| 久久久久久久久久久黄色| 91美女蜜桃在线| 成人免费视频一区| 国产一二三精品| 韩国三级中文字幕hd久久精品| 天堂一区二区在线| 国产偷国产偷精品高清尤物| 欧美成人女星排名| 精品国产制服丝袜高跟| 精品久久久久久综合日本欧美| 欧美日韩激情一区二区三区| 欧美最猛黑人xxxxx猛交| 色噜噜偷拍精品综合在线| 91碰在线视频| 91国产成人在线| 欧美日韩另类国产亚洲欧美一级| 色欧美片视频在线观看| 色噜噜夜夜夜综合网| 色综合久久88色综合天天 | 亚洲免费伊人电影| 自拍偷拍亚洲激情| 亚洲最大色网站| 午夜精品影院在线观看| 日本欧美在线看| 国产一区二区三区香蕉| 国产又粗又猛又爽又黄91精品| 国产一区二区三区免费看| 成人丝袜18视频在线观看| 91香蕉国产在线观看软件| 在线观看一区不卡| 欧美电影影音先锋| 精品嫩草影院久久| 中文字幕不卡在线| 欧美一区二区三区影视| 日韩美一区二区三区| 2021国产精品久久精品| 7777精品伊人久久久大香线蕉的| 成人性生交大合| 色婷婷激情综合| 欧美日韩在线播放三区四区| www.av亚洲| 国产福利91精品一区二区三区| 色偷偷久久一区二区三区| 91官网在线免费观看| 欧美一区二区在线免费播放| 91精品国产综合久久精品图片| 精品日韩欧美一区二区| 日本一区二区成人在线| 亚洲无线码一区二区三区| 国内偷窥港台综合视频在线播放| 99久久99久久综合| 欧美一区二区三级| 国产精品短视频| 日韩激情视频网站| caoporen国产精品视频| 51精品国自产在线| 综合中文字幕亚洲| 国模无码大尺度一区二区三区| 色综合色狠狠天天综合色| 欧美mv和日韩mv的网站| 亚洲乱码国产乱码精品精可以看| 狂野欧美性猛交blacked| 色综合视频在线观看| 久久午夜电影网| 日韩成人午夜精品| 色婷婷激情一区二区三区| 国产亲近乱来精品视频| 日韩精品视频网站| 一本一道久久a久久精品综合蜜臀| 日韩午夜激情电影| 亚洲国产成人av好男人在线观看| 大陆成人av片| 精品少妇一区二区三区免费观看| 亚洲一区二区三区爽爽爽爽爽| 成人网男人的天堂| 欧美精品一区二| 青青草精品视频| 欧美日韩免费高清一区色橹橹 | 久久国产精品露脸对白| 欧美在线一二三| 亚洲素人一区二区| 国产成人av电影在线| 高清免费成人av| 欧美一级精品大片| 丝袜亚洲另类丝袜在线| 欧洲一区二区三区在线| 国产精品热久久久久夜色精品三区 | 亚洲精品精品亚洲| 97精品久久久久中文字幕| 久久亚洲一级片| 国产伦精品一区二区三区在线观看 | 91亚洲资源网| 中文字幕乱码亚洲精品一区| 国产精品一区二区x88av| 91热门视频在线观看| 中文字幕巨乱亚洲| 成人免费观看视频| 中文字幕一区二区三| 99在线精品一区二区三区| 中文字幕日本乱码精品影院| 成人av免费在线播放| 中文字幕一区二| 色欧美日韩亚洲|