1366 lines
54 KiB
C
1366 lines
54 KiB
C
//---------------------------------------------------------------------------
|
||
#ifndef GlobalUnitH
|
||
#define GlobalUnitH
|
||
//#include "commonstruct.h"
|
||
//#include "Instruments.h"
|
||
#include "CommonUnit.h"
|
||
//---------------------------------------------------------------------------
|
||
|
||
/***************************************************************************************/
|
||
// 全局定义
|
||
/***************************************************************************************/
|
||
#define APPNAME "唱作魔方\0"
|
||
#define SOFTWARE_ID e_Ac_Windows
|
||
|
||
#define DLLAPI __stdcall
|
||
|
||
#define CS_VERSION MAKELONG( 3, 4 )
|
||
#define MM_VERSION MAKELONG( 2, 2 )
|
||
#define SM_VERSION MAKELONG( 1, 2 )
|
||
|
||
#define MINUM_COLUMN 5
|
||
#define MINUM_ROW 6
|
||
#define MAX_PATH 260
|
||
|
||
#define URL_HOMEPAGE 0 //网站主页
|
||
#define URL_USERCENTER 1 //用户中心页
|
||
#define URL_SONGMANAGE 2 //歌曲管理页
|
||
#define URL_SOFTWARE 3 //软件下载页
|
||
#define URL_USERNOTICE 4 //用户消息页
|
||
#define URL_TECHFORUM 5 //技术论坛
|
||
#define URL_SHAREPLAY 6 //分享播放页
|
||
#define URL_JASONQUERY 7 //JASON
|
||
#define URL_RECHARGE 8 //充值页
|
||
#define URL_VIPMEMBER 9 //VIP会员页
|
||
#define URL_SONGPLAY 10 //歌曲播放页
|
||
#define URL_COINSPEC 11 //唱作音符说明
|
||
#define URL_EXTFONT 12 //扩展音色库下载页
|
||
#define URL_USERAGREEMENT 13 //用户协议页
|
||
#define URL_REGCODE 14 //注册验证码接口
|
||
#define URL_RESETPASS 15 //重置密码页
|
||
|
||
#define CELL_ABSORB_WIDTH 10
|
||
#define CHORD_WHOLE_BAR 1
|
||
#define CHORD_HALF_BAR 0
|
||
#define ID_INITIAL_BAR 1
|
||
#define CHORD_TYPE_NUM 4
|
||
#define KEY_NUM 12
|
||
|
||
#define COMPOSE_INTRO_1 0x100 //前奏1
|
||
#define COMPOSE_ENDING_1 0x110 //尾奏1
|
||
|
||
#define MAX_INTRO_NUM 4
|
||
#define MAX_ENDING_NUM 4
|
||
#define COMPOSE_FILL_NUM 2
|
||
#define STAGE_VAR_NUM 4
|
||
|
||
#define PAGE_RECORDONLY 0x2
|
||
#define PAGE_SETUPRECORD 0x3
|
||
#define PAGE_COMPLETEONLY 0x10
|
||
#define PAGE_ALL 0x1F
|
||
|
||
#define LIST_MELODYBARS 0x01
|
||
#define LIST_MELODYCHORDS 0x02
|
||
#define LIST_MELODYSTAGES 0x04
|
||
#define LIST_COMPOSESTAGES 0x08
|
||
#define LIST_COMPLETEVOLS 0x10
|
||
#define LIST_MELODYVOLS 0x20
|
||
#define LIST_ALL 0x3F
|
||
|
||
#define OPERATION_INSERTSTAGE 0x001
|
||
#define OPERATION_DELETESTAGE 0x002
|
||
#define OPERATION_DELETECHORD 0x004
|
||
#define OPERATION_DELETEALLCHORD 0x008
|
||
#define OPERATION_STAGEVAR 0x010
|
||
#define OPERATION_FILL 0x020
|
||
#define OPERATION_CHANGETEMPLATE 0x040
|
||
#define OPERATION_COMPLEMENT 0x080
|
||
#define OPERATION_ADJUSTTRACEVOL 0x100
|
||
|
||
#define TIMER_ACCURACY 1
|
||
#define TIMER_PLAY_INTERVAL 25 //媒体时间间隔
|
||
#define POINT_RECORD_BLANK 2 //录音延迟2个点(50ms)
|
||
#define TIME_HINT 500
|
||
#define CHANNEL_MELODY 0
|
||
#define MELODY_DEF_VOLUMN 90
|
||
#define MIDI_EVENT_INSTRUMENT 2
|
||
#define MIDI_EVENT_VOLUME 12
|
||
|
||
#define INPUT_TYPE_UNDEF 0x00
|
||
#define INPUT_TYPE_DIGITAL 0x01
|
||
#define INPUT_TYPE_LINE 0x02
|
||
#define INPUT_TYPE_MIC 0x03
|
||
#define INPUT_TYPE_SYNTH 0x04
|
||
#define INPUT_TYPE_CD 0x05
|
||
#define INPUT_TYPE_PHONE 0x06
|
||
#define INPUT_TYPE_SPEAKER 0x07
|
||
#define INPUT_TYPE_WAVE 0x08
|
||
#define INPUT_TYPE_AUX 0x09
|
||
#define INPUT_TYPE_ANALOG 0x0a
|
||
|
||
#define MAX_FX_NUM 11
|
||
#define FX_ECHO 0x00
|
||
#define FX_DISTORTION 0x01
|
||
#define FX_ROTATE 0x02
|
||
#define FX_REVERB 0x03
|
||
#define FX_COMPRESSOR 0x04
|
||
#define FX_WAH 0x05
|
||
#define FX_CHORUS 0x06
|
||
#define FX_PARAMEQ 0x07
|
||
#define FX_PHASER 0x08
|
||
#define FX_PITCH 0x100
|
||
#define FX_APR 0x101
|
||
|
||
#define SAVE_SONG 0x01
|
||
#define SAVE_COMPOSE 0x02
|
||
#define SAVE_COMPOSESONG 0x03
|
||
#define SAVE_AUDIO 0x04
|
||
#define SAVE_BASE 0x08
|
||
#define SAVE_BASEAUDIO 0x0C
|
||
|
||
#define TYPE_BASECOMPOSE 0x01
|
||
#define TYPE_COMPOSE 0x02
|
||
#define TYPE_AUDIO 0x04
|
||
#define TYPE_SONG 0x08
|
||
#define TYPE_BEAT 0x10
|
||
#define TYPE_AUDIO_BASECOMPOSE 0x05
|
||
#define TYPE_SONG_COMPOSE 0x0A
|
||
#define TYPE_MUTEBEAT 0x100
|
||
#define TYPE_LOOPPLAY 0x200
|
||
#define TYPE_PREDEFINE 0x400
|
||
|
||
#define BASS_ERROR_BASE 0x80000000
|
||
#define E_PROJ_NOERROR 0x80000100
|
||
#define E_PROJ_FILENOTEXIST 0x80000101
|
||
#define E_PROJ_LATERVERSION 0x80000102 //后期版本号
|
||
#define E_PROJ_PROVERSION 0x80000103 //专业版版本号
|
||
#define E_PROJ_INVALIDVERSION 0x80000104 //无法识别的版本号
|
||
#define E_PROJ_FILECRUPT 0x80000105
|
||
#define E_PROJ_CANTLOADAUDIO 0x80000106
|
||
#define E_PROJ_INVALIDSTYLE 0x80000107
|
||
#define E_PROJ_INVALIDFONT 0x80000108
|
||
#define E_PROJ_INVALSTAGESTYLE 0x80000109
|
||
|
||
#define MAX_RECENT_PROJECT 6
|
||
#define MAX_MENU_STRLEN 80
|
||
|
||
#define AUTOSAVE_FILENAME "temp\\~last.sav" //add by tj 2013/1/3
|
||
//#define AUTOSAVE_PERIOD ( 10*60*1000 )
|
||
|
||
#define STYLESORT_UP 0 //add by tj 2013/7/1
|
||
#define STYLESORT_DOWN 1
|
||
|
||
#define STYLESORT_TIME 0
|
||
#define STYLESORT_PRICE 1
|
||
#define STYLESORT_SCORE 2
|
||
|
||
#define FILETYPE_MP3 0
|
||
#define FILETYPE_WAVE 1
|
||
#define FILETYPE_MIDI 2
|
||
|
||
#define PROJ_MODE_AUTO 0
|
||
#define PROJ_MODE_NORMAL 1
|
||
#define PROJ_MODE_UPLOAD 2
|
||
|
||
#define SAFE_FREE(p) { if(p) { free(p); (p)=NULL; } }
|
||
#define SAFE_DELETE(p) { if(p) { delete (p); (p)=NULL; } }
|
||
#define SAFE_DELETE_ARRAY(p) { if(p) { delete[] (p); (p)=NULL; } }
|
||
#define SAFE_RELEASE(p) { if(p) { (p)->Release(); (p)=NULL; } }
|
||
|
||
// 消息定义
|
||
#define MSG_PLAY_RANGE WM_USER + 0x100
|
||
#define MSG_PLAY_END WM_USER + 0x101
|
||
#define MSG_PLAY_FAILED WM_USER + 0x102
|
||
#define MSG_PLAY_ABORT WM_USER + 0x104
|
||
#define MSG_OPERATE_FAILED WM_USER + 0x105
|
||
#define MSG_OPERATE_PERCENT WM_USER + 0x106
|
||
#define MSG_OPERATE_COMPLETE WM_USER + 0x107
|
||
#define MSG_RECORD_FAILED WM_USER + 0x108
|
||
#define MSG_RECORD_COMPLETE WM_USER + 0x109
|
||
#define MSG_RECORD_VOLJUST WM_USER + 0x10A
|
||
#define MSG_MEASURE_0 WM_USER + 0x110
|
||
#define MSG_MEDIATIME WM_USER + 0X115
|
||
#define MSG_SETSCROLLPOS WM_USER + 0x120
|
||
#define MSG_OPERATE_NEXTRANGE WM_USER + 0x121
|
||
#define MSG_NETWORKMESSAGE WM_USER + 0x130
|
||
#define MSG_NETWORKERROR WM_USER + 0x131
|
||
#define MSG_PAYMENTCONFIRMED WM_USER + 0x133
|
||
|
||
// 界面消息
|
||
#define UM_RESTORE WM_USER + 0x1000
|
||
#define UM_SHOWSYSMENU WM_USER + 0x1001
|
||
#define UM_SHOWNEXTPAGE WM_USER + 0x1002
|
||
#define UM_TEINVALIDATE WM_USER + 0x1003
|
||
#define UM_LOGIN WM_USER + 0x1004
|
||
#define UM_ENABLERELOAD WM_USER + 0x1005
|
||
#define UM_SELECTSTYLE WM_USER + 0x1006
|
||
#define UM_LOADPROJECT WM_USER + 0x1007
|
||
#define UM_SAVEPROJECT WM_USER + 0x1008
|
||
#define UM_NEWPROJECT WM_USER + 0x1009
|
||
#define UM_AUDIOEFFECT WM_USER + 0x100a
|
||
#define UM_NEWCOMERTASK WM_USER + 0x1010
|
||
#define UM_REFRESH_PAGE_STATE WM_USER + 0x1011
|
||
#define UM_SAVEMUSIC WM_USER + 0x1012
|
||
#define UM_UPLOADMUSIC WM_USER + 0x1013
|
||
#define UM_MICSETTING WM_USER + 0x1014
|
||
#define UM_JUMP_PAGE WM_USER + 0x1100
|
||
#define UM_SHOWABOUT WM_USER + 0x110a
|
||
#define UM_OPENMANUAL WM_USER + 0x110b
|
||
#define UM_OPENAUTOPROJ WM_USER + 0x1110 //add by tj 2013/1/2
|
||
#define UM_HANDLEAUTOPROJ WM_USER + 0x1111
|
||
#define UM_SHOWMORE WM_USER + 0x1112
|
||
#define UM_RELOAD WM_USER + 0x1113
|
||
#define UM_NOTIFICATION WM_USER + 0x1114 //add by tj 2014/04/17
|
||
#define UM_MUSICCOVER WM_USER + 0x1115
|
||
#define UM_UPLOADUSRICON WM_USER + 0x1116
|
||
#define UM_SETFONTPOSITION WM_USER + 0x1120
|
||
#define UM_HIDEPOPCONTROL WM_USER + 0x1121
|
||
#define UM_STARTCDTIMER WM_USER + 0x1122
|
||
|
||
//#define MDPX(x) (MulDiv(x,g_xDpi,96))
|
||
//#define MDPY(y) (MulDiv(y,g_yDpi,96))
|
||
#define DPIX(x) (x)
|
||
#define DPIY(y) (y)
|
||
|
||
#define REGKEY_SOFTWARE L"SOFTWARE\\iChangzuo\\AccompanyCube"
|
||
#define REGKEY_AUTOLOG L"{0DF44EAA-FF21-4412-828E-260A8728E7F1}"
|
||
/***************************************************************************************/
|
||
// 全局常量
|
||
/***************************************************************************************/
|
||
extern const COLORREF g_clrBackground,
|
||
g_clrGrid,
|
||
g_clrText,
|
||
g_clrChordBk,
|
||
g_clrFocus,
|
||
g_clrPlayLine,
|
||
g_clrStage[STAGE_VAR_NUM],
|
||
g_clrStageDisable[STAGE_VAR_NUM],
|
||
g_clrIntro[MAX_INTRO_NUM],
|
||
g_clrIntroDisable[MAX_INTRO_NUM],
|
||
g_clrEnding[MAX_ENDING_NUM],
|
||
g_clrEndingDisable[MAX_ENDING_NUM];
|
||
|
||
extern const char *g_strDefaultSoundSet,
|
||
*g_strSoundSetExt,
|
||
*g_strMelodyKey[KEY_NUM],
|
||
*g_strTimeSignature[4],
|
||
*g_strTSName[4],
|
||
*g_strIntro[MAX_INTRO_NUM],
|
||
*g_strEnding[MAX_ENDING_NUM],
|
||
*g_strStage,
|
||
*g_strStageVar[STAGE_VAR_NUM],
|
||
*g_strProjError[10],
|
||
*g_strFill[COMPOSE_FILL_NUM];
|
||
|
||
extern const DWORD g_dwProjectVersion;
|
||
|
||
/***************************************************************************************/
|
||
// 全局变量
|
||
/***************************************************************************************/
|
||
#include "ComposeStageUnit.h"
|
||
#include "BackupUnit.h"
|
||
struct FONTINFO
|
||
{
|
||
char strFileName[256];
|
||
char strFontName[80];
|
||
};
|
||
|
||
typedef vector<FONTINFO*> FONTINFOLIST;
|
||
|
||
extern FONTINFOLIST g_lstFonts; //音色库列表
|
||
|
||
extern MELODYBARLIST g_lstMelodyBars, //旋律小节表
|
||
g_lstMelodyBars_SVD;
|
||
|
||
extern MELODYSTAGELIST g_lstMelodyStages, //旋律段落表
|
||
g_lstMelodyStages_SVD;
|
||
|
||
extern COMPOSESTAGELIST g_lstComposeStages, //曲式结构段落表
|
||
g_lstComposeStages_SVD;
|
||
|
||
extern BARVOLSLIST g_lstCompleteVols, //全曲音波表
|
||
g_lstCompleteVols_SVD;
|
||
|
||
extern wstring g_strFontPath, // 音色库路径
|
||
g_strFontFile, // 音色库文件名
|
||
g_strFontFile_SVD, // 音色库文件名(已保存)
|
||
g_strLastSaveFile, // 上次保存音乐文件名
|
||
g_strExecutePath, // 执行文件路径
|
||
g_strUserPath, // 用户路径
|
||
g_strExtFontsPath, //扩展音色库路径
|
||
g_strProjectName, // 工程文件名
|
||
g_strAutoProjName; // 自动保存文件名
|
||
|
||
extern vector<wstring> g_lstRecentProject; //最近的工程文件
|
||
extern HANDLE g_hProjectEvent; //工程文件读写互斥变量
|
||
|
||
extern string g_strSelectedStyleName; // 选中风格名
|
||
|
||
extern vector<int> g_lstStyleSelected; //选中风格类型集合
|
||
extern DWORD g_iSelectedStyleType; // 选定风格类型
|
||
extern char g_strCurrentVersion[20],
|
||
g_strServerURL[256],
|
||
g_strPlaybackDevice[256], //指定输出设备名
|
||
g_strRecordDevice[256]; //指定录音设备名
|
||
|
||
extern int g_iSelectedStyleID, // 选定风格ID
|
||
g_iLastStyleID, // 上次使用的风格
|
||
g_idFont, // 选定音色库序号
|
||
g_iMelodyKey, // 主旋律调号
|
||
g_iComposeKey, // 伴奏调号,用于录音升降调
|
||
g_iMelodyTimeSignature, // 主旋律拍号
|
||
g_nMelodyTempo, // 主旋律速度
|
||
// g_lSongParam, // 全曲参数
|
||
// g_lSongVerifyParam, // 全曲鉴权参数
|
||
g_iLastSaveOption, // 上次保存选项
|
||
g_iLastSaveType, // 上次保存文件格式
|
||
g_iCurrentPage, // 保存工程时所处的页面
|
||
g_iWindowState, // 上次窗口模式
|
||
g_iPlaybackDevice, // 指定播放设备号
|
||
g_iPlaybackOutput, // 指定播放输出源
|
||
g_iRecordDevice, // 指定录音设备号
|
||
g_iRecordInput, // 指定设备输入源
|
||
g_nRecordChannels, // 录音通道数
|
||
g_iPreStageDefault, // 用户预设段落模式
|
||
g_iPreStyleSort, // 用户预设风格排序
|
||
|
||
g_iSelectedStyleID_SVD,
|
||
g_iMelodyKey_SVD, // 主旋律调号(已保存)
|
||
g_iMelodyTimeSignature_SVD,// 主旋律拍号(已保存)
|
||
g_nMelodyTempo_SVD, // 主旋律速度(已保存)
|
||
g_iComposeKey_SVD,
|
||
|
||
g_arrIntroBarNum[MAX_INTRO_NUM],//全局风格前间奏小节数
|
||
g_arrEndingBarNum[MAX_ENDING_NUM]; //全局风格尾奏小节数
|
||
|
||
extern float g_fRecordVolume, //录音音量
|
||
g_fSpeakerVolume, //喇叭音量
|
||
g_fAudioVolume, //音频音量
|
||
g_fMusicVolume, //编曲音量
|
||
g_fRecordVolume_SVD,
|
||
g_fSpeakerVolume_SVD,
|
||
g_fAudioVolume_SVD,
|
||
g_fMusicVolume_SVD;
|
||
|
||
extern double g_dblStep, //播放步长
|
||
g_dblTimePerBar; //每小节时间(毫秒)
|
||
|
||
extern bool g_bRecordAutoAdjust, //录音自动音量调节
|
||
g_bRecordMoniter, //启用录音监听
|
||
g_bShowRecordHint, //噪音侦测提示
|
||
g_bUpdateMandatory, //客户端需要强制更新
|
||
g_bMidiMelody, //导入MIDI旋律
|
||
g_bWeakup, //旋律弱起
|
||
g_bShowPlayTick, //显示小节节拍或时间
|
||
g_bPredefine, //预设工程(不自动编曲/接唱)
|
||
g_bAudioLoaded, //音频已加载
|
||
g_bBaseComposeLoaded, //基本编曲已加载
|
||
g_bComposeLoaded, //编曲已加载
|
||
g_bSongLoaded, //全曲已加载
|
||
// g_bSongSaved, //全曲已保存
|
||
g_bAudioChanged, //初始录音修改
|
||
g_bSongChanged, //全曲录音修改
|
||
g_bSongNeedSave, //全曲录音需保存
|
||
g_bRecProtect, //内录保护
|
||
g_bShowProtectMsg, //是否显示内录保护消息
|
||
g_bAutoSave, //是否需要恢复工程 //add by tj 2013/12/30
|
||
g_bAutoDownloadStyle, //自动下载风格
|
||
g_bAutoOpenProject, //自动打开上次工程
|
||
g_bAutoOpenProjectEnable,//自动打开上次工程使能
|
||
g_bProjStylePaid, //工程风格支付更改
|
||
g_iShowType, //false,罗马,true,英文
|
||
g_bPrebeat, //使用预设风格节拍提示
|
||
g_bExtFontUsable, //扩展音色库可用
|
||
g_bExtFont, //使用扩展音色库
|
||
g_bCanStep;
|
||
|
||
extern int g_aAudioEffects[MAX_FX_NUM], //启用的音效
|
||
g_aAudioEffects_SVD[MAX_FX_NUM];
|
||
extern DWORD g_aAudioEffectTypes[MAX_FX_NUM]; //音效类型
|
||
|
||
//extern DWORD g_iMacAddressNum; //mac地址个数
|
||
extern vector<char *> g_lstMacAddress; //mac地址regedit
|
||
//extern vector<char *> g_lstMacAddressNew;
|
||
extern String g_strMP3File; //mp3全曲文件名
|
||
|
||
extern UINT g_xDpi, g_yDpi; //High DPI 自适应
|
||
extern int g_szFont8,
|
||
g_szFont9,
|
||
g_szFont16;
|
||
|
||
/***************************************************************************************/
|
||
// 全局函数
|
||
/***************************************************************************************/
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
// 风格处理函数段
|
||
//
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*SM_GetVersion)();
|
||
//功 能:获取版本信息
|
||
//输 入:无
|
||
//返回值:版本号 LOWORD=major, HIWORD=minor
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*SM_Initialize)();
|
||
//函数名: Initialize
|
||
//功 能: 模块初始化
|
||
//返 回 值: 成功返回0, 否则返回错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*SM_Release)();
|
||
//功 能:释放对象
|
||
//输 入:无
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI bool (*SM_CheckStyle) ( int nID );
|
||
//函数名: CheckStyle
|
||
//功 能: 检测模板的可用性
|
||
//输 入: 风格ID
|
||
//返 回: 成功返回true,失败返回false
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*SM_GetSegmentBarNum)( int bitPos, int nID);
|
||
//函数名: GetSegmentBarNum
|
||
//功 能: 分别获取前间奏、尾奏的小节个数
|
||
//输 入:
|
||
//bitPos:0x100 - 0x10F 前间奏序号
|
||
//bitPos:0x110 - 0x11F 尾奏序号
|
||
//返 回: 成功返回小节个数,否则-1
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*SM_GetStyleRecomInfos)( int iTS, TSTYLEINFO aStyleInfos[], int *nInfoNum );
|
||
//int aStyleID[][3] , int *nStyleNum, int nBeat);
|
||
//函数名: GetStyleRecomInfos
|
||
//功 能: 获取推荐风格信息
|
||
//输 入:
|
||
//返 回: 成功返回0,否则为错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
//弃用
|
||
//typedef DLLAPI HRESULT (*SM_GetStyleDemoData)( int& nDataLen, BYTE* pData, int bitPos, int nID );
|
||
//函数名: GetStyleDemoData
|
||
//功 能: 获取风格试听数据
|
||
//输 入:
|
||
//nDataLen 返回数据长度
|
||
//pData 返回试听数据
|
||
//bitPos 试听部分 -1=完整(Vx+Ix+Ex) 0x000-0x00F=伴奏 0x100-0x10F=前奏 0x110-0x11F=尾奏
|
||
//nID 风格ID
|
||
//返 回 值: 成功返回0, 否则返回错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*SM_GetStyleDemo)( int& nDataLen, BYTE* pData, int iStyleID,
|
||
int iSegType, int iSegNo, int iKey, int iChordType );
|
||
//函数名: GetStyleDemo
|
||
//功 能: 获取风格试听片段(指定调号及调性)
|
||
//输 入:
|
||
//nDataLen 返回数据长度
|
||
//pData 返回试听数据
|
||
//iStyleID 风格ID
|
||
//iSegType 试听片段 -1=伴奏组合(Vx) 0=伴奏 1=前奏 2=尾奏
|
||
//iSegNo 试听类型 伴奏1-4,前尾奏1-2 iSegType=-1时忽略
|
||
//iKey 试听调号 -1=任意调
|
||
//iChordType 大小调 -1=任意 0=大调 1=小调
|
||
//返 回 值: 成功返回0, 否则返回错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*SM_GetStyleInfo)( int ID, TSTYLEINFO *tStyle );
|
||
//函数名: GetStyleInfo
|
||
//功 能: 获取指定ID的信息
|
||
//输 入:
|
||
//返 回: 成功返回0,否则为错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*SM_GetStyleInfos)( int iTS, TSTYLEINFO aStyleInfos[], int *nInfoNum );
|
||
//函数名: GetStyleInfos
|
||
//功 能: 获取指定节拍的风格信息列表
|
||
//输 入:
|
||
//返 回: 成功返回0,否则为错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*SM_InputWavNotes)( BYTE keys[], WORD delay[], int len, int tick,
|
||
BYTE iTimeSignature, int nTempo, int* nBarNum );
|
||
//功 能: 针对音频输入,设置音符数组、速度(nTempo)、拍号、tick等
|
||
//输 入: key 音符序号数组
|
||
// delay 音符时长数组
|
||
// len 音符数组大小
|
||
// tick 每拍tick数
|
||
// iTimeSignature 拍号
|
||
// nTempo 速度
|
||
// nBarNum 旋律小节数(返回)
|
||
//返 回: 无
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*SM_BaseCompose)( int iKey, int *nBufferLength, BYTE* pBuffer,
|
||
int* nStages, int aStages[][2],
|
||
int* nChords, int aChords[][2],
|
||
int* nFills, int aFills[][2], //加花数量及位置
|
||
int iStyleID ); //增加默认模板文件名
|
||
//函数名: BaseCompose
|
||
//功 能: 执行自动编曲与界面编曲之间的数据交互,获取伴奏文件块内存;
|
||
//输 入: 0=<iKey<=11 调号
|
||
// nBufferLength
|
||
// pBuffer 块内存地址
|
||
// Stages 旋律分段,0=自动分段
|
||
// Chords 和弦列表,0=自动分析和声
|
||
// Fills 加花
|
||
// StyleID 使用的风格ID
|
||
//返 回: 成功返回0, 否则返回错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*SM_Compose) ( int iKey, int *nBufferLength, BYTE* pBuffer,
|
||
int nStages, int aStages[][2], //分段
|
||
int nChords, int aChords[][2], //和声序列
|
||
int nComposeStages, int aComposeStages[][2], //
|
||
int aStyleID[],
|
||
int nFills, int aFills[][2], //加花数量及位置
|
||
int nComplement, int aComplement[][2],
|
||
int nVolumnCtrls, int aVolumnCtrls[][3],
|
||
int nInstrumentCtrls, int aInstrumentCtrls[][3]);
|
||
//函数名: Compose
|
||
//功 能: 按指定曲式结构编曲
|
||
//输 入: 0=<iKey<=11 调号
|
||
// nBufferLength
|
||
// pBuffer 块内存地址
|
||
// Stages 旋律分段
|
||
// Chords 和弦列表
|
||
// ComposeStages 曲式结构分段
|
||
// StyleID 各曲式段使用的风格ID
|
||
// Fills 加花
|
||
// nComplement
|
||
// nVolumnCtrls
|
||
// nInstrumentCtrls
|
||
//返 回: 成功返回0, 否则返回错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
//---------------------------------------------------------------------------------------------
|
||
typedef DLLAPI HRESULT (*SM_GetPrebeat)( int& nDataLen, BYTE* pData, int iStyleID );
|
||
//函数名: GetPrebeat
|
||
//功 能: 获取风格节拍提示
|
||
//输 入:
|
||
//nDataLen 返回数据长度
|
||
//pData 返回试听数据
|
||
//iStyleID 风格ID
|
||
//返 回 值: 成功返回0, 否则返回错误号
|
||
//---------------------------------------------------------------------------------------------
|
||
|
||
extern SM_GetVersion f_SM_GetVersion;
|
||
extern SM_Initialize f_SM_Initialize;
|
||
extern SM_Release f_SM_Release;
|
||
extern SM_CheckStyle f_SM_CheckStyle;
|
||
extern SM_GetSegmentBarNum f_SM_GetSegmentBarNum ;
|
||
extern SM_GetStyleRecomInfos f_SM_GetStyleRecomInfos;
|
||
extern SM_GetStyleDemo f_SM_GetStyleDemo;
|
||
extern SM_GetStyleInfo f_SM_GetStyleInfo;
|
||
extern SM_GetStyleInfos f_SM_GetStyleInfos;
|
||
extern SM_InputWavNotes f_SM_InputWavNotes ;
|
||
extern SM_BaseCompose f_SM_BaseCompose ;
|
||
extern SM_Compose f_SM_Compose ;
|
||
extern SM_GetPrebeat f_SM_GetPrebeat ;
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
// MediaModule函数段
|
||
//
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef __stdcall HRESULT (*MM_GetVersion)();
|
||
//功 能:获取模块版本号
|
||
//输 入:无
|
||
//返回值:版本号 LOWORD=major, HIWORD=minor
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_InitialObjects) ( HWND hWnd, char* strRoot );
|
||
//功 能:初始化DirectMusic对象
|
||
//输 入:hWnd 函数调用窗口句柄
|
||
// strRoot 应用程序根目录
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_DestroyObjects) ();
|
||
//功 能:释放对象
|
||
//输 入:无
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
typedef DLLAPI HRESULT (*MM_GetFontInfo)( char* strFileName, char* strFontName );
|
||
//功 能:获取音色库信息
|
||
//输 入:[IN] strFileName 音色库文件名
|
||
// [OUT]strFontName 音色库名称
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_CheckExtFont)( const char* strDirName );
|
||
//功 能:检测扩展音色库信息
|
||
//输 入:[IN] strDirName 扩展音色库路径
|
||
//返回值:0=无效 1=扩展音色库有效 2=中国风音色库有效
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetFont)( char* strFileName );
|
||
//功 能:设置音色库
|
||
//输 入:strFileName 音色库文件名
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
typedef DLLAPI HRESULT (*MM_Record)( HWND hNotifyWnd, DOUBLE dblPlayStartBar, DOUBLE dblRecordStartBar,
|
||
DOUBLE dblRecordEndBar, int iWithCompose );
|
||
//功 能:录音
|
||
//输 入:hNotifyWnd 通知窗口
|
||
// dblPlayStartBar 原录音播放小节位置
|
||
// dblRecordStartBar 录音起点小节位置
|
||
// dblRecordEndBar 录音修改终点小节位置
|
||
// iWitchCompose 0=不带伴奏录音,1=基本伴奏,2=曲式伴奏, 0x10=predefine
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadMidiMelody)( HWND hNotifyWnd, LPCSTR strFileName );
|
||
//功 能:从MIDI文件获取旋律
|
||
//输 入:hNotifyWnd 接收进度消息的窗口句柄
|
||
// strFileName MIDI文件名
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadBaseCompose) ( LPBYTE lpMelodyData, DWORD dwDataSize );
|
||
//功 能:准备基本编曲数据
|
||
//输 入:lpMelodyData 旋律数据
|
||
// dwDataSize 数据大小
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadCompose) ( LPBYTE lpMelodyData, DWORD dwDataSize );
|
||
//功 能:准备完整编曲数据
|
||
//输 入:lpMelodyData 旋律数据
|
||
// dwDataSize 数据大小
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadPrebeat) ( LPBYTE lpData, DWORD dwDataSize );
|
||
//功 能:准备节拍提示数据
|
||
//输 入:lpData 节拍数据
|
||
// dwDataSize 数据大小
|
||
//返回值:错误返回0
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_Play)( HWND hNotifyWnd, DOUBLE dblStartPoint, int iType );
|
||
//功 能:播放
|
||
//输 入:hNotifyWnd 接收播放消息的窗口句柄
|
||
// dwStartPoint 开始位置
|
||
// iChans 播放的通道类型
|
||
// TYPE_BASECOMPOSE=0x01, TYPE_COMPOSE=0x02, TYPE_AUDIO=0x04, TYPE_SONG=0x08
|
||
// TYPE_BEAT=0x10 TYPE_AUDIO_BASECOMPOSE=0x05, TYPE_SONG_COMPOSE=0x0A
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_Stop)();
|
||
//功 能:停止播放
|
||
//输 入:
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_CheckIODevice)( int& iOutDevice, char* strOutName,
|
||
int& iInDevice, char* strInName );
|
||
//功 能:检查输入输出设备
|
||
//输 入:
|
||
// iOutDevice 输出设备号
|
||
// strOutName 输出设备名
|
||
// iInDevice 输入设备号
|
||
// strInName 输入设备名
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetIODevice)( int& iPlayDevice, int& iOutput,
|
||
int& iRecDevice, int& iInput );
|
||
//功 能:设置当前录音设备,失败则返回缺省设备
|
||
//输 入:
|
||
// iPlayDevice 播放设备号
|
||
// iOutput 播放输出源
|
||
// iRecDevice 录音设备号
|
||
// iInput 录音输入源
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*MM_GetPlaybackDeviceInfo)( int nSize, PVOID arrInfo );
|
||
//功 能:获取播放设备信息
|
||
//输 入:nSize 数组大小
|
||
// arrInfo 设备信息数组
|
||
//返回值:设备数
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*MM_GetPlaybackOutputInfo)( int nSize, PVOID arrInfo );
|
||
//功 能:获取输出源信息
|
||
//输 入:iDevice 设备号
|
||
// nSize 数组大小
|
||
// arrInfo 输入源信息数组
|
||
//返回值:设备数
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*MM_GetRecordDeviceInfo)( int nSize, PVOID arrInfo );
|
||
//功 能:获取录音设备信息
|
||
//输 入:nSize 数组大小
|
||
// arrInfo 设备信息数组
|
||
//返回值:设备数
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*MM_GetRecordInputInfo)( int nSize, PVOID arrInfo );
|
||
//功 能:获取输入源信息
|
||
//输 入:iDevice 设备号
|
||
// nSize 数组大小
|
||
// arrInfo 输入源信息数组
|
||
//返回值:设备数
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_RecordTest)( HWND hNotifyWnd );
|
||
//功 能:录音测试
|
||
//输 入:
|
||
// hNotifyWnd 测试窗口
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetRecordAutoAdjust)( bool bAutoAdjust );
|
||
//功 能:设置自动调节录音音量
|
||
//输 入:bAutoAdjust 自动调节
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetRecordMoniter)( bool bMoniter );
|
||
//功 能:设置录音监听
|
||
//输 入:bMoniter 是否监听
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetRecordProtect)( bool bProtect );
|
||
//功 能:设置内录保护
|
||
//输 入:bProtect 内录保护
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetRecordChannels)( int nChannels );
|
||
//功 能:设置录音通道数
|
||
//输 入:nChannels 通道数 2=立体声, other=单通道
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_ShowAsioPanel)();
|
||
//功 能:显示ASIO控制面板
|
||
//输 入:
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_RestartAsioDevice)();
|
||
//功 能:重启ASIO设备
|
||
//输 入:
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadAudio) ( HWND hNotifyWnd, LPCSTR strAudioFile, int nTimeSignature, int nTempo );
|
||
//功 能:从WAV文件获取旋律
|
||
//输 入:strAudioFile 文件名
|
||
// nSignature 排号
|
||
// nTempo 速度
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_ClearAudio)();
|
||
//功 能:清除音频
|
||
//输 入:
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_CombineSong)( DWORD dwSetNum, DOUBLE arrDblTimeSet[][2] );
|
||
//功 能:根据原始录音拼接全曲
|
||
//输 入:dwSetNum 分段数
|
||
// arrDblTimeSet[][2] 分段设置组:[0]=起始位置(小于0为静音) [1]=段落小节长度
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_Save)( HWND hNotifyWnd, int iSaveType, LPCSTR strFileName, int iFileType );
|
||
//功 能:保存到文件
|
||
//输 入:hNotifyWnd 接收消息的窗口句柄
|
||
// iSaveType 保存内容(音频/伴奏/混合)
|
||
// strFileName 文件名
|
||
// iFileType 保存文件类型
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_GetMelodyInfo)( OUT int* iMelodyKey, OUT int* iTimeSignature, OUT int* nTempo );
|
||
//功 能:获取旋律信息
|
||
//输 入:iMelodyKey 旋律调号
|
||
// iTimeSignature 旋律拍号
|
||
// nTempo 旋律速度
|
||
//返回值:旋律数组大小,或错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_GetMelody)(OUT BYTE keys[], OUT WORD delay[], int iKey);
|
||
//功 能:获取旋律数组
|
||
//输 入:Keys 音符数组
|
||
// delay 音符延时数组
|
||
// 由调用模块负责数组的分配和释放
|
||
// iKey =-1获取当前音符数组;>-1获取重设调号后的当前音符数组
|
||
//返回值:实际数组大小,或错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_CreateRealTimeMIDIStream)( bool bDrum );
|
||
//功 能:创建实时MIDI流
|
||
//输 入:bDrum 鼓通道
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_FreeRealTimeMIDIStream)();
|
||
//功 能:释放实时MIDI流
|
||
//输 入:无
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_RealTimeMIDINoteOn)(unsigned char iNote);
|
||
//功 能:实时MIDI流打开音符
|
||
//输 入:iNote 音符序号
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_RealTimeMIDINoteOff)(unsigned char iNote);
|
||
//功 能:实时MIDI流关闭音符
|
||
//输 入:iNote 音符序号
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_PlayStyleDemo)( LPBYTE lpStyleDemoData, DWORD dwDataSize, int nTempo );
|
||
//功 能:播放风格试听
|
||
//输 入:lpStyleDemoData 风格试听数据
|
||
// dwDataSize 数据长度
|
||
// nTempo 播放的速度 0=原速
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetTempo)( int nTempo );
|
||
//功 能:设置速度
|
||
//输 入:nTempo 速度(拍/分钟)
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetTimeSignature)( int nTimeSignature );
|
||
//功 能:设置节拍
|
||
//输 入:nTimeSignature 节拍(0=4/4, 1=3/4, 2=2/4, 3=6/8
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI DWORD (*MM_GetAudioVolume)( double dblPoint );
|
||
//功 能:旋律文件输入时获取Audio的音量
|
||
//输 入:dblPoint 指定获取音量的小节位置
|
||
//返回值:当前音量 LOWORD左声道,HIWORD右声道
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI DWORD (*MM_GetStreamVolume)( int iStreamType );
|
||
//功 能:获取音频流音量
|
||
//输 入:iStreamType 音频流类型:0=master; 1=Record; 2=Audio; 3=BaseCompose;
|
||
// 4=Compose; 5=Song; 6=Output
|
||
//返回值:当前音量 LOWORD左声道,HIWORD右声道
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetStreamVolume)( int iStreamType, float fVolume );
|
||
//功 能:设置音频流音量
|
||
//输 入:iStreamType 音频流类型:0=master; 1=Record; 2=Audio; 3=BaseCompose;
|
||
// 4=Compose; 5=Song
|
||
// fVolume 音量大小
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI float (*MM_GetLatency)( bool bCountIn );
|
||
//功 能:获取设备延迟
|
||
//输 入:bCountIn 是否计算输入延迟
|
||
//返回值:延迟时间(ms)
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI LONG (*MM_GetStreamLength)( int iStreamType );
|
||
//功 能:获取音频流长度
|
||
//输 入:iStreamType 音频流类型:0=master; 1=Record; 2=Audio; 3=BaseCompose;
|
||
// 4=Compose; 5=Song
|
||
//返回值:音频流长度值,-1为无效
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetStreamLength)( int iStreamType, DWORD msLen );
|
||
//功 能:设置音频流长度
|
||
//输 入:iStreamType 音频流类型:仅支持音频修改长度 2=Audio
|
||
// msLen 时间长度(毫秒)
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_ActiveAPR)( BOOL bActive );
|
||
//功 能:启用APR功能
|
||
//输 入:bActive 激活/关闭
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI long (*MM_SaveProject)( int iMode, HWND hNotifyWnd, LPCSTR strFileName );
|
||
//功 能:保存工程文件
|
||
//输 入:iMode 工程模式 0=ATUO, 1=NORMAL, 2=UPLOAD
|
||
// hNotifyWnd 接收消息的窗口句柄
|
||
// strFileName 工程文件名
|
||
//返回值:写入字节数
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadProject)( int iMode, HWND hNotifyWnd, LPCSTR strFileName, LONG lBeginPos,
|
||
DWORD dwVersion );
|
||
//功 能:载入工程文件
|
||
//输 入:iMode 工程模式 0=ATUO, 1=NORMAL, 2=UPLOAD
|
||
// hNotifyWnd 接收消息的窗口句柄
|
||
// strFileName 工程文件名
|
||
// lBeginPos 开始读取的位置
|
||
// dwVersion 载入文件的版本号
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_UserCanceled)();
|
||
//功 能:用户取消媒体文件操作
|
||
//输 入:无
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadAnalysis)( HWND hNotifyWnd, LPCWSTR strFileName, LONG lBeginPos,
|
||
DWORD dwVersion );
|
||
//功 能:载入旋律分析数据
|
||
//输 入:hNotifyWnd 接收消息的窗口句柄
|
||
// pFile 读取的文件
|
||
// dwVersion 载入文件的版本号
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadAudioMP3)( HWND hNotifyWnd, LPCWSTR strFileName, LONG lBeginPos,
|
||
DWORD dwVersion );
|
||
//功 能:载入原始录音MP3
|
||
//输 入:hNotifyWnd 接收消息的窗口句柄
|
||
// pFile 读取的文件
|
||
// lPos 开始读取的位置
|
||
// dwVersion 载入文件的版本号
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_LoadSongMP3)( HWND hNotifyWnd, LPCWSTR strFileName, LONG lBeginPos,
|
||
DWORD dwVersion );
|
||
//功 能:载入全曲录音mp3
|
||
//输 入:hNotifyWnd 接收消息的窗口句柄
|
||
// pFile 读取的文件
|
||
// lPos 开始读取的位置
|
||
// dwVersion 载入文件的版本号
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*MM_SetFxPreset)( DWORD iFxType, int iFxNo );
|
||
//功 能:设置音效
|
||
//输 入:
|
||
// iFxType 音效号
|
||
// iFxNo 音效预置号 0=关闭
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
extern MM_GetVersion f_MM_GetVersion;
|
||
extern MM_InitialObjects f_MM_InitialObjects;
|
||
extern MM_DestroyObjects f_MM_DestroyObjects;
|
||
extern MM_LoadMidiMelody f_MM_LoadMidiMelody;
|
||
extern MM_GetFontInfo f_MM_GetFontInfo;
|
||
extern MM_CheckExtFont f_MM_CheckExtFont;
|
||
extern MM_SetFont f_MM_SetFont;
|
||
extern MM_Record f_MM_Record;
|
||
extern MM_LoadBaseCompose f_MM_LoadBaseCompose;
|
||
extern MM_LoadCompose f_MM_LoadCompose;
|
||
extern MM_LoadPrebeat f_MM_LoadPrebeat;
|
||
extern MM_Play f_MM_Play;
|
||
extern MM_Stop f_MM_Stop;
|
||
extern MM_CheckIODevice f_MM_CheckIODevice;
|
||
extern MM_SetIODevice f_MM_SetIODevice;
|
||
extern MM_GetPlaybackDeviceInfo f_MM_GetPlaybackDeviceInfo;
|
||
extern MM_GetPlaybackOutputInfo f_MM_GetPlaybackOutputInfo;
|
||
extern MM_GetRecordDeviceInfo f_MM_GetRecordDeviceInfo;
|
||
extern MM_GetRecordInputInfo f_MM_GetRecordInputInfo;
|
||
extern MM_RecordTest f_MM_RecordTest;
|
||
extern MM_SetRecordMoniter f_MM_SetRecordMoniter;
|
||
extern MM_SetRecordAutoAdjust f_MM_SetRecordAutoAdjust;
|
||
extern MM_SetRecordProtect f_MM_SetRecordProtect;
|
||
extern MM_ShowAsioPanel f_MM_ShowAsioPanel;
|
||
extern MM_RestartAsioDevice f_MM_RestartAsioDevice;
|
||
extern MM_LoadAudio f_MM_LoadAudio;
|
||
extern MM_ClearAudio f_MM_ClearAudio;
|
||
extern MM_GetMelodyInfo f_MM_GetMelodyInfo;
|
||
extern MM_GetMelody f_MM_GetMelody;
|
||
extern MM_CreateRealTimeMIDIStream f_MM_CreateRealTimeMIDIStream;
|
||
extern MM_FreeRealTimeMIDIStream f_MM_FreeRealTimeMIDIStream;
|
||
extern MM_RealTimeMIDINoteOn f_MM_RealTimeMIDINoteOn;
|
||
extern MM_RealTimeMIDINoteOff f_MM_RealTimeMIDINoteOff;
|
||
extern MM_PlayStyleDemo f_MM_PlayStyleDemo;
|
||
extern MM_SetTempo f_MM_SetTempo;
|
||
extern MM_SetTimeSignature f_MM_SetTimeSignature;
|
||
extern MM_GetAudioVolume f_MM_GetAudioVolume;
|
||
extern MM_GetStreamVolume f_MM_GetStreamVolume;
|
||
extern MM_SetStreamVolume f_MM_SetStreamVolume;
|
||
extern MM_GetLatency f_MM_GetLatency;
|
||
extern MM_GetStreamLength f_MM_GetStreamLength;
|
||
extern MM_SetStreamLength f_MM_SetStreamLength;
|
||
extern MM_CombineSong f_MM_CombineSong;
|
||
extern MM_Save f_MM_Save;
|
||
extern MM_SaveProject f_MM_SaveProject;
|
||
extern MM_LoadProject f_MM_LoadProject;
|
||
extern MM_UserCanceled f_MM_UserCanceled;
|
||
extern MM_LoadAnalysis f_MM_LoadAnalysis;
|
||
extern MM_LoadAudioMP3 f_MM_LoadAudioMP3;
|
||
extern MM_LoadSongMP3 f_MM_LoadSongMP3;
|
||
extern MM_ActiveAPR f_MM_ActiveAPR;
|
||
extern MM_SetFxPreset f_MM_SetFxPreset;
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
string wstr2str(const wstring& _src);
|
||
wstring str2wstr(const string& _src);
|
||
string UTF8ToMBCS(const char *pcUtf8);
|
||
string GBToUTF8(const char* str);
|
||
void DebugPrint(const char * fmt, ...);
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
// ClientService函数段
|
||
//
|
||
extern TSOFTWAREINFO g_infoSoftwareUpdate;
|
||
extern int g_nBuildVersion;
|
||
extern TUSERINFO g_infoUser;
|
||
extern TSONGINFO g_infoSong;
|
||
extern bool g_bAutoLogin,
|
||
g_bLogon;
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_GetVersion)();
|
||
//功 能:获取版本信息
|
||
//输 入:无
|
||
//返回值:版本号 LOWORD=major, HIWORD=minor
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_InitialService)( HWND hWnd, int iClientType, PTSOFTWAREINFO pSofewareInfo,
|
||
char* strURL, char* strRoot, char idDevice[6] );
|
||
//功 能:初始化客户端服务
|
||
//参 数:hWnd 函数调用窗口句柄
|
||
// iClientType 客户端类型(软件内部编号)
|
||
// pSofewareInfo[in,out] 传入当前版本,获取更新版本
|
||
// strURL 网站服务器名称 http://xxx.xxx.xxx:xx/
|
||
// strRoot 资源文件根目录
|
||
// idDevice 设备号
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_DestroyService)();
|
||
//功 能:解除客户端服务
|
||
//输 入:无
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_Register)( PTUSERINFO pUserInfo, int isEmailOrMobile );
|
||
//功 能:用户注册
|
||
//参 数:pUserInfo[in,out] 传入用户名和密码,输出用户信息
|
||
// isEmailOrMobile 捆绑邮箱或手机号 1=邮箱 2=手机号
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_Login)( PTUSERINFO pUserInfo, BOOL bSync );
|
||
//功 能:用户登录
|
||
//参 数:pUserInfo[in,out] 传入用户名和密码,输出用户信息
|
||
// bSync 同步=TURE,异步=FALSE
|
||
//返回值:错误号
|
||
// 正常登录 = 0
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_Logoff)();
|
||
//功 能:注销或取消登录
|
||
//参 数:无
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_CancelOperation)();
|
||
//功 能:取消操作
|
||
//参 数:
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT(*CS_DownloadStyle)(UINT idStyle, HWND hProcessWnd);
|
||
// 功 能:下载风格数据
|
||
// 参 数:idStyle 风格ID
|
||
// hProcessWnd 消息接收窗口
|
||
// 返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_GetQnA)( int& nQnANum, TSTRINGPAIR arrQnA[], bool bLocal, UINT idUser );
|
||
//功 能:获取问题与回答
|
||
//参 数:nQnANum 返回问题个数
|
||
// arrQnA 返回问题数组
|
||
// bLocal true = 本机提问, false = 常见问题
|
||
// idUser 用户ID
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_SubmitQnA)( UINT idUser, char* strQuestion );
|
||
//功 能:提交问题
|
||
//参 数:
|
||
// idUser 用户ID
|
||
// strQuestion 问题内容
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_GetNotice)( int& nNoticeNum, TSTRINGPAIR arrNotice[], UINT idUser );
|
||
//功 能:获取公告或通知
|
||
//参 数:nNoticeNum 返回通知个数
|
||
// arrNotice 返回通知数组
|
||
// idUser 用户ID
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*CS_GetNewNoticeNum)( int idUser );
|
||
//功 能:获取未读公告或通知数
|
||
//参 数:
|
||
// idUser 用户号,=0为公告
|
||
//返回值:通知个数
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_UploadSong)( UINT idUser, TSONGINFO* pSongInfo, HWND hProcessWnd,
|
||
TSHAREINFO* pShareInfo );
|
||
//功 能:上传歌曲
|
||
//参 数:idUser 用户ID
|
||
// pSongInfo 歌曲信息
|
||
// hProcessWnd 进度消息接收窗口
|
||
// pShareInfo 分享信息
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_GetWebPageURL)( int iType, char* strURL );
|
||
//功 能:获取网站操作URL
|
||
//参 数:
|
||
// iType 访问页面:0-首页,1-个人中心,2-歌曲管理
|
||
// strURL 输出URL字符串
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_GetStyleNums)( int& nOnline, int& nLocal );
|
||
//功 能:获取风格数
|
||
//参 数:
|
||
// nOnline 有效在线数
|
||
// nLocal 本地下载数
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
typedef DLLAPI HRESULT (*CS_CheckPayment)( UINT idUser, int iOperation, int nStyleNum,
|
||
UINT arrStyleIDs[], int arrCosts[],
|
||
int *pCost, int *pBalance );
|
||
//功 能:检查支付
|
||
//输 入:idUser 用户ID
|
||
//--iOperation[in]:操作 0=使用 1=编辑
|
||
//--nStyleNum[in]:风格个数
|
||
//--arrStyleIDs[in]:风格ID数组
|
||
//--arrCosts[out]:风格当前消耗值
|
||
//--pCost[out]: 定义int接收实际消耗
|
||
//--pBalance[out]: 定义int变量接收用户音符数余额
|
||
//--返 回: 错误值
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
typedef DLLAPI HRESULT (*CS_ConfirmPayment)( UINT idUser, int iOperation, int nStyleNum,
|
||
UINT arrStyleIDs[], int *pBalance );
|
||
//功 能:确定支付
|
||
//输 入:idUser 用户ID
|
||
//--iOperation[in]:操作 0=使用 1=编辑
|
||
//--nStyleNum[in]:风格个数
|
||
//--dwStyleID[in]:风格ID数组
|
||
//--pBalance[out]: 定义int变量接收用户音符数余额
|
||
//--返 回: 错误值
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI HRESULT (*CS_AutoDownloadStyle)( bool bSet );
|
||
//功 能:自动下载风格
|
||
//参 数:
|
||
// bSet 设置/取消自动下载
|
||
//返回值:错误号
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*CS_SaveProject)( LPCSTR strFileName );
|
||
//功 能:保存工程文件
|
||
//输 入:
|
||
// strFileName 工程文件名
|
||
//返回值:写入字节数
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI int (*CS_LoadProject)( LPCSTR strFileName, UINT lBeginPos, DWORD dwVersion );
|
||
//功 能:载入工程文件
|
||
//输 入:
|
||
// strFileName 工程文件名
|
||
// lBeginPos 开始读取的位置
|
||
// dwVersion 载入文件的版本号
|
||
//返回值:读取字节数
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
typedef DLLAPI void (*CS_ResetProject)();
|
||
//功 能:重置工程参数
|
||
//输 入:
|
||
//返回值:
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
|
||
extern CS_GetVersion f_CS_GetVersion;
|
||
extern CS_InitialService f_CS_InitialService;
|
||
extern CS_DestroyService f_CS_DestroyService;
|
||
extern CS_Register f_CS_Register;
|
||
extern CS_Login f_CS_Login;
|
||
extern CS_Logoff f_CS_Logoff;
|
||
extern CS_CancelOperation f_CS_CancelOperation;
|
||
extern CS_DownloadStyle f_CS_DownloadStyle;
|
||
extern CS_GetQnA f_CS_GetQnA;
|
||
extern CS_SubmitQnA f_CS_SubmitQnA;
|
||
extern CS_GetNotice f_CS_GetNotice;
|
||
extern CS_GetNewNoticeNum f_CS_GetNewNoticeNum;
|
||
extern CS_UploadSong f_CS_UploadSong;
|
||
extern CS_GetWebPageURL f_CS_GetWebPageURL;
|
||
extern CS_GetStyleNums f_CS_GetStyleNums;
|
||
extern CS_CheckPayment f_CS_CheckPayment;
|
||
extern CS_ConfirmPayment f_CS_ConfirmPayment;
|
||
extern CS_AutoDownloadStyle f_CS_AutoDownloadStyle;
|
||
extern CS_SaveProject f_CS_SaveProject;
|
||
extern CS_LoadProject f_CS_LoadProject;
|
||
extern CS_ResetProject f_CS_ResetProject;
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
// QR函数段
|
||
typedef int (*QR_Encode)( const char *string, unsigned char* pData );
|
||
|
||
extern QR_Encode f_QR_Encode;
|
||
|
||
/////////////////////////////////////////////////////////////////////////////////////////
|
||
HRESULT GetMFFunctions( HINSTANCE hDll );
|
||
HRESULT GetMMFunctions( HINSTANCE hDll );
|
||
HRESULT GetCSFunctions( HINSTANCE hDll );
|
||
HRESULT GetQRFunctions( HINSTANCE hDll );
|
||
|
||
wstring GetStageName( int iStage );
|
||
wstring GetElementInfo( int iElem, int iList );
|
||
|
||
void UpdateGlobalStyle();
|
||
void ClearFontList();
|
||
void ClearGlobalVars( int iOperation=LIST_ALL );
|
||
void ClearSVDVars();
|
||
void SaveSVDVars(); //add by tj 2013/12/31
|
||
|
||
|
||
void SetPlayTimer(bool bStart, UINT& tTimer, UINT& tAccuracy, void* pUser=NULL);
|
||
void GetPlayTime( int iStartBar, double dblStartPoint, char* strTime );
|
||
void CALLBACK OnMediaTimer(UINT tTimerID, UINT msg,DWORD dwUser,DWORD dwl,DWORD dw2);
|
||
|
||
BOOL SaveProject( LPCSTR strProjectName, int iMode=0, HWND hNotifyWnd=NULL );
|
||
BOOL LoadProject( LPCTSTR strProjectName, HWND hNotifyWnd );
|
||
int LoadVersion1( FILE *pFile, LPCTSTR strProjectName, DWORD dwVersion, HWND hNotifyWnd );
|
||
int LoadVersion2( FILE *pFile, DWORD dwVersion, HWND hNotifyWnd, int iMode );
|
||
|
||
void UpdateRecentProject(wstring wstrProj);//更新最近工程列表 //add by tj 2013/12/31
|
||
BOOL HasProjectModified( int idStyle=-1 );
|
||
void SetInitVar( BOOL bClose=false );
|
||
void GetInitVar();
|
||
void SetAutoLogin( bool bAuto, LPCSTR strName, LPCSTR strPwd );
|
||
bool GetAutoLogin( char* strName, char* strPwd );
|
||
void GetAutoSaveReg();
|
||
void SetAutoSaveReg();//注册表增加自动保存
|
||
void ClearAutoProj();
|
||
void SaveAutoProj();
|
||
|
||
void SetMelodyTempo( int nTempo, bool bInit=false ); //设置旋律速度
|
||
void SetMelodyTS( int iTS, bool bInit=false ); //设置旋律拍号
|
||
void SetWavNotes();
|
||
|
||
bool UpdateStageBars();
|
||
bool UpdateSegmentBars();
|
||
void InitComposeStage();
|
||
bool ReloadBaseCompose();
|
||
bool GenerateBaseCompose();
|
||
bool ReloadCompose(int iKey=g_iMelodyKey);
|
||
bool GenerateCompose( int iKey, bool bCombineSong );
|
||
|
||
int GetComposeData( COMPOSESTAGELIST lstComposeStages, int iKey, int& nDataSize, LPBYTE lpData,
|
||
bool bCombineSong, int& nTimeSet, double (*aTimeSet)[2] );
|
||
int ActiveAPR( bool bActive );
|
||
void ResetAudioEffects();
|
||
|
||
bool IsProtected();
|
||
|
||
void SetTransparent( TComponent* pCtrl );
|
||
void UniDrawChord(TCanvas *Canvas, TRect rcDraw, int iMainKey, int iAjustKey, int iType);
|
||
|
||
char* GetMacAdress();
|
||
|
||
#endif
|