Beispiel #1
0
STDMETHODIMP CVolumeNotification::OnNotify(PAUDIO_VOLUME_NOTIFICATION_DATA NotificationData)
{
	int volumeValue = (int)round(NotificationData->fMasterVolume*100);

	//if(_currVolume < 0)
	//{
	//	_currVolume = volumeValue;
	//	_mute = NotificationData->bMuted;
	//	emit volumeChanged(volumeValue);
	//	emit volumeMuted(NotificationData->bMuted);
	//	return S_OK;
	//}

	//
	//if(abs(_currVolume - volumeValue) >= 1)
	//{
	//	emit volumeChanged(volumeValue);
	//}
	//if(_mute != NotificationData->bMuted)
	//{
	//	emit volumeMuted(NotificationData->bMuted);
	//}

	_currVolume = volumeValue;
	_mute = NotificationData->bMuted;


	//if(!InlineIsEqualGUID(NotificationData->guidEventContext, GUID_NULL))
	{
		emit volumeChanged(_currVolume);
		emit volumeMuted(_mute);
	}

	return S_OK;
}
Beispiel #2
0
void MidiDecoder::setMuted(bool mute)
{
    d->muted = mute;

    if (d->initialized)
        mid_song_set_volume(d->song, mute ? 0 : d->volume * 2);

    emit volumeMuted(d->muted);
}
void PlaybinSession::setMuted(bool mute)
{
    if (d->playbin != 0)
    {
        d->muted = mute;

        g_object_set(G_OBJECT(d->playbin), "volume", mute ? 0 : d->volume, NULL);

        emit volumeMuted(mute);
    }
}
Beispiel #4
0
void WavDecoder::setMuted(bool mute)
{
    d->outputInfo.volume = mute ? 0 : d->volume;

    emit volumeMuted(d->muted = mute);
}