added possibility to disable highpass and lowpass filters for lame

This commit is contained in:
darkeye 2001-10-20 10:56:45 +00:00
parent 4309523f0d
commit d398578542
7 changed files with 60 additions and 44 deletions

View File

@ -1,3 +1,7 @@
DarkIce 0.8
o added possibility to disable lowpass and highpass filtering for lame
19-10-2001: DarkIce 0.7 released
o added support for FreeBSD

View File

@ -1,6 +1,6 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(src/DarkIce.cpp)
AM_INIT_AUTOMAKE(darkice, 0.7)
AM_INIT_AUTOMAKE(darkice, 0.8beta)
AM_CONFIG_HEADER(config.h)

View File

@ -135,12 +135,14 @@ server should dump the contents of
this stream on its side.
.TP
.I lowpass
Lowpass filter setting for the lame encoder. If not set,
the encoder's default behaviour is used
Lowpass filter setting for the lame encoder. If not set or set to 0,
the encoder's default behaviour is used. If set to -1, the filter is
disabled.
.TP
.I highpass
Highpass filter setting for the lame encoder. If not set,
the encoder's default behaviour is used
Highpass filter setting for the lame encoder. If not set or set to 0,
the encoder's default behaviour is used. If set to -1, the filter is
disabled.
.PP
.B [icecast2-x]
@ -256,12 +258,14 @@ AIM information related to the stream
ICQ information related to the stream
.TP
.I lowpass
Lowpass filter setting for the lame encoder. If not set,
the encoder's default behaviour is used
Lowpass filter setting for the lame encoder. If not set or set to 0,
the encoder's default behaviour is used. If set to -1, the filter is
disabled.
.TP
.I highpass
Highpass filter setting for the lame encoder. If not set,
the encoder's default behaviour is used
Highpass filter setting for the lame encoder. If not set or set to 0,
the encoder's default behaviour is used. If set to -1, the filter is
disabled.
.PP
A sample configuration file follows. This file makes

View File

@ -36,7 +36,7 @@ Summary : DarkIce live IceCast / ShoutCast streamer
Name: darkice
Vendor: Tyrell Hungary
Packager: Akos Maroy <darkeye@tyrell.hu>
Version: 0.7
Version: 0.8beta
Release: 1
Copyright: GPL
Group: Applications/Multimedia
@ -97,6 +97,9 @@ make clean
# =================================================================== change log
#
# $Log$
# Revision 1.9 2001/10/20 10:56:45 darkeye
# added possibility to disable highpass and lowpass filters for lame
#
# Revision 1.8 2001/10/19 12:48:03 darkeye
# for new version
#

View File

@ -210,8 +210,8 @@ DarkIce :: configIceCast ( const Config & config,
const char * url = 0;
const char * genre = 0;
bool isPublic = false;
unsigned int lowpass = 0;
unsigned int highpass = 0;
int lowpass = 0;
int highpass = 0;
str = cs->get( "sampleRate");
sampleRate = str ? Util::strToL( str) : dsp->getSampleRate();
@ -411,8 +411,8 @@ DarkIce :: configShoutCast ( const Config & config,
const char * url = 0;
const char * genre = 0;
bool isPublic = false;
unsigned int lowpass = 0;
unsigned int highpass = 0;
int lowpass = 0;
int highpass = 0;
const char * irc = 0;
const char * aim = 0;
const char * icq = 0;
@ -608,6 +608,9 @@ DarkIce :: run ( void ) throw ( Exception )
$Source$
$Log$
Revision 1.22 2001/10/20 10:56:45 darkeye
added possibility to disable highpass and lowpass filters for lame
Revision 1.21 2001/10/19 12:39:42 darkeye
created configure options to compile with or without lame / Ogg Vorbis

View File

@ -125,30 +125,26 @@ LameLibEncoder :: open ( void )
reportEvent( 5, "set lame bit rate", lame_get_brate( lameGlobalFlags));
if ( lowpass ) {
if ( 0 > lame_set_lowpassfreq( lameGlobalFlags, lowpass) ) {
throw Exception( __FILE__, __LINE__,
"lame lib setting lowpass frequency error",
lowpass );
}
reportEvent( 5,
"set lame lowpass frequency",
lame_get_lowpassfreq( lameGlobalFlags));
if ( 0 > lame_set_lowpassfreq( lameGlobalFlags, lowpass) ) {
throw Exception( __FILE__, __LINE__,
"lame lib setting lowpass frequency error",
lowpass );
}
reportEvent( 5,
"set lame lowpass frequency",
lame_get_lowpassfreq( lameGlobalFlags));
if ( highpass ) {
if ( 0 > lame_set_highpassfreq( lameGlobalFlags, highpass) ) {
throw Exception( __FILE__, __LINE__,
"lame lib setting highpass frequency error",
lowpass );
}
reportEvent( 5,
"set lame highpass frequency",
lame_get_highpassfreq( lameGlobalFlags));
if ( 0 > lame_set_highpassfreq( lameGlobalFlags, highpass) ) {
throw Exception( __FILE__, __LINE__,
"lame lib setting highpass frequency error",
lowpass );
}
reportEvent( 5,
"set lame highpass frequency",
lame_get_highpassfreq( lameGlobalFlags));
// not configurable lame settings
if ( 0 > lame_set_quality( lameGlobalFlags, 2) ) {
@ -419,6 +415,9 @@ LameLibEncoder :: close ( void ) throw ( Exception )
$Source$
$Log$
Revision 1.9 2001/10/20 10:56:45 darkeye
added possibility to disable highpass and lowpass filters for lame
Revision 1.8 2001/10/19 12:39:42 darkeye
created configure options to compile with or without lame / Ogg Vorbis

View File

@ -84,16 +84,16 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter
Ref<Sink> sink;
/**
* Highpass filter. Sound frequency in Hz, from where up the
* Lowpass filter. Sound frequency in Hz, from where up the
* input is cut.
*/
unsigned int lowpass;
int lowpass;
/**
* Lowpass filter. Sound frequency in Hz, from where down the
* Highpass filter. Sound frequency in Hz, from where down the
* input is cut.
*/
unsigned int highpass;
int highpass;
/**
* Initialize the object.
@ -111,8 +111,8 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter
*/
inline void
init ( Sink * sink,
unsigned int lowpass,
unsigned int highpass ) throw ( Exception )
int lowpass,
int highpass ) throw ( Exception )
{
this->sink = sink;
this->lowpass = lowpass;
@ -223,8 +223,8 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter
unsigned int outBitrate,
unsigned int outSampleRate = 0,
unsigned int outChannel = 0,
unsigned int lowpass = 0,
unsigned int highpass = 0 )
int lowpass = 0,
int highpass = 0 )
throw ( Exception )
: AudioEncoder ( inSampleRate,
@ -264,8 +264,8 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter
unsigned int outBitrate,
unsigned int outSampleRate = 0,
unsigned int outChannel = 0,
unsigned int lowpass = 0,
unsigned int highpass = 0 )
int lowpass = 0,
int highpass = 0 )
throw ( Exception )
: AudioEncoder ( as,
@ -456,6 +456,9 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter
$Source$
$Log$
Revision 1.10 2001/10/20 10:56:45 darkeye
added possibility to disable highpass and lowpass filters for lame
Revision 1.9 2001/10/19 12:39:42 darkeye
created configure options to compile with or without lame / Ogg Vorbis