Example #1
0
void KNMusicStandardBackend::setMute(bool mute)
{
    //Check the state is the same or not, if is the same, do nothing.
    if(m_mute==mute)
    {
        return;
    }
    //Save the new mute state.
    m_mute=mute;
    //Apply the mute state.
    if(m_mute)
    {
        //Backup the original volume.
        m_volumeBeforeMute=volume();
        //Set all the volume to the minimal thread.
        synchronizeThreadVolume(minimalVolume());
    }
    else
    {
        //Set the volume to the backup volume.
        synchronizeThreadVolume(m_volumeBeforeMute);
        //Clear up the backuped volume.
        m_volumeBeforeMute=-1;
    }
    //Emit changed signal.
    emit muteStateChanged(m_mute);
}
Example #2
0
void EnginePhonon::setMuted( bool mute )
{
    bool ismuted = m_audioOutput->isMuted();
    
    if(mute != ismuted) {
      m_audioOutput->setMuted( mute );
      emit muteStateChanged();
    }
}
Example #3
0
void KNMusicStandardBackend::setVolume(const int &volumeSize)
{
    if(m_mute)
    {
        m_mute=false;
        emit muteStateChanged(m_mute);
    }
    changeVolume(volumeSize);
}
Example #4
0
void KNMusicStandardBackend::setMute(const bool &mute)
{
    //Check the state is the same or not, if is the same, do nothing.
    if(m_mute==mute)
    {
        return;
    }
    //Set state.
    m_mute=mute;
    if(m_mute)
    {
        //Backup the original volume, mute it.
        m_volumeBeforeMute=volume();
        changeVolume(0);
    }
    else
    {
        //Set the volume to the backup volume.
        changeVolume(m_volumeBeforeMute);
    }
    //Emit changed signal.
    emit muteStateChanged(m_mute);

}