Changeset 2854 in orxonox.OLD for orxonox/branches/sound/src/sound_test.cc
- Timestamp:
- Nov 14, 2004, 4:44:31 PM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
orxonox/branches/sound/src/sound_test.cc
r2838 r2854 14 14 */ 15 15 16 17 16 #include "sound_test.h" 18 #include "SDL.h"19 #include "SDL_mixer.h"20 17 21 18 using namespace std; 22 19 23 SoundControl* test; 20 SoundControl* sound = NULL; 21 int counter = 0; 22 int through = 0; 24 23 25 SoundTest::SoundTest 26 test= SoundControl::getInstance();24 SoundTest::SoundTest() { 25 sound = SoundControl::getInstance(); 27 26 } 28 27 29 28 30 SoundTest::~SoundTest 31 29 SoundTest::~SoundTest() { 30 sound->deleteInstance(); 32 31 } 33 32 34 33 35 void main (void) { 34 int main(void) { 35 SoundTest(); 36 36 SDL_Surface *screen; 37 SDL_Init(SDL_INIT_VIDEO );37 SDL_Init(SDL_INIT_VIDEO|SDL_INIT_AUDIO); 38 38 screen = SDL_SetVideoMode(320, 240, 0, 0); 39 SoundControl* sound = new SoundControl; 40 sound.SoundControl(); 41 sound->playOgg(music.ogg); 42 sound.~SoundControl(); 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(); 43 48 }
Note: See TracChangeset
for help on using the changeset viewer.