void AudioOutput::setMuted( bool m ) { tDebug() << Q_FUNC_INFO; m_muted = m; if ( m_muted ) { libvlc_audio_set_volume( m_vlcPlayer, 0 ); } else { libvlc_audio_set_volume( m_vlcPlayer, m_volume * 100.0 ); } }
void MainWindow::OnVolumeClicked(wxMouseEvent& event) { wxSize size = mainWindow->volume_slider->GetSize(); float position = (float) event.GetX() / (float) size.GetWidth(); mainWindow->volume_slider->SetValue(position*VOLUME_MAX); libvlc_audio_set_volume(mainWindow->media_player, position*VOLUME_MAX); event.Skip(); }
void VlcMediaWidget::setVolume(int volume) { // 0 <= volume <= 200 if (libvlc_audio_set_volume(vlcMediaPlayer, volume) != 0) { Log("VlcMediaWidget::setVolume: cannot set volume") << volume; } }
int VLCMainwindow::changeVolume(int vol) { //Called if you change the volume slider if(vlcPlayer) return libvlc_audio_set_volume (vlcPlayer,vol); return 0; }
int Mwindow::changeVolume(int vol) { /* Called on volume slider change */ if (vlcPlayer) return libvlc_audio_set_volume (vlcPlayer,vol); return 0; }
void VideoSource::Render(const Vect2 &pos, const Vect2 &size) { if (!hasSetVolume) { hasSetVolume |= libvlc_audio_set_volume(mediaPlayer, config->volume) == 0; } EnterCriticalSection(&textureLock); if (previousRenderSize != size) { mediaOffset.x = (float)mediaWidthOffset; mediaOffset.y = (float)mediaHeightOffset; mediaSize.x = (float)mediaWidth; mediaSize.y = (float)mediaHeight; mediaSize += mediaOffset; Vect2 scale = size / videoSize; mediaOffset *= scale; mediaSize *= scale; previousRenderSize.x = size.x; previousRenderSize.y = size.y; } if (texture && isRendering) { DrawSprite(texture, 0xFFFFFFFF, pos.x + mediaOffset.x, pos.y + mediaOffset.y, pos.x + mediaSize.x, pos.y + mediaSize.y); } LeaveCriticalSection(&textureLock); }
void Player::changeVolume(int newVolume) { //libvlc_exception_clear(&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. libvlc_audio_set_volume (_mp,newVolume); //libvlc_audio_set_volume (_vlcinstance,newVolume , &_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. //raise(&_vlcexcep); // [20101215 JG] Used for versions prior to VLC 1.2.0. }
void SMActionVideoVLC::setVolume(qreal v) { if (v > 1.0) v = 1.0; if (v < 0.0) v = 0.0; _volume = v; libvlc_audio_set_volume(_mp, _volume*100); }
void Audio::setPlayerVolume(libvlc_media_player_t * const player) { if(vlcInstance==NULL) return; libvlc_audio_set_volume(player,volume); libvlc_audio_set_mute(player,0); }
void VideoSource::changeVolume(int newVolume) { // libvlc_exception_clear(&_vlcexcep); // libvlc_audio_set_volume (_vlcinstance,newVolume , &_vlcexcep); // libvlc_audio_set_volume (_vlcinstance,newVolume); libvlc_audio_set_volume(_mp, newVolume); // raise(&_vlcexcep); }
jint Java_org_videolan_libvlc_LibVLC_setVolume(JNIEnv *env, jobject thiz, jint volume) { libvlc_media_player_t *mp = getMediaPlayer(env, thiz); if (mp) //Returns 0 if the volume was set, -1 if it was out of range or error return (jint) libvlc_audio_set_volume(mp, (int) volume); return -1; }
void xmr_player_set_volume(XmrPlayer *player, float volume) { g_return_if_fail(player != NULL); g_return_if_fail(volume >= 0.0 && volume <= 1.0); libvlc_audio_set_volume(player->priv->player, volume * 100); }
void AudioOutput::setVolume(qreal volume) { if (vlc_instance) { libvlc_audio_set_volume(vlc_instance, (int)(f_volume * 100), vlc_exception); vlcExceptionRaised(); f_volume = volume; emit volumeChanged(f_volume); } }
void VlcAudio::setVolume(int volume) { if (_vlcMediaPlayer) { // Don't change if volume is the same if (volume != VlcAudio::volume()) { libvlc_audio_set_volume(_vlcMediaPlayer, volume); VlcError::showErrmsg(); } } }
bool media_set_audio_volume(uint8_t volume) { if(mediaplay != NULL) { int_fast8_t res = libvlc_audio_set_volume(mediaplay,volume); return res == 0 ? true : false; } return false; }
void Audio::addPlayer(libvlc_media_player_t * const player) { if(vlcInstance==NULL) return; if(playerList.contains(player)) return; playerList << player; libvlc_audio_set_volume(player,volume); libvlc_audio_set_mute(player,0); }
STDMETHODIMP VLCAudio::put_volume(long volume) { libvlc_media_player_t *p_md; HRESULT hr = getMD(&p_md); if( SUCCEEDED(hr) ) { libvlc_audio_set_volume(p_md, volume); } return hr; };
RuntimeNPObject::InvokeResult LibvlcAudioNPObject::setProperty(int index, const NPVariant &value) { /* is plugin still running */ if( isPluginRunning() ) { VlcPlugin* p_plugin = getPrivate<VlcPlugin>(); libvlc_exception_t ex; libvlc_exception_init(&ex); switch( index ) { case ID_audio_mute: if( NPVARIANT_IS_BOOLEAN(value) ) { libvlc_audio_set_mute(p_plugin->getVLC(), NPVARIANT_TO_BOOLEAN(value), &ex); RETURN_ON_EXCEPTION(this,ex); return INVOKERESULT_NO_ERROR; } return INVOKERESULT_INVALID_VALUE; case ID_audio_volume: if( isNumberValue(value) ) { libvlc_audio_set_volume(p_plugin->getVLC(), numberValue(value), &ex); RETURN_ON_EXCEPTION(this,ex); return INVOKERESULT_NO_ERROR; } return INVOKERESULT_INVALID_VALUE; case ID_audio_track: if( isNumberValue(value) ) { libvlc_media_player_t *p_md = p_plugin->getMD(&ex); RETURN_ON_EXCEPTION(this,ex); libvlc_audio_set_track(p_md, numberValue(value), &ex); RETURN_ON_EXCEPTION(this,ex); return INVOKERESULT_NO_ERROR; } return INVOKERESULT_INVALID_VALUE; case ID_audio_channel: if( isNumberValue(value) ) { libvlc_audio_set_channel(p_plugin->getVLC(), numberValue(value), &ex); RETURN_ON_EXCEPTION(this,ex); return INVOKERESULT_NO_ERROR; } return INVOKERESULT_INVALID_VALUE; default: ; } } return INVOKERESULT_GENERIC_ERROR; }
void AudioOutput::setVolume( qreal vol ) { tDebug() << Q_FUNC_INFO; m_volume = vol; if ( !m_muted ) { libvlc_audio_set_volume( m_vlcPlayer, m_volume * 100.0 ); } }
/* Returns 0 if the volume was set, -1 if it was out of range or error */ jint Java_org_videolan_libvlc_MediaPlayer_setVolume(JNIEnv *env, jobject thiz, jint volume) { vlcjni_object *p_obj = VLCJniObject_getInstance(env, thiz); if (!p_obj) return -1; return (jint) libvlc_audio_set_volume(p_obj->u.p_mp, (int) volume); }
void CPlayer::volumeDown() { LOG4CPLUS_TRACE_METHOD(msLogger, __PRETTY_FUNCTION__); if (hasPlayerInstance && mVolume > VOLUME_MIN) { mVolume = mVolume - VOLUME_STEP; mMutex->lockWrite(); libvlc_audio_set_volume(mMediaPlayer, mVolume); mMutex->unlockWrite(); } }
void CAVPlayer::Volume(int iVol) { if (iVol < 0) { return; } if (m_pVLC_Player) { libvlc_audio_set_volume(m_pVLC_Player,int(iVol * 2.5)); // 如果放到100,感觉比迅雷的100少了30,所以这里用1.3倍音量 } }
void VLCVideoWrapper::setAudioVolume(Real32 volume) { /*! \warning This is a hack, because vlc does not currently * provide the symbols AOUT_VOLUME_MAX, and AOUT_VOLUME_MIN in their user * SDK. */ const int VLC_MAX_AUDIO(200); const int VLC_MIN_AUDIO(0); int VLCVolume((volume * (VLC_MAX_AUDIO - VLC_MIN_AUDIO - 1)) +VLC_MIN_AUDIO); libvlc_audio_set_volume(_MediaPlayer, VLCVolume); checkVLCError("setting audio volume"); }
void Audio::setVolume(const int &volume) { if(vlcInstance==NULL) return; qDebug() << "Audio volume set to: " << volume; int index=0; while(index<playerList.size()) { libvlc_audio_set_volume(playerList.at(index),volume); libvlc_audio_set_mute(playerList.at(index),0); index++; } this->volume=volume; }
static void _volume_set(struct _App *app) { float volume; int vol; if (!app->mp) return; _em_read_safe(app->em_read, &volume, sizeof(volume)); vol = volume * 100; libvlc_audio_set_volume(app->mp, vol); }
static void clutter_vlc_set_audio_volume(ClutterVlcVideoTexture* video_texture, gdouble volume) { ClutterVlcVideoTexturePrivate* priv; priv = video_texture->priv; if (priv->vlc_instance == NULL) return; libvlc_audio_set_volume(priv->vlc_instance, (int)(volume * 200.0), &priv->vlc_exception); clutter_vlc_catch(&priv->vlc_exception); g_object_notify (G_OBJECT (video_texture), "audio-volume"); }
void VLCWrapperImpl::SetVolume( int volume ) { libvlc_audio_set_volume(pMediaPlayer_, volume); }
void VideoWidget::play() { libvlc_media_player_play(mp); libvlc_audio_set_volume(mp,100); }
void VPlayer::setVolume(int _volume) { if(mp){ libvlc_audio_set_volume(mp,_volume); } }
void VLCWrapper::setVolume (int vol) { libvlc_audio_set_volume (Player_.get (), vol); }