int CSoundMgr::SetMusicVolume (int iVolumeLevel) // SetMusicVolume // // Sets the current music volume { m_iMusicVolume = iVolumeLevel; MCIWndSetVolume(m_hMusic, MUSIC_LEVEL_FACTOR * iVolumeLevel); return m_iMusicVolume; }
void MCIOBJ::work(void) { // InvalidateRect(displayWnd,NULL,FALSE); if (GLOBAL.fly) return; if (!m_video) return; if (MCIWndGetPosition(m_video)==MCIWndGetLength(m_video)) playing=FALSE; if ((play!=INVALID_VALUE) && (m_video) && (!playing)) { if ((!play_once)||(resetted)) { MCIWndPlay(m_video); playing = TRUE; } resetted=FALSE; } if (play==INVALID_VALUE) { resetted=TRUE; if ((m_video) && (playing)) { MCIWndStop(m_video); playing=FALSE; } } acttime=TIMING.acttime-prevtime; if (((float)acttime/(float)TIMING.pcfreq*1000)>(float)upd_speed) { prevtime=TIMING.acttime; if (actspeed!=speed) { actspeed=speed; MCIWndSetSpeed(m_video, speed); } if (actvolume!=volume) { actvolume=volume; MCIWndSetVolume(m_video, volume); } if (step) { MCIWndStep(m_video,step); step=0;} if (pos_change) {MCIWndSeek(m_video,pos_center+pos_change); pos_change=0;} if (MCIWndGetPosition(m_video)==MCIWndGetLength(m_video)) { //MCIWndPlay(m_video); MCIWndSeek(m_video,1); } } }