⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 audiocodecmanage_dlg1.cpp

📁 ZPAV (H265) PC(X86) demo ZPAV (H265) 是 音视频 压缩解压 协议
💻 CPP
字号:

/*
///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//   Copyright (C) 2006-2008  Beijing,  pengzhen (pengzhenxp@yahoo.com.cn)   //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////
*/

CString CAudioCodecManage_Dlg::m_pColumnTitle[] = 
{ 
	TEXT("type") , /* codec */
		
	TEXT("bps") , /* bits/second */
	TEXT("sps") , /* samples/second */
	TEXT("ch")  , /* channels */ 

	TEXT("PRP") , /* previous process */ 
	TEXT("POP")   /* post process */ 

};

WORD CAudioCodecManage_Dlg::m_iItemValue[AudioCodecManage_Items+1][AudioCodecManage_SubItems] ; 

CString CAudioCodecManage_Dlg::m_pColumnTitleText[] = 
{ 
	TEXT("type") , /* codec */
		
	TEXT("bits/second (kb/s)") , /* bits/second */	
	TEXT("samples/second") , /* samples/second */
	TEXT("channels") ,    /* channels */ 
	
	TEXT("previous process") , /* previous process */ 
	TEXT("post process") /* post process */  

};

CString CAudioCodecManage_Dlg::m_pAudioCodecName[] = 
{ 
	TEXT("H265+A0"), 
	TEXT("H265+A8"),
	TEXT("H265+A9") 
};

#define GetAudioCodecRegItemValue()                                          \
           GetRegBinaryValue( (TCHAR*)(m_iItemValue), sizeof(m_iItemValue) , \
                              REG_APPLICATION_SECTION , TEXT("m_iItemAudioCodec") )

#define SetAudioCodecRegItemValue()                                          \
           SetRegBinaryValue( (TCHAR*)(m_iItemValue), sizeof(m_iItemValue) , \
                              REG_APPLICATION_SECTION , TEXT("m_iItemAudioCodec") )

#define LoadSubItemValue( nItem, nSubItem, lpText, iValue )        \
	         m_pListCtrl.ListAddString( lpText, nItem, nSubItem ); \
			 m_iItemValue[ nItem ][ nSubItem ] = iValue ; 


void CAudioCodecManage_Dlg::DefaultItemValue()
{ 
	
	memset(m_iItemValue, 0x00, sizeof(m_iItemValue) );

	for( int nItem=0 ; nItem < AudioCodecManage_Items +1 ; nItem++)
	{
		m_audio_codec_id(nItem) = nItem ; /* A0, A6, A8, A9 */

		//m_audio_wavelets(nItem) = 0 ;   /* wavelets */ /* 0 : w1, 1 : w2 */
		m_audio_bps(nItem)      = 8 ;     /* bits/second */ /* 8 ~~~ 256 kbit/s */
		m_audio_sps(nItem)      = 8000 ;  /* samples/second */ /* 8k ~~~ 48k */
		m_audio_channels(nItem) = 1    ;  /* channels */ /* 1, 2 */
		
		m_audio_prp(nItem) = 0 ; /* previous process */ /* <0,1,2,3> */
		m_audio_pop(nItem) = 3 ; /* post process */ /* <0,1,2,3> */
	}
	
}

void CAudioCodecManage_Dlg::LoadItemValue( BOOL iDefault )
{

	BOOL ret0 ;

	if( iDefault ) DefaultItemValue(); 

	ret0 =  GetAudioCodecRegItemValue(); 

	if( ! ret0 ) SetAudioCodecRegItemValue(); 

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -