最近需要添加声音播放功能,最后选择用fmod,据说用它开发简单。打开fmod下载官网:
http://www.fmod.org/download/
FMOD Studio Programmer’s API and Low Level Programmer API的Windows
注册下载,需要什么验证码,需要翻墙或者发邮件,果断翻墙,下载安装,打开API文件夹,有三个,用lowlevel,资源里有上传。把里面的inc 和 lib两个文件加拷贝到工程里,将动态库fmod64.dll放在工程所在的文件夹。
// fmodExcise.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include "inc/fmod.hpp"
#include <stdio.h>
using namespace FMOD;
#pragma comment(lib,"fmod64_vc.lib")
#pragma warning(disable:4996)
int _tmain(int argc, _TCHAR* argv[])
{
System* sys = NULL;
Sound* snd1 = NULL;
Sound* snd2 = NULL;
//Channel* ch