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

📄 main.h

📁 C-Media8738/8768声卡驱动开发源码
💻 H
字号:
/*
Copyright (c) 2006-2007 dogbert <dogber1@gmail.com>
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. The name of the author may not be used to endorse or promote products
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef _MAIN_H_
#define _MAIN_H_

#include <math.h>

#include <windows.h>
#include <devioctl.h>
#include <commctrl.h>
#include <setupapi.h>
#include <shellapi.h>
#include <cpl.h>

#include <ks.h>
#include <ksmedia.h>
#include <mmsystem.h>
#include <mmreg.h>

#define INITGUID
#define DIRECTSOUND_VERSION 0x800
#include <dsound.h>

#include "resource.h"
#include "property.h"

#define SAMPLE_RATE 44100

#define BASS_FREQUENCY 90
#define BASS_AMPLITUDE 0.5

#define SPEAKER_FREQUENCY 440
#define SPEAKER_AMPLITUDE 0.5

#define MAX_TOKEN_SIZE 128

typedef struct _CMIDEV  {
	HDEVINFO                          Info;
	SP_DEVINFO_DATA                   InfoData;
	PSP_DEVICE_INTERFACE_DETAIL_DATA  InterfaceDetailData;

} CMIDEV;

static LRESULT CALLBACK MainDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
static LRESULT CALLBACK TabDlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);

HINSTANCE hInst;
HWND      hWndMain;
HWND      hWndTab;
HWND      hWndChild[NUM_TABS];
LRESULT   currentTab;
CMIDEV    cmiTopologyDev;
CMIDATA   cmiData;
HWAVEOUT  hWave;
WAVEHDR   pwh;
int       currentChannelCount;
HFONT     hURLFont;

#endif //_MAIN_H_

⌨️ 快捷键说明

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