#include <CSMusic.h>
Public Member Functions | |
CSMusic (const CSMusic &Music) | |
virtual | ~CSMusic () |
virtual std::string | getType () |
void | play () |
void | pause () |
void | resume () |
void | stop () |
Static Public Attributes | |
const char * | CLASS = "CSMusic" |
|
Definition at line 62 of file CSMusic.cpp. References LOG_ENTER, LOG_EXIT, and mMusic.
|
|
Definition at line 70 of file CSMusic.cpp. References LOG_ENTER, LOG_EXIT, and stop().
|
Here is the call graph for this function:
|
Definition at line 65 of file CSMusic.h. References CLASS.
00065 {return (std::string) CLASS;} |
|
Definition at line 90 of file CSMusic.cpp. References LOG_ENTER, and LOG_EXIT.
00091 { 00092 static char *functionName="play"; 00093 LOG_ENTER 00094 // CSA TODO: Uncomment to play music! 00095 /* 00096 stop(); 00097 if (mMPEG) 00098 { 00099 SDL_AudioSpec audiofmt; 00100 Uint16 format; 00101 int freq, channels; 00102 00103 // Tell SMPEG what the audio format is 00104 Mix_QuerySpec(&freq, &format, &channels); 00105 audiofmt.format = format; 00106 audiofmt.freq = freq; 00107 audiofmt.channels = channels; 00108 SMPEG_actualSpec(mMPEG, &audiofmt); 00109 00110 // Hook in the MPEG music mixer 00111 Mix_HookMusic(SMPEG_playAudioSDL, mMPEG); 00112 SMPEG_enableaudio(mMPEG, 1); 00113 SMPEG_play(mMPEG); 00114 } 00115 else if (mMusic) 00116 { 00117 Mix_PlayMusic(mMusic, 0); 00118 } 00119 */ 00120 LOG_EXIT 00121 } |
|
Definition at line 148 of file CSMusic.cpp. References LOG_ENTER, and LOG_EXIT.
00149 { 00150 static char *functionName="pause"; 00151 LOG_ENTER 00152 int frequency; 00153 Uint16 format; 00154 int channels; 00155 int state = Mix_QuerySpec(&frequency, &format, &channels); 00156 if (state) 00157 { 00158 if (mMPEG) 00159 { 00160 /* Pause/Resume playback of an SMPEG object */ 00161 SMPEG_pause(mMPEG); 00162 } 00163 else if (mMusic) 00164 { 00165 Mix_PauseMusic(); 00166 } 00167 } 00168 LOG_EXIT 00169 } |
|
Definition at line 171 of file CSMusic.cpp. References LOG_ENTER, and LOG_EXIT.
00172 { 00173 static char *functionName="resume"; 00174 LOG_ENTER 00175 int frequency; 00176 Uint16 format; 00177 int channels; 00178 int state = Mix_QuerySpec(&frequency, &format, &channels); 00179 if (state) 00180 { 00181 if (mMPEG) 00182 { 00183 /* Pause/Resume playback of an SMPEG object */ 00184 SMPEG_pause(mMPEG); 00185 } 00186 else if (mMusic) 00187 { 00188 Mix_ResumeMusic(); 00189 } 00190 } 00191 LOG_EXIT 00192 } |
|
Definition at line 123 of file CSMusic.cpp. References LOG_ENTER, and LOG_EXIT. Referenced by ~CSMusic(), and CSWorld::~CSWorld().
00124 { 00125 static char *functionName="stop"; 00126 LOG_ENTER 00127 int frequency; 00128 Uint16 format; 00129 int channels; 00130 int state = Mix_QuerySpec(&frequency, &format, &channels); 00131 if (state) 00132 { 00133 if (mMPEG) 00134 { 00135 /* Stop the movie and unhook SMPEG from the mixer */ 00136 SMPEG_stop(mMPEG); 00137 Mix_HookMusic(NULL, NULL); 00138 SMPEG_enableaudio(mMPEG, 0); 00139 } 00140 else if (mMusic) 00141 { 00142 Mix_HaltMusic(); 00143 } 00144 } 00145 LOG_EXIT 00146 } |
|
Definition at line 14 of file CSMusic.cpp. Referenced by getType(). |