[vlc-commits] audio filters: remove old filter_NewAudioBuffer()

Rémi Denis-Courmont git at videolan.org
Fri Mar 1 17:00:49 CET 2013


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Mar  1 17:59:56 2013 +0200| [b2c7e1447fabaf37344be16afc13937f3b86fa08] | committer: Rémi Denis-Courmont

audio filters: remove old filter_NewAudioBuffer()

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

 include/vlc_filter.h                           |    2 --
 modules/arm_neon/simple_channel_mixer.c        |    2 +-
 modules/audio_filter/channel_mixer/dolby.c     |    2 +-
 modules/audio_filter/channel_mixer/headphone.c |    2 +-
 modules/audio_filter/channel_mixer/remap.c     |    2 +-
 modules/audio_filter/channel_mixer/simple.c    |    2 +-
 modules/audio_filter/channel_mixer/trivial.c   |    2 +-
 modules/audio_filter/converter/a52tofloat32.c  |    2 +-
 modules/audio_filter/converter/a52tospdif.c    |    2 +-
 modules/audio_filter/converter/dtstospdif.c    |    3 +--
 modules/audio_filter/resampler/bandlimited.c   |    2 +-
 modules/audio_filter/scaletempo.c              |    2 +-
 12 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/include/vlc_filter.h b/include/vlc_filter.h
index f7c5b32..320cbac 100644
--- a/include/vlc_filter.h
+++ b/include/vlc_filter.h
@@ -209,8 +209,6 @@ static inline void filter_DeleteSubpicture( filter_t *p_filter, subpicture_t *p_
     p_filter->pf_sub_buffer_del( p_filter, p_subpicture );
 }
 
