Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/orxonox/branches/sound/src/sound_test.cc @ 3412

Last change on this file since 3412 was 3179, checked in by bensch, 20 years ago

orxonox/branches/sound: added files to source again, made it compile for widnows again.
Simon, if you arrive at a point where it is doing something usefull, we inject it into the trunk.

File size: 950 bytes
Line 
1/*
2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   ### File Specific:
12   main-programmer: Simon Hofmann
13   co-programmer:
14*/
15
16#include "sound_test.h"
17
18using namespace std;
19
20SoundControl* sound = NULL;
21int counter = 0;
22int through = 0;
23
24SoundTest::SoundTest() {
25  sound = SoundControl::getInstance();
26}
27
28
29SoundTest::~SoundTest() {
30  sound->deleteInstance();
31}
32
33
34int main(int argc, char *argv[]) {
35  SoundTest();
36  SDL_Surface *screen;
37  SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO); 
38  screen = SDL_SetVideoMode(320, 240, 0, 0);
39  sound->playOgg("music.ogg");
40  while(!through) {
41    SDL_Delay(100);
42    if(counter >= 1000) {
43        through = 1;
44    }
45    counter++;
46  }
47  SDL_Quit();
48}
Note: See TracBrowser for help on using the repository browser.