Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
4875845b
Commit
4875845b
authored
Oct 08, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add trivial ugly stereo karaoke filter
parent
78f2a6f1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
0 deletions
+83
-0
modules/LIST
modules/LIST
+1
-0
modules/audio_filter/Modules.am
modules/audio_filter/Modules.am
+2
-0
modules/audio_filter/karaoke.c
modules/audio_filter/karaoke.c
+79
-0
po/POTFILES.in
po/POTFILES.in
+1
-0
No files found.
modules/LIST
View file @
4875845b
...
@@ -167,6 +167,7 @@ $Id$
...
@@ -167,6 +167,7 @@ $Id$
* invert: inverse video filter
* invert: inverse video filter
* iomx: IPC/OpenMaxIL for Android
* iomx: IPC/OpenMaxIL for Android
* jack: jack server audio output
* jack: jack server audio output
* karaoke: simple karaoke audio filter
* kate: kate text bitstream decoder
* kate: kate text bitstream decoder
* libass: Subtitle renderers using libass
* libass: Subtitle renderers using libass
* libbluray: Library to access Blu-Ray drives
* libbluray: Library to access Blu-Ray drives
...
...
modules/audio_filter/Modules.am
View file @
4875845b
SOURCES_equalizer = equalizer.c equalizer_presets.h
SOURCES_equalizer = equalizer.c equalizer_presets.h
SOURCES_compressor = compressor.c
SOURCES_compressor = compressor.c
SOURCES_karaoke = karaoke.c
SOURCES_normvol = normvol.c
SOURCES_normvol = normvol.c
SOURCES_audiobargraph_a = audiobargraph_a.c
SOURCES_audiobargraph_a = audiobargraph_a.c
SOURCES_param_eq = param_eq.c
SOURCES_param_eq = param_eq.c
...
@@ -18,6 +19,7 @@ libvlc_LTLIBRARIES += \
...
@@ -18,6 +19,7 @@ libvlc_LTLIBRARIES += \
libchorus_flanger_plugin.la \
libchorus_flanger_plugin.la \
libcompressor_plugin.la \
libcompressor_plugin.la \
libequalizer_plugin.la \
libequalizer_plugin.la \
libkaraoke_plugin.la \
libnormvol_plugin.la \
libnormvol_plugin.la \
libparam_eq_plugin.la \
libparam_eq_plugin.la \
libscaletempo_plugin.la \
libscaletempo_plugin.la \
...
...
modules/audio_filter/karaoke.c
0 → 100644
View file @
4875845b
/*****************************************************************************
* karaoke.c : karaoke mode
*****************************************************************************
* Copyright © 2011 Rémi Denis-Courmont
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h>
#include <vlc_common.h>
#include <vlc_aout.h>
#include <vlc_filter.h>
#include <vlc_plugin.h>
static
int
Open
(
vlc_object_t
*
);
vlc_module_begin
()
set_shortname
(
N_
(
"Karaoke"
))
set_description
(
N_
(
"Simple Karaoke filter"
))
set_category
(
CAT_AUDIO
)
set_subcategory
(
SUBCAT_AUDIO_AFILTER
)
set_capability
(
"audio filter"
,
0
)
set_callbacks
(
Open
,
NULL
)
vlc_module_end
()
static
block_t
*
Process
(
filter_t
*
,
block_t
*
);
static
int
Open
(
vlc_object_t
*
obj
)
{
filter_t
*
filter
=
(
filter_t
*
)
obj
;
if
(
filter
->
fmt_in
.
audio
.
i_format
!=
VLC_CODEC_FL32
||
!
AOUT_FMTS_IDENTICAL
(
&
filter
->
fmt_in
.
audio
,
&
filter
->
fmt_out
.
audio
))
return
VLC_EGENERIC
;
if
(
filter
->
fmt_in
.
audio
.
i_channels
!=
2
)
{
msg_Err
(
filter
,
"voice removal requires stereo"
);
return
VLC_EGENERIC
;
}
filter
->
pf_audio_filter
=
Process
;
return
VLC_SUCCESS
;
}
static
block_t
*
Process
(
filter_t
*
filter
,
block_t
*
block
)
{
const
float
factor
=
.
70710678
/* 1. / sqrtf (2) */
;
float
*
spl
=
(
float
*
)
block
->
p_buffer
;
for
(
unsigned
i
=
block
->
i_nb_samples
;
i
>
0
;
i
--
)
{
float
s
=
(
spl
[
0
]
-
spl
[
1
])
*
factor
;
*
(
spl
++
)
=
s
;
*
(
spl
++
)
=
s
;
/* TODO: set output format to mono */
}
(
void
)
filter
;
return
block
;
}
po/POTFILES.in
View file @
4875845b
...
@@ -300,6 +300,7 @@ modules/audio_filter/converter/format.c
...
@@ -300,6 +300,7 @@ modules/audio_filter/converter/format.c
modules/audio_filter/converter/mpgatofixed32.c
modules/audio_filter/converter/mpgatofixed32.c
modules/audio_filter/equalizer.c
modules/audio_filter/equalizer.c
modules/audio_filter/equalizer_presets.h
modules/audio_filter/equalizer_presets.h
modules/audio_filter/karaoke.c
modules/audio_filter/normvol.c
modules/audio_filter/normvol.c
modules/audio_filter/param_eq.c
modules/audio_filter/param_eq.c
modules/audio_filter/resampler/bandlimited.c
modules/audio_filter/resampler/bandlimited.c
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment