home *** CD-ROM | disk | FTP | other *** search
- #include "SoundCCmds.h"
-
- #include "Sound.h"
-
- #include "log.h"
-
- CCmdSoundRestart::CCmdSoundRestart():CCmd("sound.restart"){
- usageStr="sound.restart";
- infoStr="restarts the sound subsystem";
- }
-
- CCmdSoundRestart::~CCmdSoundRestart(){
- if(console!=NULL)
- console->unregisterCCmd(this);
- }
-
- bool CCmdSoundRestart::exec(int argc, char* argv[]){
-
- if(argc==0){
- console->print("restarting audio subsystem...\n");
- Sound::shutdown();
- return Sound::init();
- //Sound::reloadSamples();
- }else{
- console->print("usage: %s\n", usageStr);
- return false;
- }
- }
-