[vlc-commits] kai: use software amplification (untested)

Rémi Denis-Courmont git at videolan.org
Thu Jul 19 19:42:01 CEST 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 19 18:10:09 2012 +0300| [7c28bae9f3705a87d3e20d9cc5c0120e0a5a960d] | committer: Rémi Denis-Courmont

kai: use software amplification (untested)

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

 modules/audio_output/kai.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/audio_output/kai.c b/modules/audio_output/kai.c
index 5f7d0a0..dddbacc 100644
--- a/modules/audio_output/kai.c
+++ b/modules/audio_output/kai.c
@@ -47,6 +47,8 @@ struct aout_sys_t
 {
     aout_packet_t   packet;
     HKAI            hkai;
+    float           soft_gain;
+    bool            soft_mute;
 };
 
 /*****************************************************************************
@@ -58,6 +60,8 @@ static void Play  ( audio_output_t *_p_aout, block_t *block );
 
 static ULONG APIENTRY KaiCallback ( PVOID, PVOID, ULONG );
 
+#include "volume.h"
+
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -87,6 +91,7 @@ vlc_module_begin ()
                 KAI_AUDIO_DEVICE_TEXT, KAI_AUDIO_DEVICE_LONGTEXT, false )
         change_string_list( ppsz_kai_audio_device, ppsz_kai_audio_device_text,
                             0 )
+    add_sw_gain( )
     add_bool( "kai-audio-exclusive-mode", false,
               KAI_AUDIO_EXCLUSIVE_MODE_TEXT, KAI_AUDIO_EXCLUSIVE_MODE_LONGTEXT,
               true )
@@ -205,7 +210,7 @@ static int Open ( vlc_object_t *p_this )
 
     aout_PacketInit( p_aout, &p_sys->packet,
                      ks_obtained.ulBufferSize / i_bytes_per_frame );
-    aout_VolumeSoftInit( p_aout );
+    aout_SoftVolumeInit( p_aout );
 
     if ( var_Type( p_aout, "audio-device" ) == 0 )
     {



More information about the vlc-commits mailing list