[vlc-commits] aout: remove old volume back-end
Rémi Denis-Courmont
git at videolan.org
Thu Jul 19 19:42:02 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 19 18:12:47 2012 +0300| [7af353d670c790ff1033afcaa210d23b9e025310] | committer: Rémi Denis-Courmont
aout: remove old volume back-end
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7af353d670c790ff1033afcaa210d23b9e025310
---
include/vlc_aout.h | 2 --
src/audio_output/aout_internal.h | 6 -----
src/audio_output/intf.c | 2 --
src/audio_output/output.c | 53 --------------------------------------
src/libvlccore.sym | 1 -
5 files changed, 64 deletions(-)
diff --git a/include/vlc_aout.h b/include/vlc_aout.h
index 3ed9a52..683f221 100644
--- a/include/vlc_aout.h
+++ b/include/vlc_aout.h
@@ -223,8 +223,6 @@ VLC_API void aout_FormatPrint(vlc_object_t *, const char *,
#define aout_FormatPrint(o, t, f) aout_FormatPrint(VLC_OBJECT(o), t, f)
VLC_API const char * aout_FormatPrintChannels( const audio_sample_format_t * ) VLC_USED;
-VLC_API void aout_VolumeSoftInit( audio_output_t * );
-
static inline void aout_TimeReport(audio_output_t *aout, mtime_t date)
{
aout->event.time_report(aout, date);
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 86775ed..abdec7d 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -98,12 +98,6 @@ typedef struct
filter_t *filters[AOUT_MAX_FILTERS];
int nb_filters;
- struct
- {
- float volume;
- bool mute;
- } soft; /* temporary - TODO: move to output plugins */
-
vlc_atomic_t restart;
} aout_owner_t;
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 8cfc4ed..9f0fef8 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -100,8 +100,6 @@ int aout_VolumeSet (vlc_object_t *obj, float vol)
if (ret == 0)
{ /* update caller (input manager) volume */
var_SetInteger (obj, "volume", volume);
- if (var_InheritBool (obj, "volume-save"))
- config_PutInt (obj, "volume", volume);
}
return ret;
}
diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index c626453..4525867 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -335,56 +335,3 @@ void aout_OutputFlush( audio_output_t *aout, bool wait )
if( aout->pf_flush != NULL )
aout->pf_flush( aout, wait );
}
-
-
-/*** Volume handling ***/
-
-static int aout_SoftVolumeSet (audio_output_t *aout, float volume)
-{
- aout_owner_t *owner = aout_owner (aout);
-
- aout_assert_locked (aout);
- /* Cubic mapping from software volume to amplification factor.
- * This provides a good tradeoff between low and high volume ranges.
- *
- * This code is only used for the VLC software mixer. If you change this
- * formula, be sure to update the volume-capable plugins also.
- */
- aout_VolumeReport (aout, volume);
- volume = volume * volume * volume;
- owner->soft.volume = volume;
- aout_volume_SetVolume(owner->volume, owner->soft.mute ? 0.f : volume);
- return 0;
-}
-
-static int aout_SoftMuteSet (audio_output_t *aout, bool mute)
-{
- aout_owner_t *owner = aout_owner (aout);
-
- aout_assert_locked (aout);
- aout_MuteReport (aout, mute);
- owner->soft.mute = mute;
- aout_volume_SetVolume(owner->volume, mute ? 0.f : owner->soft.volume);
- return 0;
-}
-
-/**
- * Configures the volume setter for software mixing
- * and apply the default volume.
- * @note Audio output plugins that cannot apply the volume
- * should call this function during activation.
- */
-void aout_VolumeSoftInit (audio_output_t *aout)
-{
- aout_owner_t *owner = aout_owner (aout);
- long volume = var_GetInteger (aout, "volume");
- bool mute = var_GetBool (aout, "mute");
-
- aout_assert_locked (aout);
- /* volume depends on mute and vice versa... bootstrapping mute is easier */
- owner->soft.mute = mute;
- aout->volume_set = aout_SoftVolumeSet;
- aout->mute_set = aout_SoftMuteSet;
- aout_SoftVolumeSet (aout, volume / (float)AOUT_VOLUME_DEFAULT);
- aout_MuteReport (aout, mute);
-}
diff --git a/src/libvlccore.sym b/src/libvlccore.sym
index 53ca43d..2a40b8b 100644
--- a/src/libvlccore.sym
+++ b/src/libvlccore.sym
@@ -16,7 +16,6 @@ aout_VolumeSet
aout_VolumeUp
aout_MuteSet
aout_MuteGet
-aout_VolumeSoftInit
block_Alloc
block_FifoCount
block_FifoEmpty
More information about the vlc-commits
mailing list