Commit 9b925784 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Volume mixer: drop FI32

parent 2c3a9415
......@@ -120,7 +120,6 @@ $Id$
* faad: AAC decoder using libfaad2
* fb: video output module for the Linux framebuffer
* filesystem: Filesystem access module
* fixed32_mixer: Fixed-point audio mixer
* flac: Flac decoder using libflac
* flacsys: FLAC demuxer
* float32_mixer: Precise float32 audio mixer
......@@ -163,6 +162,7 @@ $Id$
* idummy: dummy input
* image: Image file video output
* inhibit: preventing the computer from suspending
* integer_mixer: Integer audio mixer
* invert: inverse video filter
* iomx: IPC/OpenMaxIL for Android
* jack: jack server audio output
......
SOURCES_float32_mixer = float32.c
SOURCES_fixed32_mixer = fixed32.c
SOURCES_integer_mixer = integer.c
libvlc_LTLIBRARIES += \
libfloat32_mixer_plugin.la \
libfixed32_mixer_plugin.la
libinteger_mixer_plugin.la
/*****************************************************************************
* fixed32.c : fixed-point software volume
* integer.c: integer software volume
*****************************************************************************
* Copyright (C) 2011 Rémi Denis-Courmont
*
......@@ -32,12 +32,11 @@ static int Activate (vlc_object_t *);
vlc_module_begin ()
set_category (CAT_AUDIO)
set_subcategory (SUBCAT_AUDIO_MISC)
set_description (N_("Fixed-point audio mixer"))
set_description (N_("Integer audio mixer"))
set_capability ("audio mixer", 9)
set_callbacks (Activate, NULL)
vlc_module_end ()
static void FilterFI32 (audio_mixer_t *, block_t *, float);
static void FilterS16N (audio_mixer_t *, block_t *, float);
static int Activate (vlc_object_t *obj)
......@@ -46,9 +45,6 @@ static int Activate (vlc_object_t *obj)
switch (mixer->format)
{
case VLC_CODEC_FI32:
mixer->mix = FilterFI32;
break;
case VLC_CODEC_S16N:
mixer->mix = FilterS16N;
break;
......@@ -58,24 +54,6 @@ static int Activate (vlc_object_t *obj)
return 0;
}
static void FilterFI32 (audio_mixer_t *mixer, block_t *block, float volume)
{
const int64_t mult = volume * 0x1.p32;
if (mult == 0x1.p32)
return;
int32_t *p = (int32_t *)block->p_buffer;
for (size_t n = block->i_buffer / sizeof (*p); n > 0; n--)
{
*p = (*p * mult) >> INT64_C(32);
p++;
}
(void) mixer;
}
static void FilterS16N (audio_mixer_t *mixer, block_t *block, float volume)
{
int32_t mult = volume * 0x1.p16;
......
......@@ -319,8 +319,8 @@ modules/audio_filter/spatializer/revmodel.cpp
modules/audio_filter/spatializer/revmodel.hpp
modules/audio_filter/spatializer/spatializer.cpp
modules/audio_filter/spatializer/tuning.h
modules/audio_mixer/fixed32.c
modules/audio_mixer/float32.c
modules/audio_mixer/integer.c
modules/audio_output/adummy.c
modules/audio_output/alsa.c
modules/audio_output/amem.c
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment