void CDmeTrack::FindClipsWithinTime( DmeTime_t startTime, DmeTime_t endTime, DmeClipSkipFlag_t flags, CUtlVector< CDmeClip * >& clips ) const { if ( ( flags & DMESKIP_INVISIBLE ) && IsCollapsed() ) return; if ( ( flags & DMESKIP_MUTED ) && IsMute() ) return; int nClipCount = GetClipCount(); for ( int j = 0; j < nClipCount; ++j ) { CDmeClip *pSubClip = GetClip( j ); if ( !pSubClip ) continue; if ( ( flags & DMESKIP_MUTED ) && pSubClip->IsMute() ) continue; DmeTime_t clipStart = pSubClip->GetStartTime(); DmeTime_t clipEnd = pSubClip->GetEndTime(); if ( clipStart >= startTime && clipEnd <= endTime ) { clips.AddToTail( pSubClip ); } } }
void cDvbDevice::SetDigitalAudioDevice(bool On) { if (digitalAudio != On) { if (digitalAudio) cCondWait::SleepMs(1000); // Wait until any leftover digital data has been flushed digitalAudio = On; SetVolumeDevice(On || IsMute() ? 0 : CurrentVolume()); } }
/* * m_quit - client message handler * * parv[0] = sender prefix * parv[parc - 1] = comment */ int m_quit(struct Client* cptr, struct Client* sptr, int parc, char* parv[]) { assert(0 != cptr); assert(0 != sptr); assert(cptr == sptr); if (cli_user(sptr)) { struct Membership* chan; for (chan = cli_user(sptr)->channel; chan; chan = chan->next_channel) { if (!IsZombie(chan) && !IsDelayedJoin(chan) && !member_can_send_to_channel(chan, 0)) return exit_client(cptr, sptr, sptr, "Signed off"); } } if (parc > 1 && !BadPtr(parv[parc - 1]) && !IsMute(sptr)) return exit_client_msg(cptr, sptr, sptr, "Quit: %s", parv[parc - 1]); else return exit_client(cptr, sptr, sptr, "Quit"); }
//----------------------------------------------------------------------------- // Find clips at, intersecting or within a particular time interval //----------------------------------------------------------------------------- void CDmeTrack::FindClipsAtTime( DmeTime_t time, DmeClipSkipFlag_t flags, CUtlVector< CDmeClip * >& clips ) const { if ( ( flags & DMESKIP_INVISIBLE ) && IsCollapsed() ) return; if ( ( flags & DMESKIP_MUTED ) && IsMute() ) return; int nClipCount = GetClipCount(); for ( int j = 0; j < nClipCount; ++j ) { CDmeClip *pSubClip = GetClip( j ); if ( !pSubClip ) continue; if ( ( flags & DMESKIP_MUTED ) && pSubClip->IsMute() ) continue; if ( time.IsInRange( pSubClip->GetStartTime(), pSubClip->GetEndTime() ) ) { clips.AddToTail( pSubClip ); } } }