35 lines
513 B
C++
35 lines
513 B
C++
#include <fishbone/foundation.h>
|
|
|
|
int quit = 0;
|
|
|
|
#ifndef _WIN32
|
|
#include <signal.h>
|
|
|
|
static void cleanup(int sig){
|
|
quit = 1;
|
|
}
|
|
#endif
|
|
|
|
int main(){
|
|
fishbone::SoundDriver* drv;
|
|
fishbone::Sound* snd;
|
|
|
|
#ifndef _WIN32
|
|
signal(SIGINT, cleanup);
|
|
signal(SIGTERM, cleanup);
|
|
#endif
|
|
|
|
drv = new fishbone::SoundDriver();
|
|
|
|
snd = drv->mixer.open("shanghai.mp3");
|
|
snd->setLoop(true);
|
|
snd->position[0] = -1;
|
|
snd->position[1] = 0;
|
|
snd->position[2] = 0;
|
|
snd->is3d = true;
|
|
snd->resume();
|
|
|
|
while(!quit);
|
|
|
|
delete drv;
|
|
}
|