diff --git a/include/vlc_aout_mixer.h b/include/vlc_aout_mixer.h index 8ea5dca649f7b161359cd2871094fab90379d9f9..2541cd254e21fac7279b2b6513318f2b3f7b1a70 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 67f345d840b0d423264a81c95ce5ca997805bd65..3827d2791300b6fa445f9e375b80e8ba2df1966d 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 2bec603cf12708daa3758af0f5b628d0b29efc83..f148b33bb45f23f1583d250f5eed4236e4890682 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 8844a816e8953e3824165176230c65e8841ce8a7..436435e83da3852801548724606767ebe45ad459 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 4946a525ccfa781a2145084d06dbe84dc3f2076a..3460363f4d655ae91e3f828eb279264cf8efffac 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 0ea9c55f0e65696b8b6a07e482d3259d32a0a4f7..8d9190b73a7e16c87726d6c602edce86b6797164 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 3d631c2073c13ba39174e74c4a8ee84ed97db49a..b1a8b5d33b58fd0c8a037ce286cff279e00fe938 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)