summaryrefslogtreecommitdiffstats
path: root/src/app/xineEngine.h
diff options
context:
space:
mode:
authormio <stigma@disroot.org>2024-09-07 08:56:14 +1000
committermio <stigma@disroot.org>2024-09-07 10:27:39 +1000
commitf464b0384ba3bc70e79523d079c4a1ec16ae7868 (patch)
treea0069361ec685f73b220cc9806d916b47f8845bc /src/app/xineEngine.h
parent11c0638baf9ae1623fec00107bb9d065d3ecb88b (diff)
downloadcodeine-fix/use-audio-level.tar.gz
codeine-fix/use-audio-level.zip
Use AUDIO_VOLUME param instead of AUDIO_AMP_LEVELfix/use-audio-level
AMP_LEVEL adjusts the amplification level of VOLUME, and since it's called "volume" in the UI, this is more appropriate. This also avoids the need to use logarithmic scaling when adjusting the volume from the UI, as VOLUME is linear. When compared with libxine versions older than 1.2.13, there is no notable difference in how the volume sounds when adjusted. From 1.2.13, the sound does scale a little differently as lower volumes are more audible now (such as 50% and lower). Signed-off-by: mio <stigma@disroot.org>
Diffstat (limited to 'src/app/xineEngine.h')
-rw-r--r--src/app/xineEngine.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/app/xineEngine.h b/src/app/xineEngine.h
index d152a96..318f7ff 100644
--- a/src/app/xineEngine.h
+++ b/src/app/xineEngine.h
@@ -39,7 +39,6 @@ namespace Codeine
enum PosTimeLength { Pos, Time, Length };
static VideoWindow *s_instance;
- static bool s_logarithmicVolume;
VideoWindow( const VideoWindow& ); //disable
VideoWindow &operator=( const VideoWindow& ); //disable
@@ -62,7 +61,7 @@ namespace Codeine
uint time() const { return posTimeLength( Time ); }
uint length() const { return posTimeLength( Length ); }
- uint volume() const;
+ int volume() const;
const Engine::Scope &scope();
Engine::State state() const;
@@ -121,7 +120,6 @@ namespace Codeine
private:
static void destSizeCallBack( void*, int, int, double, int*, int*, double* );
static void frameOutputCallBack( void*, int, int, double, int*, int*, int*, int*, double*, int*, int* );
- static int makeVolumeLogarithmic(int volume);
void initVideo();
void cleanUpVideo();