|
??????1.4??Demo?3:????
???????????????????????,???????????????
/*!==========================================================================
*
* ??????(GaiMo Game Engine)
*
* ???? (C) 2009-2009 ??????????? ??????
* Copyright (C) ???????????. All Rights Reserved.
*
* ??????,??? http://www.gaimo.net
****************************************************************************/
#include <AudioDevice.hpp>
#include <conio.h>
#include <cmath>
#include <iostream>
/*!==========================================================================
*
* ??????(GaiMo Game Engine)
*
* ???? (C) 2009-2009 ??????????? ??????
* Copyright (C) ???????????. All Rights Reserved.
*
* ??????,??? http://www.gaimo.net
****************************************************************************/
#include <iostream>
#include <conio.h>
#include <AudioDevice.hpp>
char* mp3 = "..\\audio//DarinPeerless.mp3";
char* ogg = "..\\audio//GetOut.ogg";
short flag = 0;
int main()
{
std::cout<<"??????????!"<<std::endl;
//! ??????????????
core::AudioDevice *device = core::InitAudioDevice();
std::cout<<"??mp3??ogg(0 for MP3?1 for ogg)"<<std::endl;
std::cin >> flag;
std::cout << std::endl;
//! ??????
core::RefPtr<core::AudioSource> source = device->GetAudioSource();
//! ????????
if(flag == 0)
std::cout<<"play:"<<source-> lay(mp3,true)<<std::endl;
else
std::cout<<"play:"<<source->Play(ogg,true)<<std::endl;
while(getche() != 'q');
core::TerminateAudioDevice();
system("pause");
return EXIT_SUCCESS;
}
??:??????????????????API??
??????,???????
?????ccsdu2004@yahoo.com.cn |
|