home *** CD-ROM | disk | FTP | other *** search
/ Enter 2005 March / ENTER.ISO / files / fwp-0.0.6-win32-installer.exe / SoundCCmds.cpp < prev    next >
Encoding:
C/C++ Source or Header  |  2004-12-06  |  582 b   |  29 lines

  1. #include "SoundCCmds.h"
  2.  
  3. #include "Sound.h"
  4.  
  5. #include "log.h"
  6.  
  7. CCmdSoundRestart::CCmdSoundRestart():CCmd("sound.restart"){
  8.     usageStr="sound.restart";
  9.     infoStr="restarts the sound subsystem";
  10. }
  11.  
  12. CCmdSoundRestart::~CCmdSoundRestart(){
  13.     if(console!=NULL)
  14.         console->unregisterCCmd(this);
  15. }
  16.  
  17. bool CCmdSoundRestart::exec(int argc, char* argv[]){
  18.  
  19.     if(argc==0){
  20.         console->print("restarting audio subsystem...\n");
  21.         Sound::shutdown();
  22.         return Sound::init();
  23.         //Sound::reloadSamples();
  24.     }else{
  25.         console->print("usage: %s\n", usageStr);
  26.         return false;
  27.     }
  28. }
  29.