vumonitor/vumonitor.cc
/// Update shared memory.  This assumes that ONLY vumonitor will
/// update the shared memory and only ONE vumonitor is running.
///
Update shared memory.  This assumes that ONLY vumonitor will
update the shared memory and only ONE vumonitor is running.
Update shared memory . This assumes that ONLY vumonitor will update the shared memory and only ONE vumonitor is running .
void VU_monitor::update_status(VU_announce p)
{
    if (!m_shm_status) return;
    m_shm_status->m_quiet = p;
    m_shm_status->m_lvl = m_level;
    m_shm_status->m_ts = time(0);
    if (p == m_last_announce) return;
    switch(p) {
    case VU_TOO_QUIET:
        LOG_WARNING(Lgr)  << "TOO QUIET check #"  << m_checks
                          << "  max_samples=" << m_max_samples;
        break;
    case VU_DETECTED:
        LOG_INFO(Lgr) << "Audio output detected again";
        break;
    case VU_NA:
    default:
        LOG_INFO(Lgr) << "VU level unavailable--stay tuned.";
    }
    m_last_announce = p;
}
void VU_monitor :: update_status ( VU_announce p ) { if ( ! m_shm_status ) return ; m_shm_status -> m_quiet = p ; m_shm_status -> m_lvl = m_level ; m_shm_status -> m_ts = time ( 0 ) ; if ( p == m_last_announce ) return ; switch ( p ) { case VU_TOO_QUIET : LOG_WARNING ( Lgr ) << " " << m_checks << " " << m_max_samples ; break ; case VU_DETECTED : LOG_INFO ( Lgr ) << " " ; break ; case VU_NA : default : LOG_INFO ( Lgr ) << " " ; } m_last_announce = p ; }
Update shared memory.
Update shared memory .
// log a change to status