[vlc-commits] mixer only needs the sample format (FOURCC)
Rémi Denis-Courmont
git at videolan.org
Tue Aug 2 20:00:29 CEST 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Tue Aug 2 21:00:10 2011 +0300| [e870d083359f367817b4143a4f5299d07b90587d] | committer: Rémi Denis-Courmont
mixer only needs the sample format (FOURCC)
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e870d083359f367817b4143a4f5299d07b90587d
---
include/vlc_aout_mixer.h | 2 +-
modules/audio_mixer/fixed32.c | 2 +-
modules/audio_mixer/float32.c | 2 +-
src/audio_output/aout_internal.h | 2 +-
src/audio_output/dec.c | 2 +-
src/audio_output/intf.c | 2 +-
src/audio_output/mixer.c | 5 ++---
7 files changed, 8 insertions(+), 9 deletions(-)
diff --git a/include/vlc_aout_mixer.h b/include/vlc_aout_mixer.h
index 8ea5dca..2541cd2 100644
--- a/include/vlc_aout_mixer.h
+++ b/include/vlc_aout_mixer.h
@@ -44,7 +44,7 @@ struct audio_mixer
VLC_COMMON_MEMBERS
module_t *module; /**< Module handle */
- const audio_sample_format_t *fmt; /**< Audio format */
+ vlc_fourcc_t format; /**< Audio samples format */
void (*mix)(audio_mixer_t *, block_t *, float); /**< Amplifier */
};
diff --git a/modules/audio_mixer/fixed32.c b/modules/audio_mixer/fixed32.c
index 67f345d..3827d27 100644
--- a/modules/audio_mixer/fixed32.c
+++ b/modules/audio_mixer/fixed32.c
@@ -44,7 +44,7 @@ static int Activate (vlc_object_t *obj)
{
audio_mixer_t *mixer = (audio_mixer_t *)obj;
- switch (mixer->fmt->i_format)
+ switch (mixer->format)
{
case VLC_CODEC_FI32:
mixer->mix = FilterFI32;
diff --git a/modules/audio_mixer/float32.c b/modules/audio_mixer/float32.c
index 2bec603..f148b33 100644
--- a/modules/audio_mixer/float32.c
+++ b/modules/audio_mixer/float32.c
@@ -59,7 +59,7 @@ static int Create( vlc_object_t *p_this )
{
audio_mixer_t *p_mixer = (audio_mixer_t *)p_this;
- if ( p_mixer->fmt->i_format != VLC_CODEC_FL32 )
+ if (p_mixer->format != VLC_CODEC_FL32)
return -1;
p_mixer->mix = DoWork;
diff --git a/src/audio_output/aout_internal.h b/src/audio_output/aout_internal.h
index 8844a81..436435e 100644
--- a/src/audio_output/aout_internal.h
+++ b/src/audio_output/aout_internal.h
@@ -145,7 +145,7 @@ void aout_FiltersDestroyPipeline( filter_t *const *, unsigned );
void aout_FiltersPlay( filter_t *const *, unsigned, aout_buffer_t ** );
/* From mixer.c : */
-struct audio_mixer *aout_MixerNew(vlc_object_t *, const audio_sample_format_t * );
+struct audio_mixer *aout_MixerNew(vlc_object_t *, vlc_fourcc_t);
#define aout_MixerNew(o, f) aout_MixerNew(VLC_OBJECT(o), f)
void aout_MixerDelete(struct audio_mixer *);
void aout_MixerRun(struct audio_mixer *, block_t *, float);
diff --git a/src/audio_output/dec.c b/src/audio_output/dec.c
index 4946a52..3460363 100644
--- a/src/audio_output/dec.c
+++ b/src/audio_output/dec.c
@@ -107,7 +107,7 @@ aout_input_t *aout_DecNew( audio_output_t *p_aout,
goto out;
assert (owner->volume.mixer == NULL);
- owner->volume.mixer = aout_MixerNew (p_aout, &owner->mixer_format);
+ owner->volume.mixer = aout_MixerNew (p_aout, owner->mixer_format.i_format);
if (owner->volume.mixer == NULL)
{
aout_OutputDelete( p_aout );
diff --git a/src/audio_output/intf.c b/src/audio_output/intf.c
index 0ea9c55..8d9190b 100644
--- a/src/audio_output/intf.c
+++ b/src/audio_output/intf.c
@@ -271,7 +271,7 @@ static int aout_Restart( audio_output_t * p_aout )
return -1;
}
- owner->volume.mixer = aout_MixerNew (p_aout, &owner->mixer_format);
+ owner->volume.mixer = aout_MixerNew (p_aout, owner->mixer_format.i_format);
if (owner->volume.mixer == NULL)
{
aout_OutputDelete( p_aout );
diff --git a/src/audio_output/mixer.c b/src/audio_output/mixer.c
index 3d631c2..b1a8b5d 100644
--- a/src/audio_output/mixer.c
+++ b/src/audio_output/mixer.c
@@ -40,14 +40,13 @@
/**
* Creates a software amplifier.
*/
-audio_mixer_t *aout_MixerNew(vlc_object_t *obj,
- const audio_sample_format_t *fmt)
+audio_mixer_t *aout_MixerNew(vlc_object_t *obj, vlc_fourcc_t format)
{
audio_mixer_t *mixer = vlc_custom_create(obj, sizeof (*mixer), "mixer");
if (unlikely(mixer == NULL))
return NULL;
- mixer->fmt = fmt;
+ mixer->format = format;
mixer->mix = NULL;
mixer->module = module_need(mixer, "audio mixer", NULL, false);
if (mixer->module == NULL)
More information about the vlc-commits
mailing list