Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 3244 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
RevLine 
[2793]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
[2854]20SoundControl* sound = NULL;
21int counter = 0;
22int through = 0;
[2793]23
[2854]24SoundTest::SoundTest() {
25  sound = SoundControl::getInstance();
[2793]26}
27
28
[2854]29SoundTest::~SoundTest() {
30  sound->deleteInstance();
[2793]31}
32
33
[3179]34int main(int argc, char *argv[]) {
[2854]35  SoundTest();
[2793]36  SDL_Surface *screen;
[2854]37  SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO); 
[2793]38  screen = SDL_SetVideoMode(320, 240, 0, 0);
[2854]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();
[2793]48}
Note: See TracBrowser for help on using the repository browser.