-#define filter_NewAudioBuffer(f,s) ((f), block_Alloc(s))
-
 /**
  * This function gives all input attachments at once.
  *
diff --git a/modules/arm_neon/simple_channel_mixer.c b/modules/arm_neon/simple_channel_mixer.c
index e2baaaf..8627415 100644
--- a/modules/arm_neon/simple_channel_mixer.c
+++ b/modules/arm_neon/simple_channel_mixer.c
@@ -89,7 +89,7 @@ static bool FilterInit( filter_t *p_filter, block_t *p_block, block_t **pp_out )
         p_filter->fmt_out.audio.i_bitspersample *
         p_filter->fmt_out.audio.i_channels / 8;
 
-    block_t *p_out = filter_NewAudioBuffer( p_filter, i_out_size );
+    block_t *p_out = block_Alloc( i_out_size );
     if( !p_out )
     {
         msg_Warn( p_filter, "can't get output buffer" );
diff --git a/modules/audio_filter/channel_mixer/dolby.c b/modules/audio_filter/channel_mixer/dolby.c
index cd9922c..60819f6 100644
--- a/modules/audio_filter/channel_mixer/dolby.c
+++ b/modules/audio_filter/channel_mixer/dolby.c
@@ -164,7 +164,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
     size_t i_nb_channels = aout_FormatNbChannels( &p_filter->fmt_out.audio );
     size_t i_nb_rear = 0;
     size_t i;
-    block_t *p_out_buf = filter_NewAudioBuffer( p_filter,
+    block_t *p_out_buf = block_Alloc(
                                 sizeof(float) * i_nb_samples * i_nb_channels );
     if( !p_out_buf )
         goto out;
diff --git a/modules/audio_filter/channel_mixer/headphone.c b/modules/audio_filter/channel_mixer/headphone.c
index 0d868ef..92c1a3b 100644
--- a/modules/audio_filter/channel_mixer/headphone.c
+++ b/modules/audio_filter/channel_mixer/headphone.c
@@ -510,7 +510,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_block )
       p_filter->fmt_out.audio.i_bitspersample/8 *
         aout_FormatNbChannels( &(p_filter->fmt_out.audio) );
 
-    block_t *p_out = filter_NewAudioBuffer( p_filter, i_out_size );
+    block_t *p_out = block_Alloc( i_out_size );
     if( !p_out )
     {
         msg_Warn( p_filter, "can't get output buffer" );
diff --git a/modules/audio_filter/channel_mixer/remap.c b/modules/audio_filter/channel_mixer/remap.c
index 5ee9190..77aeb09 100644
--- a/modules/audio_filter/channel_mixer/remap.c
+++ b/modules/audio_filter/channel_mixer/remap.c
@@ -376,7 +376,7 @@ static block_t *Remap( filter_t *p_filter, block_t *p_block )
     size_t i_out_size = p_block->i_nb_samples *
         p_filter->fmt_out.audio.i_bytes_per_frame;
 
-    block_t *p_out = filter_NewAudioBuffer( p_filter, i_out_size );
+    block_t *p_out = block_Alloc( i_out_size );
     if( !p_out )
     {
         msg_Warn( p_filter, "can't get output buffer" );
diff --git a/modules/audio_filter/channel_mixer/simple.c b/modules/audio_filter/channel_mixer/simple.c
index d902d1a..00d538a 100644
--- a/modules/audio_filter/channel_mixer/simple.c
+++ b/modules/audio_filter/channel_mixer/simple.c
@@ -247,7 +247,7 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
       p_filter->fmt_out.audio.i_bitspersample *
         p_filter->fmt_out.audio.i_channels / 8;
 
-    block_t *p_out = filter_NewAudioBuffer( p_filter, i_out_size );
+    block_t *p_out = block_Alloc( i_out_size );
     if( !p_out )
     {
         msg_Warn( p_filter, "can't get output buffer" );
diff --git a/modules/audio_filter/channel_mixer/trivial.c b/modules/audio_filter/channel_mixer/trivial.c
index e4667af..86b9de0 100644
--- a/modules/audio_filter/channel_mixer/trivial.c
+++ b/modules/audio_filter/channel_mixer/trivial.c
@@ -109,7 +109,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
     }
     else
     {
-        p_out_buf = filter_NewAudioBuffer( p_filter,
+        p_out_buf = block_Alloc(
                               p_in_buf->i_buffer / i_input_nb * i_output_nb );
         if( !p_out_buf )
             goto out;
diff --git a/modules/audio_filter/converter/a52tofloat32.c b/modules/audio_filter/converter/a52tofloat32.c
index 2040e13..346a36d 100644
--- a/modules/audio_filter/converter/a52tofloat32.c
+++ b/modules/audio_filter/converter/a52tofloat32.c
@@ -296,7 +296,7 @@ static block_t *Convert( filter_t *p_filter, block_t *p_in_buf )
     int i_flags = p_sys->i_flags;
     size_t i_bytes_per_block = 256 * p_sys->i_nb_channels * sizeof(sample_t);
 
-    block_t *p_out_buf = filter_NewAudioBuffer( p_filter, 6 * i_bytes_per_block );
+    block_t *p_out_buf = block_Alloc( 6 * i_bytes_per_block );
     if( unlikely(p_out_buf == NULL) )
         goto out;
 
diff --git a/modules/audio_filter/converter/a52tospdif.c b/modules/audio_filter/converter/a52tospdif.c
index 53f6303..2e4a820 100644
--- a/modules/audio_filter/converter/a52tospdif.c
+++ b/modules/audio_filter/converter/a52tospdif.c
@@ -86,7 +86,7 @@ static block_t *DoWork( filter_t * p_filter, block_t *p_in_buf )
     uint16_t i_frame_size = p_in_buf->i_buffer / 2;
     uint8_t * p_in = p_in_buf->p_buffer;
 
-    block_t *p_out_buf = filter_NewAudioBuffer( p_filter, AOUT_SPDIF_SIZE );
+    block_t *p_out_buf = block_Alloc( AOUT_SPDIF_SIZE );
     if( !p_out_buf )
         goto out;
     uint8_t * p_out = p_out_buf->p_buffer;
diff --git a/modules/audio_filter/converter/dtstospdif.c b/modules/audio_filter/converter/dtstospdif.c
index 71dd6cd..88384c8 100644
--- a/modules/audio_filter/converter/dtstospdif.c
+++ b/modules/audio_filter/converter/dtstospdif.c
@@ -156,8 +156,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
     }
 
     p_filter->p_sys->i_frames = 0;
-    block_t *p_out_buf = filter_NewAudioBuffer( p_filter,
-                                                12 * p_in_buf->i_nb_samples );
+    block_t *p_out_buf = block_Alloc( 12 * p_in_buf->i_nb_samples );
     if( !p_out_buf )
         goto out;
 
diff --git a/modules/audio_filter/resampler/bandlimited.c b/modules/audio_filter/resampler/bandlimited.c
index f5c5c55..f86be17 100644
--- a/modules/audio_filter/resampler/bandlimited.c
+++ b/modules/audio_filter/resampler/bandlimited.c
@@ -145,7 +145,7 @@ static block_t *Resample( filter_t * p_filter, block_t * p_in_buf )
     size_t i_out_size = i_bytes_per_frame * ( 1 + ( p_in_buf->i_nb_samples *
               p_filter->fmt_out.audio.i_rate / p_filter->fmt_in.audio.i_rate) )
             + p_filter->p_sys->i_buf_size;
-    block_t *p_out_buf = filter_NewAudioBuffer( p_filter, i_out_size );
+    block_t *p_out_buf = block_Alloc( i_out_size );
     if( !p_out_buf )
     {
         block_Release( p_in_buf );
diff --git a/modules/audio_filter/scaletempo.c b/modules/audio_filter/scaletempo.c
index e851bc4..4600ec3 100644
--- a/modules/audio_filter/scaletempo.c
+++ b/modules/audio_filter/scaletempo.c
@@ -468,7 +468,7 @@ static block_t *DoWork( filter_t * p_filter, block_t * p_in_buf )
     }
 
     size_t i_outsize = calculate_output_buffer_size ( p_filter, p_in_buf->i_buffer );
-    block_t *p_out_buf = filter_NewAudioBuffer( p_filter, i_outsize );
+    block_t *p_out_buf = block_Alloc( i_outsize );
     if( p_out_buf == NULL )
         return NULL;
 



More information about the vlc-commits mailing list