void Stream::Stop(HSTREAM cual) { if(!IsPlay(cual))//if no sound { Timer->stop(); BASS_ChannelStop(cual); BASS_StreamFree(cual); //free stream PuestaCero(); return; } Timer->stop(); if(FundirParar) { FaderOut(cual); } else { BASS_ChannelStop(cual); BASS_StreamFree(cual); //free stream } PuestaCero();//set all zero }
/** * This fuction ???? * @brief Stream::slot_Barra * @param pos * @return void */ void Stream::slot_Barra(int pos) { if(IsPlay(streamUltimo)|| IsPause(streamUltimo)) { double posx = BASS_ChannelSeconds2Bytes( streamUltimo, pos); BASS_ChannelSetPosition(streamUltimo, posx, BASS_POS_BYTE); return; } }
bool QSPCallBacks::SetVolume(QSPString file, int volume) { if (!IsPlay(file)) return false; QSPSounds::iterator elem = m_sounds.find(wxFileName(wxString(file.Str, file.End), wxPATH_DOS).GetFullPath().Upper()); QSPSound *snd = (QSPSound *)&elem->second; snd->Volume = volume; FMOD_Channel_SetVolume(snd->Channel, (float)(m_volumeCoeff * volume) / 100); return true; }
//=============================================== //サウンドの再生 //=============================================== //[input] // LoopCount:ループ回数 // LoopInSample:ループに入るポイント //[return] // なし //=============================================== void CSound::Play(int index, Uint32 LoopCount, Uint32 LoopInSample) { if(m_pSound[index].pAyame != NULL) { if(!IsPlay(index) ) { m_pSound[index].pAyame->Play(LoopCount, LoopInSample); } } }
void Stream::Pause(HSTREAM cual) { if(IsPlay(cual)) { BASS_ChannelPause(cual); Vumeter->setLeftValue(0); Vumeter->setRightValue(0); Timer->stop(); } }
float sqr_tools::CFrameScaleCtrlImp::GetUpdateFrame( void ) { if (IsPlay()) { if (MODEL) { int num = MODEL->GetAnimateMaxFrameNum(); if ( num == 0 ) return GetCurFrame(); else return ((CEditModel*)MODEL)->GetCurFrame(); } else return 0.0f; } else { return GetCurFrame(); } }
/** * This function load the song * @brief Stream::Load * @param url * @return void */ void Stream::Load(const QString url) { BASS_SetDevice(Dispositivo);//dispositivo IsPisador=false; // mem 33 /** * PAUSES */ if(IsPause(streamA)&& IsPause(streamB))//pause in both { BASS_ChannelPlay(streamA,false); BASS_ChannelPlay(streamB,false); Timer->start(Render); return; } if(IsPause(streamA))//stream A in pause { BASS_ChannelPlay(streamA,false);//make play Timer->start(Render); return; } if(IsPause(streamB))//stream B in pause { BASS_ChannelPlay(streamB,false); Timer->start(Render); return; } /** * PLAY */ if(IsPlay(streamA)&& IsPlay(streamB))//both playing { if(streamUltimo == streamA) // ESTAN LOS DOS CUAL ES EL ULTIMO PARA QUITAR EL OTRO { // TimerB->stop(); BASS_ChannelStop(streamB); BASS_StreamFree(streamB); //lo liberamos } else { // TimerA->stop(); BASS_ChannelStop(streamA); BASS_StreamFree(streamA); //lo liberamos } //a revisar******************* BASS_StreamFree(streamA); //lo liberamos BASS_StreamFree(streamB); //lo liberamos } if(IsPlay(streamA))//if stream A is play { Timer->stop(); streamB = StreamTipo(url); //############################ PlayB(); if(FundirSolapar)//checks if this options is enable { w_Fader->setStream(streamA); w_Fader->setFundir(Fundir); w_Fader->start(); } return; } if(IsPlay(streamB))//if stream B is play { Timer->stop(); streamA = StreamTipo(url); //####################################### PlayA(); if(FundirSolapar) { w_Fader->setStream(streamB); w_Fader->setFundir(Fundir); w_Fader->start(); } return; } streamA = StreamTipo(url); //############################################# PlayA(); }