From d3985785422ac0ebb1c3ac2755128d0b508b08c9 Mon Sep 17 00:00:00 2001 From: darkeye Date: Sat, 20 Oct 2001 10:56:45 +0000 Subject: [PATCH] added possibility to disable highpass and lowpass filters for lame --- darkice/trunk/ChangeLog | 4 +++ darkice/trunk/configure.in | 2 +- darkice/trunk/man/darkice.cfg.5 | 20 ++++++++------ darkice/trunk/rpm/darkice.spec | 5 +++- darkice/trunk/src/DarkIce.cpp | 11 +++++--- darkice/trunk/src/LameLibEncoder.cpp | 39 ++++++++++++++-------------- darkice/trunk/src/LameLibEncoder.h | 23 +++++++++------- 7 files changed, 60 insertions(+), 44 deletions(-) diff --git a/darkice/trunk/ChangeLog b/darkice/trunk/ChangeLog index f7217a8..e98462b 100644 --- a/darkice/trunk/ChangeLog +++ b/darkice/trunk/ChangeLog @@ -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 diff --git a/darkice/trunk/configure.in b/darkice/trunk/configure.in index da64f3b..cf4ff54 100644 --- a/darkice/trunk/configure.in +++ b/darkice/trunk/configure.in @@ -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) diff --git a/darkice/trunk/man/darkice.cfg.5 b/darkice/trunk/man/darkice.cfg.5 index a4187dd..46e86a6 100644 --- a/darkice/trunk/man/darkice.cfg.5 +++ b/darkice/trunk/man/darkice.cfg.5 @@ -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 diff --git a/darkice/trunk/rpm/darkice.spec b/darkice/trunk/rpm/darkice.spec index 8701f1c..54c9e63 100644 --- a/darkice/trunk/rpm/darkice.spec +++ b/darkice/trunk/rpm/darkice.spec @@ -36,7 +36,7 @@ Summary : DarkIce live IceCast / ShoutCast streamer Name: darkice Vendor: Tyrell Hungary Packager: Akos Maroy -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 # diff --git a/darkice/trunk/src/DarkIce.cpp b/darkice/trunk/src/DarkIce.cpp index 86e873f..2efa11e 100644 --- a/darkice/trunk/src/DarkIce.cpp +++ b/darkice/trunk/src/DarkIce.cpp @@ -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 diff --git a/darkice/trunk/src/LameLibEncoder.cpp b/darkice/trunk/src/LameLibEncoder.cpp index 52c946c..74f941b 100644 --- a/darkice/trunk/src/LameLibEncoder.cpp +++ b/darkice/trunk/src/LameLibEncoder.cpp @@ -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 diff --git a/darkice/trunk/src/LameLibEncoder.h b/darkice/trunk/src/LameLibEncoder.h index b3758de..c58a75f 100644 --- a/darkice/trunk/src/LameLibEncoder.h +++ b/darkice/trunk/src/LameLibEncoder.h @@ -84,16 +84,16 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter Ref 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