?? malib.h
字號(hào):
/****************************************************************************
*
* Copyright (C) 2002-2003 YAMAHA CORPORATION. All rights reserved.
*
* Module : malib.h
*
* Description : Libraly Functions
*
* Version : 2.0.0 2003.05.14
*
****************************************************************************/
#ifndef __MALIB_H__
#define __MALIB_H__
/****************************************************************************
* definition of function flag
****************************************************************************/
/* malib_GetContentsData */
/* code type */
#define MALIB_CONTENTS_CODE_SJIS 0x00
#define MALIB_CONTENTS_CODE_LATIN1 0x01
#define MALIB_CONTENTS_CODE_UTF8 0x23
#define MALIB_CONTENTS_CODE_BINARY 0xFF
/* malib_NextChunk */
/* phase */
#define MALIB_CHUNK_PHASE_MMMD 0
#define MALIB_CHUNK_PHASE_CNTI 1
#define MALIB_CHUNK_PHASE_MMMDSUB 2
#define MALIB_CHUNK_PHASE_MTRSUB 3
#define MALIB_CHUNK_PHASE_ATRSUB 4
#define MALIB_CHUNK_PHASE_OPDASUB 5
#define MALIB_CHUNK_PHASE_MTSPSUB 6
#define MALIB_CHUNK_PHASE_MTHVSUB 7
/* return value */
#define MALIB_CHUNKCODE_MMMD 0x00
#define MALIB_CHUNKCODE_CNTI 0x01
#define MALIB_CHUNKCODE_OPDA 0x02
#define MALIB_CHUNKCODE_DCH 0x20
#define MALIB_CHUNKCODE_M5P 0x21
#define MALIB_CHUNKCODE_MTR 0x03
#define MALIB_CHUNKCODE_MSPI 0x30
#define MALIB_CHUNKCODE_MTSU 0x31
#define MALIB_CHUNKCODE_MTSQ 0x32
#define MALIB_CHUNKCODE_MTSP 0x33
#define MALIB_CHUNKCODE_MWA 0x3F
#define MALIB_CHUNKCODE_ATR 0x04
#define MALIB_CHUNKCODE_ASPI 0x40
#define MALIB_CHUNKCODE_ATSU 0x41
#define MALIB_CHUNKCODE_ATSQ 0x42
#define MALIB_CHUNKCODE_AWA 0x43
#define MALIB_CHUNKCODE_MTHV 0x35
#define MALIB_CHUNKCODE_MHVS 0x36
#define MALIB_CHUNKCODE_HVP 0x37
#define MALIB_CHUNKCODE_MHSC 0x38
#define MALIB_CHUNKCODE_UNKNOWN 0xFF
#define MALIB_CHUNK_ID_ERROR -1
#define MALIB_CHUNK_SIZE_ERROR -2
/****************************************************************************
* definition of resources
****************************************************************************/
#define MAPLIB_MAX_LV2_VOICES (16)
/****************************************************************************
* typedef
****************************************************************************/
typedef struct _MALIBGETCINFO
{
UINT8* pbCnti; /* pointer to CNTI body */
UINT32 dCntiSize; /* size of CNTI */
UINT8* pbOption; /* pointer to OPDA body */
UINT32 dOptionSize; /* size of OPDA */
UINT16 bCode; /* code type */
UINT8 bTag[2]; /* tag name */
UINT8* pbBuf; /* pointer to write buffer */
UINT32 dBufSize; /* size of write buffer */
} MALIBGETCINFO, *PMALIBGETCINFO;
typedef struct _MALIBVOCINFO
{
UINT32 dBankNo; /* Bank Number (0,1,128, 129) */
UINT32 dProgNo; /* Program Number (0..127) */
} MALIBVOCINFO, *PMALIBVOCINFO;
typedef struct _MALIBPHRINFO
{
UINT32 dErrChk; /* error check 0:disable 1:enable */
UINT32 dVersion; /* Phrase version 1:L1 2:L2 */
UINT8* pbSeq; /* Pointer to the sequence chunk body */
UINT8* pbVoice; /* Pointer to the voice chunk body */
UINT32 dSeqSize; /* Size of sequence chunk body */
UINT32 dVoiceSize; /* Size of voice chunk body */
UINT32 dPlayTime; /* Total play back time[tick] */
UINT32 dTimer; /* Current play back time[tick] */
UINT32 dCurrentTime;
UINT32 dDataPosition; /* Current potision
in sequence chunk body */
MALIBVOCINFO sVocInfo[MAPLIB_MAX_LV2_VOICES];
} MALIBPHRINFO, *PMALIBPHRINFO;
typedef struct _MALIBAUDINFO
{
UINT32 dLoaded;
UINT32 dSMAFType; /* SMAF type 0:MA-1/2 1:MA-3 2:MA-5 */
UINT32 dFmt; /* data format */
/* bit7 0:mono 1:stereo */
/* bit1..0 1:4bit ADPCM */
/* 2:8bit offset binary PCM */
/* 3:8bit 2's compt binary PCM */
UINT8* pbCnti; /* pointer to the CNTI chunk */
UINT32 dCntiSize; /* size of CNTI chunk */
UINT8* pbOpda; /* pointer to the OPDA chunk */
UINT32 dOpdaSize; /* size of OPDA chunk */
UINT8* pbSource; /* pointer to the wave data */
UINT32 dFs; /* sampling rate[Hz] */
UINT32 dSizeOfSource; /* size of wve data */
UINT32 dTimer; /* Current play back time[tick] */
UINT32 dPlayTime; /* Total play back time[time] */
UINT32 dLoopCount; /* Loop count(0:infinite 1..255) */
} MALIBAUDINFO, *PMALIBAUDINFO;
UINT16 malib_MakeCRC (UINT32 dSize, UINT8* pbData);
UINT32 malib_Decode_7bitData (UINT8* pb7bit, UINT32 d7Size, UINT8* pb8bit, UINT32 d8Size);
SINT32 malib_smafphrase_checker(UINT8* pbData, UINT32 dSize, void* pvInfo);
SINT32 malib_smafaudio_checker (UINT8* pbData, UINT32 dSize, UINT8 bMode, void* pvInfo);
SINT32 malib_GetContentsData (PMALIBGETCINFO psCI);
SINT32 malib_NextChunk (UINT8* pbFile, UINT32 dSize, UINT32 dState, UINT32* pdChunkID, UINT32* pdChunkNo);
SINT32 malib_hvscript_checker (UINT8* pbData, UINT32 dSize);
#endif /*__MALIB_H__*/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -