[vlc-commits] aout: inline some functions

Rémi Denis-Courmont git at videolan.org
Sat May 5 12:16:48 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat May  5 13:06:19 2018 +0300| [8fb81d08d6500136d467a46c4796c0872d7705cd] | committer: Rémi Denis-Courmont

aout: inline some functions

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8fb81d08d6500136d467a46c4796c0872d7705cd
---

 src/audio_output/output.c | 30 ++++++------------------------
 1 file changed, 6 insertions(+), 24 deletions(-)

diff --git a/src/audio_output/output.c b/src/audio_output/output.c
index 541202d5da..adc816827c 100644
--- a/src/audio_output/output.c
+++ b/src/audio_output/output.c
@@ -615,24 +615,6 @@ void aout_OutputDelete (audio_output_t *aout)
     aout_OutputUnlock(aout);
 }
 
-static int aout_OutputVolumeSet (audio_output_t *aout, float vol)
-{
-    aout_OutputAssertLocked (aout);
-    return (aout->volume_set != NULL) ? aout->volume_set (aout, vol) : -1;
-}
-
-static int aout_OutputMuteSet (audio_output_t *aout, bool mute)
-{
-    aout_OutputAssertLocked (aout);
-    return (aout->mute_set != NULL) ? aout->mute_set (aout, mute) : -1;
-}
-
-static int aout_OutputDeviceSet (audio_output_t *aout, const char *id)
-{
-    aout_OutputAssertLocked (aout);
-    return (aout->device_select != NULL) ? aout->device_select (aout, id) : -1;
-}
-
 /**
  * Gets the volume of the audio output stream (independent of mute).
  * \return Current audio volume (0. = silent, 1. = nominal),
@@ -653,9 +635,9 @@ int aout_VolumeSet (audio_output_t *aout, float vol)
     int ret;
 
     aout_OutputLock(aout);
-    ret = aout_OutputVolumeSet(aout, vol);
+    ret = aout->volume_set(aout, vol);
     aout_OutputUnlock(aout);
-    return ret;
+    return ret ? -1 : 0;
 }
 
 /**
@@ -703,9 +685,9 @@ int aout_MuteSet (audio_output_t *aout, bool mute)
     int ret;
 
     aout_OutputLock(aout);
-    ret = aout_OutputMuteSet(aout, mute);
+    ret = aout->mute_set(aout, mute);
     aout_OutputUnlock(aout);
-    return ret;
+    return ret ? -1 : 0;
 }
 
 /**
@@ -728,9 +710,9 @@ int aout_DeviceSet (audio_output_t *aout, const char *id)
     int ret;
 
     aout_OutputLock(aout);
-    ret = aout_OutputDeviceSet(aout, id);
+    ret = aout->device_select(aout, id);
     aout_OutputUnlock(aout);
-    return ret;
+    return ret ? -1 : 0;
 }
 
 /**



More information about the vlc-commits mailing list