rsked/vlcplayer.cc
/// Sets the vlc internal volume level to m_volume (%).
/// This should be done once after starting the child process.
/// Does nothing if the vlc child is not running.
///
/// * May throw a Player_exception or CM_exception.
///
Sets the vlc internal volume level to m_volume (%).
This should be done once after starting the child process.
Does nothing if the vlc child is not running.


Sets the vlc internal volume level to m_volume ( % ) . This should be done once after starting the child process . Does nothing if the vlc child is not running .
void Vlc_player::set_volume()
{
    if (not m_cm->running()) {
        LOG_WARNING(Lgr) << m_name << " set volume cmd skipped: not running.";
        return;
    }
    unsigned vol = (m_volume * VlcMaxVol / 100);
    std::string svol { std::to_string( vol ) };
    std::string set_vol_cmd { "volume " };
    set_vol_cmd += svol;
    set_vol_cmd += '\n';
    LOG_DEBUG(Lgr) << m_name << " set vlc volume to " << svol;
    do_command( set_vol_cmd, true );
}
void Vlc_player :: set_volume ( ) { if ( not m_cm -> running ( ) ) { LOG_WARNING ( Lgr ) << m_name << " " ; return ; } unsigned vol = ( m_volume * VlcMaxVol / 100 ) ; std :: string svol { std :: to_string ( vol ) } ; std :: string set_vol_cmd { " " } ; set_vol_cmd += svol ; set_vol_cmd += ' \n ' ; LOG_DEBUG ( Lgr ) << m_name << " " << svol ; do_command ( set_vol_cmd , true ) ; }
Sets the vlc internal volume level to m_volume (%).
Sets the vlc internal volume level to m_volume ( % ) .