?? wavepdd.h
字號(hào):
//
// Copyright(C) Renesas Technology Corp. 1999-2003. All rights reserved.
//
// WaveDev Driver for ITS-DS7
//
//----------------------------------------------------------------------------
//
// FILE : WAVEPDD.H
// CREATED : 1999.04.26 (for HD64465 on PFM-DS6)
// MODIFIED : 2003.06.20
// AUTHOR : Renesas Technology Corp.
// HARDWARE : RENESAS ITS-DS7
// FUNCTION : Macros, types and global variable definitions for audio PDD
// HISTORY :
// 2003.06.20
// - Created release code.
// (based on WaveDev driver for ITS-DS6 Ver.2.2.0 for WCE4.1)
//
//
// Copyright (c) 1995-2000 Microsoft Corporation. All rights reserved.
//
typedef enum {
PCM_TYPE_M8,
PCM_TYPE_M16,
PCM_TYPE_S8,
PCM_TYPE_S16
} PCM_TYPE, *PPCM_TYPE;
typedef struct {
UINT8 sample; // Unsigned 8-bit sample
} SAMPLE_8_MONO;
typedef struct {
INT16 sample; // Signed 16-bit sample
} SAMPLE_16_MONO;
typedef struct {
UINT8 sample_left; // Unsigned 8-bit sample
UINT8 sample_right; // Unsigned 8-bit sample
} SAMPLE_8_STEREO;
typedef struct {
INT16 sample_left; // Signed 16-bit sample
INT16 sample_right; // Signed 16-bit sample
} SAMPLE_16_STEREO;
typedef union {
SAMPLE_8_MONO m8;
SAMPLE_16_MONO m16;
SAMPLE_8_STEREO s8;
SAMPLE_16_STEREO s16;
} PCM_SAMPLE, *PPCM_SAMPLE;
typedef union _DMAControlRegister {
struct {
DWORD CWS : 2; // Channel Width Source
DWORD CWD : 2; // Channel Width Destination
DWORD RTRA : 1; // Register Bus Transfer
DWORD DR : 1; // Direction
DWORD DTRA : 1; // Begin DMA Transfer
DWORD MM : 1; // Master Mode
DWORD RBEN : 1; // Register Bus Enable
DWORD ML : 1; // Memory Location
DWORD DBEN : 1; // Double Buffer Enable
DWORD IEN : 3; // Enable Interrupts
DWORD END : 2; // Endian
DWORD CSEL : 5; // Channel Select
DWORD PTEN : 1; // PT Interrupt Enable
DWORD Reserved : 10; // Reserved
} bits;
DWORD AsDWORD;
} DMAControlRegister;
#define divINT16by256(x) (min(127, (x >> 8)+((x & 0xFF) > 128)))
#define fromPCM16toPCM8(sample) ((BYTE)(divINT16by256(sample) + 128))
#define fromPCM8toPCM16(sample) (((INT16)sample - 128) << 8)
#define fromStereoToMono(left, right) ((left + right) >> 1)
#define PAGE_SIZE 0x1000
#define Monaural 1
#define Stereo 2
#define SixteenBits 16
#define EightBits 8
#define MinPlaybackSpeed 5000
#define MaxPlaybackSpeed 50000
#define Hz48000 48000
#define Hz44100 44100
#define Hz22050 22050
#define Hz11025 11025
#define Hz08000 8000
#define TX_ReqNo 18
#define RX_ReqNo 19
#define TSR_CMDAMT 0x80000000
#define TSR_CMDDMT 0x40000000
#define RSR_STARY 0x00400000
#define RSR_STDRY 0x00200000
// Function Prototypes
MMRESULT private_WaveGetDevCaps(WAPI_INOUT apidir, PVOID pCaps, UINT wSize);
void PrintBuffer(short* pbuf);
VOID FreeAllocatedVirtualMemory( PUCHAR pVirtualAddr );
PUCHAR GetVirtualAddressOfUncachedMemory( PVOID base, ULONG sz, char* cID );
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -