diff options
author | Jonathan Marshall <jmarshall@never.you.mind> | 2012-04-28 11:57:42 +1200 |
---|---|---|
committer | Jonathan Marshall <jmarshall@never.you.mind> | 2012-05-10 09:40:49 +1200 |
commit | 217694d306bce16269923dc634438f9a56d063b5 (patch) | |
tree | ea4819d05c9715f64786510ac5efedb0836070ff | |
parent | 9311cdbb768b18715d6d7030252d1888f9c46a04 (diff) |
[AE] players: change SetVolume to take a float
-rw-r--r-- | xbmc/cores/DummyVideoPlayer.h | 2 | ||||
-rw-r--r-- | xbmc/cores/ExternalPlayer/ExternalPlayer.h | 2 | ||||
-rw-r--r-- | xbmc/cores/IPlayer.h | 2 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDAudio.cpp | 4 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDAudio.h | 2 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDPlayer.h | 2 | ||||
-rw-r--r-- | xbmc/cores/dvdplayer/DVDPlayerAudio.h | 2 | ||||
-rw-r--r-- | xbmc/cores/paplayer/PAPlayer.cpp | 5 | ||||
-rw-r--r-- | xbmc/cores/paplayer/PAPlayer.h | 2 |
9 files changed, 11 insertions, 12 deletions
diff --git a/xbmc/cores/DummyVideoPlayer.h b/xbmc/cores/DummyVideoPlayer.h index 21708d59f8..82dd244b8d 100644 --- a/xbmc/cores/DummyVideoPlayer.h +++ b/xbmc/cores/DummyVideoPlayer.h @@ -45,7 +45,7 @@ public: virtual void Seek(bool bPlus, bool bLargeStep); virtual void SeekPercentage(float iPercent); virtual float GetPercentage(); - virtual void SetVolume(long nVolume) {} + virtual void SetVolume(float volume) {} virtual void SetDynamicRangeCompression(long drc) {} virtual void SetContrast(bool bPlus) {} virtual void SetBrightness(bool bPlus) {} diff --git a/xbmc/cores/ExternalPlayer/ExternalPlayer.h b/xbmc/cores/ExternalPlayer/ExternalPlayer.h index 5323947aa6..fc38b9a84b 100644 --- a/xbmc/cores/ExternalPlayer/ExternalPlayer.h +++ b/xbmc/cores/ExternalPlayer/ExternalPlayer.h @@ -50,7 +50,7 @@ public: virtual void Seek(bool bPlus, bool bLargeStep); virtual void SeekPercentage(float iPercent); virtual float GetPercentage(); - virtual void SetVolume(long nVolume) {} + virtual void SetVolume(float volume) {} virtual void SetDynamicRangeCompression(long drc) {} virtual void SetContrast(bool bPlus) {} virtual void SetBrightness(bool bPlus) {} diff --git a/xbmc/cores/IPlayer.h b/xbmc/cores/IPlayer.h index 60bf69abfb..719e5e4634 100644 --- a/xbmc/cores/IPlayer.h +++ b/xbmc/cores/IPlayer.h @@ -91,7 +91,7 @@ public: virtual void SeekPercentage(float fPercent = 0){} virtual float GetPercentage(){ return 0;} virtual float GetCachePercentage(){ return 0;} - virtual void SetVolume(long nVolume){} + virtual void SetVolume(float volume){} virtual void SetDynamicRangeCompression(long drc){} virtual void GetAudioInfo( CStdString& strAudioInfo) = 0; virtual void GetVideoInfo( CStdString& strVideoInfo) = 0; diff --git a/xbmc/cores/dvdplayer/DVDAudio.cpp b/xbmc/cores/dvdplayer/DVDAudio.cpp index 88d8244187..65068a5a53 100644 --- a/xbmc/cores/dvdplayer/DVDAudio.cpp +++ b/xbmc/cores/dvdplayer/DVDAudio.cpp @@ -306,10 +306,10 @@ void CDVDAudio::Drain() m_pAudioDecoder->WaitCompletion(); } -void CDVDAudio::SetVolume(int iVolume) +void CDVDAudio::SetVolume(float volume) { CSingleLock lock (m_critSection); - if (m_pAudioDecoder) m_pAudioDecoder->SetCurrentVolume(iVolume); + if (m_pAudioDecoder) m_pAudioDecoder->SetCurrentVolume(volume); } void CDVDAudio::SetDynamicRangeCompression(long drc) diff --git a/xbmc/cores/dvdplayer/DVDAudio.h b/xbmc/cores/dvdplayer/DVDAudio.h index 1f1393d72b..d03b4ab780 100644 --- a/xbmc/cores/dvdplayer/DVDAudio.h +++ b/xbmc/cores/dvdplayer/DVDAudio.h @@ -57,7 +57,7 @@ public: void RegisterAudioCallback(IAudioCallback* pCallback); void UnRegisterAudioCallback(); - void SetVolume(int iVolume); + void SetVolume(float fVolume); void SetDynamicRangeCompression(long drc); float GetCurrentAttenuation(); void Pause(); diff --git a/xbmc/cores/dvdplayer/DVDPlayer.h b/xbmc/cores/dvdplayer/DVDPlayer.h index 1299d23817..da04bd7d74 100644 --- a/xbmc/cores/dvdplayer/DVDPlayer.h +++ b/xbmc/cores/dvdplayer/DVDPlayer.h @@ -184,7 +184,7 @@ public: virtual float GetPercentage(); virtual float GetCachePercentage(); - virtual void SetVolume(long nVolume) { m_dvdPlayerAudio.SetVolume(nVolume); } + virtual void SetVolume(float nVolume) { m_dvdPlayerAudio.SetVolume(nVolume); } virtual void SetDynamicRangeCompression(long drc) { m_dvdPlayerAudio.SetDynamicRangeCompression(drc); } virtual void GetAudioInfo(CStdString& strAudioInfo); virtual void GetVideoInfo(CStdString& strVideoInfo); diff --git a/xbmc/cores/dvdplayer/DVDPlayerAudio.h b/xbmc/cores/dvdplayer/DVDPlayerAudio.h index 711d038ca5..ea1b59a439 100644 --- a/xbmc/cores/dvdplayer/DVDPlayerAudio.h +++ b/xbmc/cores/dvdplayer/DVDPlayerAudio.h @@ -115,7 +115,7 @@ public: //! codec changes, in which case we may want to switch passthrough on/off. bool SwitchCodecIfNeeded(); - void SetVolume(long nVolume) { m_dvdAudio.SetVolume(nVolume); } + void SetVolume(float fVolume) { m_dvdAudio.SetVolume(fVolume); } void SetDynamicRangeCompression(long drc) { m_dvdAudio.SetDynamicRangeCompression(drc); } float GetCurrentAttenuation() { return m_dvdAudio.GetCurrentAttenuation(); } diff --git a/xbmc/cores/paplayer/PAPlayer.cpp b/xbmc/cores/paplayer/PAPlayer.cpp index 02050972d4..cc5744286b 100644 --- a/xbmc/cores/paplayer/PAPlayer.cpp +++ b/xbmc/cores/paplayer/PAPlayer.cpp @@ -443,10 +443,9 @@ void PAPlayer::Pause() } } -void PAPlayer::SetVolume(long nVolume) +void PAPlayer::SetVolume(float volume) { - if (m_pAudioDecoder[m_currentStream]) - m_pAudioDecoder[m_currentStream]->SetCurrentVolume(nVolume); + } void PAPlayer::SetDynamicRangeCompression(long drc) diff --git a/xbmc/cores/paplayer/PAPlayer.h b/xbmc/cores/paplayer/PAPlayer.h index 75ad1046ce..9014f847ae 100644 --- a/xbmc/cores/paplayer/PAPlayer.h +++ b/xbmc/cores/paplayer/PAPlayer.h @@ -69,7 +69,7 @@ public: virtual void Seek(bool bPlus = true, bool bLargeStep = false); virtual void SeekPercentage(float fPercent = 0.0f); virtual float GetPercentage(); - virtual void SetVolume(long nVolume); + virtual void SetVolume(float volume); virtual void SetDynamicRangeCompression(long drc); virtual void GetAudioInfo( CStdString& strAudioInfo) {} virtual void GetVideoInfo( CStdString& strVideoInfo) {} |