summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Ngo <nlminhtl@gmail.com>2013-07-13 10:34:42 +0300
committerMinh Ngo <nlminhtl@gmail.com>2013-07-13 10:34:42 +0300
commite963770ca687b9761b8bc803cb13e57e2afc3085 (patch)
treecb9f8d43b5ecb669bbf65c1184361c706a683ad6
parent8f83e797f65b1b4a38f3866c43d59bfecdd7746b (diff)
Fixing volume changing ability
Change-Id: Ie6b175fd039a868a57afdfe7bd05a2de69c39a7c
-rw-r--r--avmedia/source/vlc/vlcplayer.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/avmedia/source/vlc/vlcplayer.cxx b/avmedia/source/vlc/vlcplayer.cxx
index 0a15a72ccfdd..d94206c3fabe 100644
--- a/avmedia/source/vlc/vlcplayer.cxx
+++ b/avmedia/source/vlc/vlcplayer.cxx
@@ -96,13 +96,13 @@ void SAL_CALL VLCPlayer::setPlaybackLoop( ::sal_Bool bSet )
void SAL_CALL VLCPlayer::setVolumeDB( ::sal_Int16 nDB )
{
::osl::MutexGuard aGuard(m_aMutex);
- libvlc_audio_set_volume( mPlayer.get(), nDB );
+ libvlc_audio_set_volume( mPlayer.get(), static_cast<sal_Int16>( ( nDB + 40 ) * 10.0 / 4 ) );
}
::sal_Int16 SAL_CALL VLCPlayer::getVolumeDB()
{
::osl::MutexGuard aGuard(m_aMutex);
- return libvlc_audio_get_volume( mPlayer.get() );
+ return static_cast<sal_Int16>( libvlc_audio_get_volume( mPlayer.get() ) / 10.0 * 4 - 40 );
}
void SAL_CALL VLCPlayer::setMute( ::sal_Bool bSet )
@@ -168,7 +168,7 @@ uno::Reference< css::media::XPlayerWindow > SAL_CALL VLCPlayer::createPlayerWind
uno::Reference< css::media::XFrameGrabber > SAL_CALL VLCPlayer::createFrameGrabber()
{
::osl::MutexGuard aGuard(m_aMutex);
- return uno::Reference< css::media::XFrameGrabber >(new VLCFrameGrabber());
+ return uno::Reference< css::media::XFrameGrabber >( new VLCFrameGrabber() );
}
::rtl::OUString SAL_CALL VLCPlayer::getImplementationName()