Last change
on this file since 3243 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 | |
---|
18 | using namespace std; |
---|
19 | |
---|
20 | SoundControl* sound = NULL; |
---|
21 | int counter = 0; |
---|
22 | int through = 0; |
---|
23 | |
---|
24 | SoundTest::SoundTest() { |
---|
25 | sound = SoundControl::getInstance(); |
---|
26 | } |
---|
27 | |
---|
28 | |
---|
29 | SoundTest::~SoundTest() { |
---|
30 | sound->deleteInstance(); |
---|
31 | } |
---|
32 | |
---|
33 | |
---|
34 | int 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.