*
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
// LifeAudioPlayer.cpp : Defines the entry point for the console application.
|
||||
//
|
||||
|
||||
#include "stdafx.h"
|
||||
#include <SoundSystem.h>
|
||||
#include <ISound.h>
|
||||
#include <vfs/IFileSystem.h>
|
||||
#include <vfs/RootFolder.h>
|
||||
#include <vfs/fs_win/IFSContentProvider.h>
|
||||
#include <vfs/pak/IPakFileContentProvider.h>
|
||||
|
||||
#include <LString.h>
|
||||
|
||||
#include <vfs/WinFileStream.h>
|
||||
|
||||
int _tmain(int argc, _TCHAR* argv[])
|
||||
{
|
||||
ResourceManager::me()->SetCentralDirectory(STR("C:\\development\\Programming\\Projects\\Data\\"));
|
||||
|
||||
/*Core::IFile* txt = fileSystem->GetFile(STR("root/Data/TEST.txt"));
|
||||
|
||||
Core::IDataStreamPtr stm1 = txt->OpenRead();
|
||||
Core::IDataStreamPtr stm2 = txt->OpenRead();
|
||||
|
||||
stm1->Seek(1);
|
||||
stm2->Seek(1);
|
||||
|
||||
char c1;
|
||||
char c2;
|
||||
|
||||
stm1->Read(&c1, 1);
|
||||
stm2->Read(&c2, 1);
|
||||
|
||||
printf("Stm1: %c; Stm2:%c\n", c1, c2);
|
||||
|
||||
*/
|
||||
//fileSystem->CreateFolder(STR("root/Data/OLOLO12345"));
|
||||
fileSystem->NewFile(STR("root/Data/Sounds/ololo.wav"), 1024*1024*3);
|
||||
|
||||
//Test(fileSystem);
|
||||
|
||||
printf("File system ready!\n");
|
||||
|
||||
Sound::SoundSystem* sndSystem;
|
||||
sndSystem = new Sound::SoundSystem();
|
||||
if(sndSystem->Init(fileSystem) != 0)
|
||||
{
|
||||
printf("Error initializing sound system!");
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("Sound system ready!\n");
|
||||
|
||||
Sound::ISound* snd = sndSystem->getSound(STR("root/Data/Sounds/Wwise_Nor_Music.015.ogg"), Sound::SM_ENABLED);
|
||||
snd->Play();
|
||||
|
||||
//Sound::ISound* snd2 = sndSystem->getSound(STR("Wwise_Nor_Music.003.ogg"), Sound::SM_ENABLED);
|
||||
//snd2->Play();
|
||||
|
||||
while(true)
|
||||
{
|
||||
sndSystem->Update();
|
||||
}
|
||||
printf("Press Enter key to exit\n");
|
||||
getchar();
|
||||
|
||||
delete snd;
|
||||
delete sndSystem;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user