summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Ngo <nlminhtl@gmail.com>2013-07-13 10:34:42 +0300
committerMichael Meeks <michael.meeks@suse.com>2013-07-26 07:11:51 +0100
commit07b44f01531baf0e1ffd570179b237ec2bc1cc56 (patch)
treedb71eb3b6e8dc7c7e49ed9d9df49a4f25b96666e
parentefca12b5ca80c2398afbac72c6ade42bc58cc73a (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()