diff options
author | Martin Holzer <mholzer@gentoo.org> | 2003-12-18 23:10:40 +0000 |
---|---|---|
committer | Martin Holzer <mholzer@gentoo.org> | 2003-12-18 23:10:40 +0000 |
commit | 5d45f2412a4c395bce6addd3fe08fdff93acd202 (patch) | |
tree | 75a33f532dc90237a58de5f9c08fe560d02985bf /media-sound/audacity | |
parent | cleanup (diff) | |
download | gentoo-2-5d45f2412a4c395bce6addd3fe08fdff93acd202.tar.gz gentoo-2-5d45f2412a4c395bce6addd3fe08fdff93acd202.tar.bz2 gentoo-2-5d45f2412a4c395bce6addd3fe08fdff93acd202.zip |
cleanup
Diffstat (limited to 'media-sound/audacity')
-rw-r--r-- | media-sound/audacity/Manifest | 5 | ||||
-rw-r--r-- | media-sound/audacity/audacity-1.1.1-r1.ebuild | 56 | ||||
-rw-r--r-- | media-sound/audacity/audacity-1.1.1.ebuild | 38 | ||||
-rw-r--r-- | media-sound/audacity/audacity-1.1.3.ebuild | 3 | ||||
-rw-r--r-- | media-sound/audacity/files/audacity-1.0.0-gcc31.patch | 70 | ||||
-rw-r--r-- | media-sound/audacity/files/audacity-src-1.1.0-phonograph.patch | 199 | ||||
-rw-r--r-- | media-sound/audacity/files/audacity-src-1.1.0-timestretch.patch | 599 | ||||
-rw-r--r-- | media-sound/audacity/files/digest-audacity-1.1.1 | 1 | ||||
-rw-r--r-- | media-sound/audacity/files/digest-audacity-1.1.1-r1 | 1 | ||||
-rw-r--r-- | media-sound/audacity/files/id3lib-3.8.0-gcc3.patch | 97 | ||||
-rw-r--r-- | media-sound/audacity/files/mono_mp3_export.patch | 150 |
11 files changed, 2 insertions, 1217 deletions
diff --git a/media-sound/audacity/Manifest b/media-sound/audacity/Manifest index 206d7daedce9..d7f04630f865 100644 --- a/media-sound/audacity/Manifest +++ b/media-sound/audacity/Manifest @@ -1,9 +1,4 @@ MD5 bf3f6434c87df998d331decbd97f2617 ChangeLog 3541 MD5 5f8d028a16df282d4bef4395296c1ca9 audacity-1.1.3.ebuild 1297 -MD5 c151b63a0eca16e885c23226c03d28f0 files/audacity-1.0.0-gcc31.patch 2153 -MD5 f779279f19d249c6d735b28e72c30c6b files/audacity-src-1.1.0-phonograph.patch 5137 -MD5 f34b93cc26c85c6789d21fb94b213e09 files/audacity-src-1.1.0-timestretch.patch 19316 MD5 d1064c1800175d5fb3113f74785568f6 files/basecfg-1.1.1 35 MD5 cb2f75d37538e9688fe397cf178f57ad files/digest-audacity-1.1.3 68 -MD5 21b2333db59cc116a7e3c96563fe9ccd files/id3lib-3.8.0-gcc3.patch 2707 -MD5 8f5051d60b802ecf74497bc2ec4bb32e files/mono_mp3_export.patch 6261 diff --git a/media-sound/audacity/audacity-1.1.1-r1.ebuild b/media-sound/audacity/audacity-1.1.1-r1.ebuild deleted file mode 100644 index 1fbde538fec1..000000000000 --- a/media-sound/audacity/audacity-1.1.1-r1.ebuild +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/audacity/audacity-1.1.1-r1.ebuild,v 1.8 2003/09/07 00:06:04 msterret Exp $ - -inherit eutils - -DESCRIPTION="A free, crossplatform audio editor." -HOMEPAGE="http://audacity.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${PN}-src-${PV}-3.tgz" - -LICENSE="GPL-2" -IUSE="oggvorbis" -SLOT="0" -KEYWORDS="x86" - -DEPEND=">=x11-libs/wxGTK-2.2.9 - >=app-arch/zip-2.3 - >=media-sound/mad-0.14 - >=media-libs/id3lib-3.8.0 - >=media-libs/libsndfile-1.0.0 - oggvorbis? ( >=media-libs/libvorbis-1.0 )" - -S="${WORKDIR}/${PN}-src-${PV}-3" - -src_unpack() { - if [ `use gtk2` ]; then - eerror "" - eerror "Audacity will not build with wxGTK compiled" - eerror "against gtk2. Make sure you have set" - eerror "-gtk2 in use for this program to compile" - eerror "" - die "Make sure -gtk2 is in USE" - fi - unpack ${PN}-src-${PV}-3.tgz - cd ${S} - epatch ${FILESDIR}/mono_mp3_export.patch || die -} - -src_compile() { - econf --with-libsndfile=system || die - MAKEOPTS=-j1 emake || die -} - -src_install() { - make PREFIX="${D}/usr" install || die - dodoc LICENSE.txt README.txt - insinto /etc/skel - newins ${FILESDIR}/basecfg-1.1.1 .Audacity -} - -pkg_postinst() { - einfo - einfo "If you built Audacity against wxGTK-2.4.0 you must..." - einfo "cp /etc/skel/.Audacity ~" - einfo -} diff --git a/media-sound/audacity/audacity-1.1.1.ebuild b/media-sound/audacity/audacity-1.1.1.ebuild deleted file mode 100644 index c4c965610bed..000000000000 --- a/media-sound/audacity/audacity-1.1.1.ebuild +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 1999-2003 Gentoo Technologies, Inc. -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/audacity/audacity-1.1.1.ebuild,v 1.3 2003/02/14 08:50:02 vapier Exp $ - -inherit eutils - -DESCRIPTION="A free, crossplatform audio editor." -HOMEPAGE="http://audacity.sourceforge.net/" -SRC_URI="mirror://sourceforge/${PN}/${PN}-src-${PV}.tgz" - -LICENSE="GPL-2" -IUSE="oggvorbis" -SLOT="0" -KEYWORDS="x86" - -DEPEND=">=x11-libs/wxGTK-2.4.0 - oggvorbis? ( media-libs/libvorbis ) - app-arch/zip - media-sound/mad - media-libs/id3lib" - -S="${WORKDIR}/${PN}-src-${PV}" - -src_unpack() { - unpack ${PN}-src-${PV}.tgz - cd ${S} - epatch ${FILESDIR}/mono_mp3_export.patch || die -} - -src_compile() { - econf || die - MAKEOPTS=-j1 emake || die -} - -src_install() { - make PREFIX="${D}/usr" install || die - dodoc LICENSE.txt README.txt -} diff --git a/media-sound/audacity/audacity-1.1.3.ebuild b/media-sound/audacity/audacity-1.1.3.ebuild index 9a407477f4ce..8d760276d929 100644 --- a/media-sound/audacity/audacity-1.1.3.ebuild +++ b/media-sound/audacity/audacity-1.1.3.ebuild @@ -1,12 +1,13 @@ # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-sound/audacity/audacity-1.1.3.ebuild,v 1.4 2003/09/11 01:21:31 msterret Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-sound/audacity/audacity-1.1.3.ebuild,v 1.5 2003/12/18 23:09:17 mholzer Exp $ inherit eutils DESCRIPTION="A free, crossplatform audio editor." HOMEPAGE="http://audacity.sourceforge.net/" SRC_URI="mirror://sourceforge/${PN}/${PN}-src-${PV}.tgz" +RESTRICT="nomirror" LICENSE="GPL-2" IUSE="encode oggvorbis" diff --git a/media-sound/audacity/files/audacity-1.0.0-gcc31.patch b/media-sound/audacity/files/audacity-1.0.0-gcc31.patch deleted file mode 100644 index 9cf3d3689fba..000000000000 --- a/media-sound/audacity/files/audacity-1.0.0-gcc31.patch +++ /dev/null @@ -1,70 +0,0 @@ -diff -u -r audacity-src-1.0.0.old/id3lib/src/tag_file.cpp audacity-src-1.0.0/id3lib/src/tag_file.cpp ---- audacity-src-1.0.0.old/id3lib/src/tag_file.cpp 2002-06-05 09:51:19.000000000 +0200 -+++ audacity-src-1.0.0/id3lib/src/tag_file.cpp 2002-07-26 21:00:16.000000000 +0200 -@@ -281,7 +281,7 @@ - //ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file"); - } - -- ofstream tmpOut(fd); -+ ofstream tmpOut(sTempFile); - if (!tmpOut) - { - tmpOut.close(); -@@ -293,7 +293,7 @@ - - tmpOut.write(tagData, tagSize); - file.seekg(tag.GetPrependedBytes(), ios::beg); -- uchar tmpBuffer[BUFSIZ]; -+ char tmpBuffer[BUFSIZ]; - while (file) - { - file.read(tmpBuffer, BUFSIZ); -diff -u -r audacity-src-1.0.0.old/id3lib/src/utils.cpp audacity-src-1.0.0/id3lib/src/utils.cpp ---- audacity-src-1.0.0.old/id3lib/src/utils.cpp 2002-06-05 09:51:19.000000000 +0200 -+++ audacity-src-1.0.0/id3lib/src/utils.cpp 2002-07-26 21:01:25.000000000 +0200 -@@ -40,7 +40,8 @@ - #define NOCREATE ((std::ios_base::openmode)0) - #define toascii(X) (X) - #else --#define NOCREATE ios::nocreate -+//#define NOCREATE ios::nocreate -+#define NOCREATE ios::in - #endif - - #include "utils.h" -@@ -106,7 +107,7 @@ - size_t source_size = source.size(); - // const char* source_str = source.data(); - char * source_str = new char[source.length()+1]; -- source.copy(source_str, string::npos); -+ source.copy(source_str, String::npos); - source_str[source.length()] = 0; - - #define BUFSIZ 1024 -@@ -242,7 +243,7 @@ - size_t size = 0; - if (file.is_open()) - { -- streamoff curpos = file.tellg(); -+ int curpos = file.tellg(); - file.seekg(0, ios::end); - size = file.tellg(); - file.seekg(curpos); -@@ -255,7 +256,7 @@ - size_t size = 0; - if (file.is_open()) - { -- streamoff curpos = file.tellg(); -+ int curpos = file.tellg(); - file.seekg(0, ios::end); - size = file.tellg(); - file.seekg(curpos); -@@ -268,7 +269,7 @@ - size_t size = 0; - if (file.is_open()) - { -- streamoff curpos = file.tellp(); -+ int curpos = file.tellp(); - file.seekp(0, ios::end); - size = file.tellp(); - file.seekp(curpos); diff --git a/media-sound/audacity/files/audacity-src-1.1.0-phonograph.patch b/media-sound/audacity/files/audacity-src-1.1.0-phonograph.patch deleted file mode 100644 index 4f2f6fa64efa..000000000000 --- a/media-sound/audacity/files/audacity-src-1.1.0-phonograph.patch +++ /dev/null @@ -1,199 +0,0 @@ -# Audacity 1.1.0 Phonograph Patch -# -# By Doug Hoyte -# -# This patch adds an effect "Phonograph", which creates pops and crackles -# that sound somewhat like a 33 1/3 LP in the selected audio -# -# Apply like so: -# -# cd audacity-1.1.0/ -# patch -p1 < /tmp/audacity-src-1.1.0-phonograph.patch -# -# Replace /tmp/ with wherever you put the patch, obviously. -# configure, make, and enjoy. -# -# -# -diff -urNB audacity-src-1.1.0/src/Makefile.in audacity-src-1.1.0-phonograph/src/Makefile.in ---- audacity-src-1.1.0/src/Makefile.in Wed Jun 5 00:45:54 2002 -+++ audacity-src-1.1.0-phonograph/src/Makefile.in Fri Aug 9 16:32:29 2002 -@@ -76,6 +76,7 @@ - $(OBJDIR)/effects/Invert.o \ - $(OBJDIR)/effects/NoiseRemoval.o \ - $(OBJDIR)/effects/Phaser.o \ -+ $(OBJDIR)/effects/Phonograph.o \ - $(OBJDIR)/effects/Reverse.o \ - $(OBJDIR)/effects/Wahwah.o \ - $(OBJDIR)/export/Export.o \ -diff -urNB audacity-src-1.1.0/src/effects/LoadEffects.cpp audacity-src-1.1.0-phonograph/src/effects/LoadEffects.cpp ---- audacity-src-1.1.0/src/effects/LoadEffects.cpp Wed Jun 5 00:45:54 2002 -+++ audacity-src-1.1.0-phonograph/src/effects/LoadEffects.cpp Fri Aug 9 16:33:33 2002 -@@ -21,6 +21,7 @@ - #include "Invert.h" - #include "NoiseRemoval.h" - #include "Phaser.h" -+#include "Phonograph.h" - #include "Reverse.h" - #include "Wahwah.h" - -@@ -52,6 +53,7 @@ - Effect::RegisterEffect(new EffectInvert(), false); - Effect::RegisterEffect(new EffectNoiseRemoval(), false); - Effect::RegisterEffect(new EffectPhaser(), false); -+ Effect::RegisterEffect(new EffectPhonograph(), false); - Effect::RegisterEffect(new EffectReverse(), false); - Effect::RegisterEffect(new EffectWahwah(), false); - -diff -urNB audacity-src-1.1.0/src/effects/Phonograph.cpp audacity-src-1.1.0-phonograph/src/effects/Phonograph.cpp ---- audacity-src-1.1.0/src/effects/Phonograph.cpp Wed Dec 31 16:00:00 1969 -+++ audacity-src-1.1.0-phonograph/src/effects/Phonograph.cpp Fri Aug 9 16:31:04 2002 -@@ -0,0 +1,89 @@ -+/********************************************************************** -+ -+ Audacity: A Digital Audio Editor -+ -+ Phonograph.cpp -+ -+ Doug Hoyte -+ -+ This class gives the selection the good ol' fashion vibe of a -+ 33 1/3 LP. -+ -+**********************************************************************/ -+ -+#include <stdlib.h> -+ -+ -+#include "Phonograph.h" -+#include "../WaveTrack.h" -+ -+// -+// EffectPhonograph -+// -+ -+EffectPhonograph::EffectPhonograph() -+{ -+} -+ -+bool EffectPhonograph::Process() -+{ -+ TrackListIterator iter(mWaveTracks); -+ VTrack *t = iter.First(); -+ int count = 0; -+ while(t) { -+ sampleCount start, len; -+ GetSamples((WaveTrack *)t, &start, &len); -+ bool success = ProcessOne(count, (WaveTrack *)t, start, len); -+ -+ if (!success) -+ return false; -+ -+ t = iter.Next(); -+ count++; -+ } -+ -+ return true; -+} -+ -+bool EffectPhonograph::ProcessOne(int count, WaveTrack *t, -+ sampleCount start, sampleCount len) -+{ -+ sampleCount base = start; -+ float *buf = new float[len]; -+ -+ int j,next,tpwidth=0; -+ float tpheight,tpoff; -+ -+ -+ srand(time(NULL)); -+ -+ t->Get(buf, base, len); -+ -+ next = 5500+(int) (7500.0*rand()/(RAND_MAX+1.0)); -+ for (int i = 0; i < len; i++) { -+ -+ next--; -+ if(next <= 0) { -+ next = 5500+(int) (7500.0*rand()/(RAND_MAX+1.0)); -+ tpheight = (0.2*rand()/(RAND_MAX+1.0)); -+ tpwidth = 7+(int) (50.0*rand()/(RAND_MAX+1.0)); -+ -+ if (next%2 == 0) tpheight *= -1; -+ -+ for (j = 0; j < tpwidth; j++) { -+ tpoff = (0.1*rand()/(RAND_MAX+1.0)); -+ tpoff *= tpheight; -+ if (i+j < len) buf[i+j] += tpheight + tpoff; -+ } -+ -+ } -+ -+ -+ } -+ -+ t->Set(buf, base, len); -+ -+ delete[] buf; -+ -+ return true; -+} -diff -urNB audacity-src-1.1.0/src/effects/Phonograph.h audacity-src-1.1.0-phonograph/src/effects/Phonograph.h ---- audacity-src-1.1.0/src/effects/Phonograph.h Wed Dec 31 16:00:00 1969 -+++ audacity-src-1.1.0-phonograph/src/effects/Phonograph.h Fri Aug 9 16:31:04 2002 -@@ -0,0 +1,55 @@ -+/********************************************************************** -+ -+ Audacity: A Digital Audio Editor -+ -+ Phonograph.h -+ -+ Doug Hoyte -+ -+ This class gives the selection the good ol' fashion vibe of a -+ 33 1/3 LP. -+ -+**********************************************************************/ -+ -+#ifndef __AUDACITY_EFFECT_PHONOGRAPH__ -+#define __AUDACITY_EFFECT_PHONOGRAPH__ -+ -+#include <wx/checkbox.h> -+#include <wx/button.h> -+#include <wx/dialog.h> -+#include <wx/stattext.h> -+#include <wx/slider.h> -+#include <wx/textctrl.h> -+#include <wx/sizer.h> -+#include <wx/intl.h> -+ -+#include "Effect.h" -+ -+#define __UNINITIALIZED__ (-1) -+ -+class WaveTrack; -+ -+class EffectPhonograph:public Effect { -+ -+ public: -+ EffectPhonograph(); -+ -+ virtual wxString GetEffectName() { -+ return wxString(_("Phonograph")); -+ } -+ -+ virtual wxString GetEffectAction() { -+ return wxString(_("\"Phonographing\"")); -+ } -+ -+ virtual bool Process(); -+ -+ private: -+ bool ProcessOne(int count, WaveTrack * t, -+ sampleCount start, sampleCount len); -+ -+ private: -+ -+}; -+ -+#endif diff --git a/media-sound/audacity/files/audacity-src-1.1.0-timestretch.patch b/media-sound/audacity/files/audacity-src-1.1.0-timestretch.patch deleted file mode 100644 index d32bda37477a..000000000000 --- a/media-sound/audacity/files/audacity-src-1.1.0-timestretch.patch +++ /dev/null @@ -1,599 +0,0 @@ -# Audacity 1.1.0 TimeStretch Patch -# -# By Doug Hoyte -# -# Some code (smsPitchScale.cpp) is -# COPYRIGHT 1999 Stephan M. Sprenger <sms@dspdimension.com> -# -# -# This patch adds an effect that can "Stretch" the time of a selected -# sample. It makes it longer or shorter depending on a ratio given. -# -# Also included is the experimental "Pitch Scaling" that will keep a -# sample at the same pitch, even after being stretched. -# -# -# Limitations: -# - The GUI sucks. Ideally, I'd like it to be one window that has a slide -# bar and a checkbox. Also, it would show you the length of the selected -# sample (in seconds) and you could choose the desired length in seconds -# or via the ratio. Unfortunatley, my wxWindows skills suck... -# - After being stretched, the current selection should be the new audio, -# not where the old audio was. This isn't a problem with other effects -# because they don't change length. I wasn't sure how to change the -# selection boundaries, so I just left it. -# - The Pitch Scale code is SLOOOW. -# - Sometimes the Pitch Scale code leaves a tiny bit of garbage at the -# beginning of a clip. -# - The Pitch Scale code degrades the quality of the sample somewhat. -# -# -# Apply like so: -# -# cd audacity-1.1.0/ -# patch -p1 < /tmp/audacity-src-1.1.0-timestretch.patch -# -# Replace /tmp/ with wherever you put the patch, obviously. -# configure, make, and enjoy. -# -# -# -diff -urNb audacity-src-1.1.0/src/Makefile.in audacity-src-1.1.0-timestretch/src/Makefile.in ---- audacity-src-1.1.0/src/Makefile.in Wed Jun 5 00:45:54 2002 -+++ audacity-src-1.1.0-timestretch/src/Makefile.in Sat Aug 10 01:16:52 2002 -@@ -77,6 +77,8 @@ - $(OBJDIR)/effects/NoiseRemoval.o \ - $(OBJDIR)/effects/Phaser.o \ - $(OBJDIR)/effects/Reverse.o \ -+ $(OBJDIR)/effects/smsPitchScale.o \ -+ $(OBJDIR)/effects/TimeStretch.o \ - $(OBJDIR)/effects/Wahwah.o \ - $(OBJDIR)/export/Export.o \ - $(OBJDIR)/export/ExportMP3.o \ -diff -urNb audacity-src-1.1.0/src/effects/LoadEffects.cpp audacity-src-1.1.0-timestretch/src/effects/LoadEffects.cpp ---- audacity-src-1.1.0/src/effects/LoadEffects.cpp Wed Jun 5 00:45:54 2002 -+++ audacity-src-1.1.0-timestretch/src/effects/LoadEffects.cpp Sat Aug 10 01:17:56 2002 -@@ -22,6 +22,7 @@ - #include "NoiseRemoval.h" - #include "Phaser.h" - #include "Reverse.h" -+#include "TimeStretch.h" - #include "Wahwah.h" - - #ifdef USE_WAVELET -@@ -53,6 +54,7 @@ - Effect::RegisterEffect(new EffectNoiseRemoval(), false); - Effect::RegisterEffect(new EffectPhaser(), false); - Effect::RegisterEffect(new EffectReverse(), false); -+ Effect::RegisterEffect(new EffectTimeStretch(), false); - Effect::RegisterEffect(new EffectWahwah(), false); - - #ifdef USE_WAVELET -diff -urNb audacity-src-1.1.0/src/effects/TimeStretch.cpp audacity-src-1.1.0-timestretch/src/effects/TimeStretch.cpp ---- audacity-src-1.1.0/src/effects/TimeStretch.cpp Wed Dec 31 16:00:00 1969 -+++ audacity-src-1.1.0-timestretch/src/effects/TimeStretch.cpp Sat Aug 10 01:17:12 2002 -@@ -0,0 +1,137 @@ -+/********************************************************************** -+ -+ Audacity: A Digital Audio Editor -+ -+ TimeStretch.cpp -+ -+ Doug Hoyte -+ -+ This class is able to stretch a selection, making it take up more or -+ less time. -+ -+**********************************************************************/ -+ -+ -+#include <wx/generic/textdlgg.h> -+#include <wx/intl.h> -+ -+#include "TimeStretch.h" -+#include "smsPitchScale.h" -+#include "../WaveTrack.h" -+ -+// -+// EffectTimeStretch -+// -+ -+EffectTimeStretch::EffectTimeStretch() -+{ -+ ratio = 1.0; -+ pitchscale = false; -+} -+ -+ -+bool EffectTimeStretch::PromptUser() -+{ -+ wxString temp; -+ wxString title = _("TimeStretch by Doug Hoyte"); -+ wxString caption = _("Ratio (new length/orig length): "); -+ wxString default_value = wxString::Format("%f", ratio); -+ -+ ratio = 1.0; -+ pitchscale = false; -+ -+ temp = wxGetTextFromUser(caption, title, -+ default_value, mParent, -1, -1, TRUE); -+ if (temp == "") -+ return false; -+ while (sscanf((const char *) temp, "%f", &ratio) < 0) { -+ caption = _("Please enter a positive number for the ratio: "); -+ temp = wxGetTextFromUser(caption, title, -+ default_value, mParent, -1, -1, TRUE); -+ if (temp == "") -+ return false; -+ } -+ -+ caption = _("Do you want pitch scaling (EXPERIMENTAL)? (y/n): "); -+ default_value = wxString::Format("n"); -+ temp = wxGetTextFromUser(caption, title, -+ default_value, mParent, -1, -1, TRUE); -+ if (temp == "") -+ return false; -+ while (temp != "n" && temp != "y") { -+ caption = _("Please enter y or n for the pitch scaling: "); -+ temp = wxGetTextFromUser(caption, title, -+ default_value, mParent, -1, -1, TRUE); -+ if (temp == "") -+ return false; -+ } -+ -+ if (temp == "y") pitchscale = true; -+ else pitchscale = false; -+ -+ -+ return true; -+} -+ -+ -+ -+bool EffectTimeStretch::Process() -+{ -+ TrackListIterator iter(mWaveTracks); -+ VTrack *t = iter.First(); -+ int count = 0; -+ while(t) { -+ sampleCount start, len; -+ GetSamples((WaveTrack *)t, &start, &len); -+ bool success = ProcessOne(count, (WaveTrack *)t, start, len); -+ -+ if (!success) -+ return false; -+ -+ t = iter.Next(); -+ count++; -+ } -+ -+ return true; -+} -+ -+ -+ -+bool EffectTimeStretch::ProcessOne(int count, WaveTrack *t, -+ sampleCount base, sampleCount len) -+{ -+ int newlen=(int) (len*ratio) + 1; -+ double basesecs=0; -+ float *inbuf = new float[len]; -+ float *outbuf = new float[newlen]; -+ int i,nextloc,currloc=0; -+ -+ -+ if (ratio == 1) goto bail; -+ -+ basesecs = base / (t->GetRate()); -+ -+ t->Get(inbuf, base, len); -+ -+ for (i=0; i<len-1; i++) { -+ if (i%10000 == 0) TrackProgress(count, 2*i/(double)len); -+ nextloc = (int) (((float)i+1) * ratio); -+ for (; currloc < nextloc; currloc++) outbuf[currloc] = inbuf[i]; -+ outbuf[nextloc] = inbuf[i+1]; -+ } -+ -+ if (ratio > 1) t->InsertSilence(basesecs, (newlen-len)/(t->GetRate()) ); -+ if (ratio < 1) t->Clear(basesecs, basesecs+((len-newlen) / (t->GetRate())) ); -+ -+ -+ if (pitchscale == true) smsPitchScale(ratio, newlen, 2048, 4, t->GetRate(), outbuf, outbuf); -+ -+ t->Set(outbuf, base, newlen); -+ -+ bail: -+ -+ delete[] inbuf; -+ delete[] outbuf; -+ -+ return true; -+} -diff -urNb audacity-src-1.1.0/src/effects/TimeStretch.h audacity-src-1.1.0-timestretch/src/effects/TimeStretch.h ---- audacity-src-1.1.0/src/effects/TimeStretch.h Wed Dec 31 16:00:00 1969 -+++ audacity-src-1.1.0-timestretch/src/effects/TimeStretch.h Sat Aug 10 01:17:12 2002 -@@ -0,0 +1,62 @@ -+/********************************************************************** -+ -+ Audacity: A Digital Audio Editor -+ -+ TimeStretch.h -+ -+ Doug Hoyte -+ -+ This class is able to stretch a selection, making it take up more or -+ less time. -+ -+**********************************************************************/ -+ -+#ifndef __AUDACITY_EFFECT_TIMESTRETCH__ -+#define __AUDACITY_EFFECT_TIMESTRETCH__ -+ -+class wxString; -+ -+#include <wx/checkbox.h> -+#include <wx/button.h> -+#include <wx/dialog.h> -+#include <wx/stattext.h> -+#include <wx/slider.h> -+#include <wx/textctrl.h> -+#include <wx/sizer.h> -+#include <wx/intl.h> -+ -+#include "Effect.h" -+#include "smsPitchScale.h" -+ -+ -+ -+#define __UNINITIALIZED__ (-1) -+ -+class WaveTrack; -+ -+class EffectTimeStretch:public Effect { -+ -+ public: -+ EffectTimeStretch(); -+ -+ virtual wxString GetEffectName() { -+ return wxString(_("TimeStretch")); -+ } -+ -+ virtual wxString GetEffectAction() { -+ return wxString(_("Stretching Time")); -+ } -+ -+ virtual bool PromptUser(); -+ -+ virtual bool Process(); -+ -+ private: -+ bool ProcessOne(int count, WaveTrack * t, sampleCount start, sampleCount len); -+ -+ -+ float ratio; -+ bool pitchscale; -+}; -+ -+#endif -diff -urNb audacity-src-1.1.0/src/effects/smsPitchScale.cpp audacity-src-1.1.0-timestretch/src/effects/smsPitchScale.cpp ---- audacity-src-1.1.0/src/effects/smsPitchScale.cpp Wed Dec 31 16:00:00 1969 -+++ audacity-src-1.1.0-timestretch/src/effects/smsPitchScale.cpp Sat Aug 10 01:17:18 2002 -@@ -0,0 +1,280 @@ -+/**************************************************************************** -+* -+* NAME: smsPitchScale.cpp -+* VERSION: 1.01 -+* HOME URL: http://www.dspdimension.com -+* KNOWN BUGS: none -+* -+* SYNOPSIS: Routine for doing pitch scaling while maintaining -+* duration using the Short Time Fourier Transform. -+* -+* DESCRIPTION: The routine takes a pitchScale factor value which is between 0.5 -+* (one octave down) and 2. (one octave up). A value of exactly 1 does not change -+* the pitch. numSampsToProcess tells the routine how many samples in indata[0... -+* numSampsToProcess-1] should be pitch scaled and moved to outdata[0 ... -+* numSampsToProcess-1]. The two buffers can be identical (ie. it can process the -+* data in-place). fftFrameSize defines the FFT frame size used for the -+* processing. Typical values are 1024, 2048 and 4096. It may be any value <= -+* MAX_FFT_FRAME_LENGTH but it MUST be a power of 2. osamp is the STFT -+* oversampling factor which also determines the overlap between adjacent STFT -+* frames. It should at least be 4 for moderate scaling ratios. A value of 32 is -+* recommended for best quality. sampleRate takes the sample rate for the signal -+* in unit Hz, ie. 44100 for 44.1 kHz audio. The data passed to the routine in -+* indata[] should be in the range [-1.0, 1.0), which is also the output range -+* for the data. -+* -+* COPYRIGHT 1999 Stephan M. Sprenger <sms@dspdimension.com> -+* -+* The Wide Open License (WOL) -+* -+* Permission to use, copy, modify, distribute and sell this software and its -+* documentation for any purpose is hereby granted without fee, provided that -+* the above copyright notice and this license appear in all source copies. -+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF -+* ANY KIND. See http://www.dspguru.com/wol.htm for more information. -+* -+*****************************************************************************/ -+ -+#include <string.h> -+#include <math.h> -+ -+#include "smsPitchScale.h" -+ -+ -+void smsPitchScale(float pitchScale, long numSampsToProcess, long fftFrameSize, long osamp, float sampleRate, float *indata, float *outdata) -+/* -+ Routine smsPitchScale(). See top of file for explanation -+ Purpose: doing pitch scaling while maintaining duration using the Short -+ Time Fourier Transform. -+ Author: (c)1999 Stephan M. Sprenger <sms@dspdimension.com> -+*/ -+{ -+ -+ static float gInFIFO[MAX_FRAME_LENGTH]; -+ static float gOutFIFO[MAX_FRAME_LENGTH]; -+ static float gFFTworksp[2*MAX_FRAME_LENGTH]; -+ static float gLastPhase[MAX_FRAME_LENGTH/2]; -+ static float gSumPhase[MAX_FRAME_LENGTH/2]; -+ static float gOutputAccum[2*MAX_FRAME_LENGTH]; -+ static float gAnaFreq[MAX_FRAME_LENGTH]; -+ static float gAnaMagn[MAX_FRAME_LENGTH]; -+ static float gSynFreq[MAX_FRAME_LENGTH]; -+ static float gSynMagn[MAX_FRAME_LENGTH]; -+ static long gRover = false, gInit = false; -+ double magn, phase, tmp, window, real, imag; -+ double freqPerBin, expct, fadeZoneLen; -+ long i,k, qpd, index, inFifoLatency, stepSize, fftFrameSize2; -+ -+ /* set up some handy variables */ -+ fadeZoneLen = fftFrameSize/2; -+ fftFrameSize2 = fftFrameSize/2; -+ stepSize = fftFrameSize/osamp; -+ freqPerBin = sampleRate/(double)fftFrameSize; -+ expct = 2.*M_PI*(double)stepSize/(double)fftFrameSize; -+ inFifoLatency = fftFrameSize-stepSize; -+ if (gRover == false) gRover = inFifoLatency; -+ -+ /* initialize our static arrays */ -+ if (gInit == false) { -+ memset(gInFIFO, 0, MAX_FRAME_LENGTH*sizeof(float)); -+ memset(gOutFIFO, 0, MAX_FRAME_LENGTH*sizeof(float)); -+ memset(gFFTworksp, 0, 2*MAX_FRAME_LENGTH*sizeof(float)); -+ memset(gLastPhase, 0, MAX_FRAME_LENGTH*sizeof(float)/2); -+ memset(gSumPhase, 0, MAX_FRAME_LENGTH*sizeof(float)/2); -+ memset(gOutputAccum, 0, 2*MAX_FRAME_LENGTH*sizeof(float)); -+ memset(gAnaFreq, 0, MAX_FRAME_LENGTH*sizeof(float)); -+ memset(gAnaMagn, 0, MAX_FRAME_LENGTH*sizeof(float)); -+ gInit = true; -+ } -+ -+ /* main processing loop */ -+ for (i = 0; i < numSampsToProcess; i++){ -+ -+ /* As long as we have not yet collected enough data just read in */ -+ gInFIFO[gRover] = indata[i]; -+ outdata[i] = gOutFIFO[gRover-inFifoLatency]; -+ gRover++; -+ -+ /* now we have enough data for processing */ -+ if (gRover >= fftFrameSize) { -+ gRover = inFifoLatency; -+ -+ /* do windowing and re,im interleave */ -+ for (k = 0; k < fftFrameSize;k++) { -+ window = -.5*cos(2.*M_PI*(double)k/(double)fftFrameSize)+.5; -+ gFFTworksp[2*k] = gInFIFO[k] * window; -+ gFFTworksp[2*k+1] = 0.; -+ } -+ -+ -+ /* ***************** ANALYSIS ******************* */ -+ /* do transform */ -+ smsFft(gFFTworksp, fftFrameSize, -1); -+ -+ /* this is the analysis step */ -+ for (k = 0; k <= fftFrameSize2; k++) { -+ -+ /* de-interlace FFT buffer */ -+ real = gFFTworksp[2*k]; -+ imag = gFFTworksp[2*k+1]; -+ -+ /* compute magnitude and phase */ -+ magn = 2.*sqrt(real*real + imag*imag); -+ phase = atan2(imag,real); -+ -+ /* compute phase difference */ -+ tmp = phase - gLastPhase[k]; -+ gLastPhase[k] = phase; -+ -+ /* subtract expected phase difference */ -+ tmp -= (double)k*expct; -+ -+ /* map delta phase into +/- Pi interval */ -+ qpd = (long int) (tmp/M_PI); -+ if (qpd >= 0) qpd += qpd&1; -+ else qpd -= qpd&1; -+ tmp -= M_PI*(double)qpd; -+ -+ /* get deviation from bin frequency from the +/- Pi interval */ -+ tmp = osamp*tmp/(2.*M_PI); -+ -+ /* compute the k-th partials' true frequency */ -+ tmp = (double)k*freqPerBin + tmp*freqPerBin; -+ -+ /* store magnitude and true frequency in analysis arrays */ -+ gAnaMagn[k] = magn; -+ gAnaFreq[k] = tmp; -+ -+ } -+ -+ -+ -+ /* ***************** PROCESSING ******************* */ -+ /* this does the actual pitch scaling */ -+ memset(gSynMagn, 0, fftFrameSize*sizeof(float)); -+ memset(gSynFreq, 0, fftFrameSize*sizeof(float)); -+ for (k = 0; k <= fftFrameSize2; k++) { -+ index = (long int) (k/pitchScale); -+ if (index <= fftFrameSize2) { -+ /* new bin overrides existing if magnitude is higher */ -+ if (gAnaMagn[index] > gSynMagn[k]) { -+ gSynMagn[k] = gAnaMagn[index]; -+ gSynFreq[k] = gAnaFreq[index] * pitchScale; -+ } -+ /* fill empty bins with nearest neighbour */ -+ if ((gSynFreq[k] == 0.) && (k > 0)) { -+ gSynFreq[k] = gSynFreq[k-1]; -+ gSynMagn[k] = gSynMagn[k-1]; -+ } -+ } -+ } -+ -+ -+ /* ***************** SYNTHESIS ******************* */ -+ /* this is the synthesis step */ -+ for (k = 0; k <= fftFrameSize2; k++) { -+ -+ /* get magnitude and true frequency from synthesis arrays */ -+ magn = gSynMagn[k]; -+ tmp = gSynFreq[k]; -+ -+ /* subtract bin mid frequency */ -+ tmp -= (double)k*freqPerBin; -+ -+ /* get bin deviation from freq deviation */ -+ tmp /= freqPerBin; -+ -+ /* take osamp into account */ -+ tmp = 2.*M_PI*tmp/osamp; -+ -+ /* add the overlap phase advance back in */ -+ tmp += (double)k*expct; -+ -+ /* accumulate delta phase to get bin phase */ -+ gSumPhase[k] += tmp; -+ phase = gSumPhase[k]; -+ -+ /* get real and imag part and re-interleave */ -+ gFFTworksp[2*k] = magn*cos(phase); -+ gFFTworksp[2*k+1] = magn*sin(phase); -+ } -+ -+ /* zero negative frequencies */ -+ for (k = fftFrameSize+2; k < 2*fftFrameSize; k++) gFFTworksp[k] = 0.; -+ -+ /* do inverse transform */ -+ smsFft(gFFTworksp, fftFrameSize, 1); -+ -+ /* do windowing and add to output accumulator */ -+ for(k=0; k < fftFrameSize; k++) { -+ window = -.5*cos(2.*M_PI*(double)k/(double)fftFrameSize)+.5; -+ gOutputAccum[k] += 2.*window*gFFTworksp[2*k]/(fftFrameSize2*osamp); -+ } -+ for (k = 0; k < stepSize; k++) gOutFIFO[k] = gOutputAccum[k]; -+ -+ /* shift accumulator */ -+ memmove(gOutputAccum, gOutputAccum+stepSize, fftFrameSize*sizeof(float)); -+ -+ /* move input FIFO */ -+ for (k = 0; k < inFifoLatency; k++) gInFIFO[k] = gInFIFO[k+stepSize]; -+ } -+ } -+} -+ -+ -+ -+void smsFft(float *fftBuffer, long fftFrameSize, long sign) -+/* -+ FFT routine, (C)1996 S.M.Sprenger. Sign = -1 is FFT, 1 is iFFT (inverse) -+ Fills fftBuffer[0...2*fftFrameSize-1] with the Fourier transform of the -+ time domain data in fftBuffer[0...2*fftFrameSize-1]. The FFT array takes -+ and returns the cosine and sine parts in an interleaved manner, ie. -+ fftBuffer[0] = cosPart[0], fftBuffer[1] = sinPart[0], asf. fftFrameSize -+ must be a power of 2. It expects a complex input signal (see footnote 2), -+ ie. when working with 'common' audio signals our input signal has to be -+ passed as {in[0],0.,in[1],0.,in[2],0.,...} asf. In that case, the transform -+ of the frequencies of interest is in fftBuffer[0...fftFrameSize]. -+*/ -+{ -+ float wr, wi, arg, *p1, *p2, temp; -+ float tr, ti, ur, ui, *p1r, *p1i, *p2r, *p2i; -+ long i, bitm, j, le, le2, k; -+ -+ for (i = 2; i < 2*fftFrameSize-2; i += 2) { -+ for (bitm = 2, j = 0; bitm < 2*fftFrameSize; bitm <<= 1) { -+ if (i & bitm) j++; -+ j <<= 1; -+ } -+ if (i < j) { -+ p1 = fftBuffer+i; p2 = fftBuffer+j; -+ temp = *p1; *(p1++) = *p2; -+ *(p2++) = temp; temp = *p1; -+ *p1 = *p2; *p2 = temp; -+ } -+ } -+ for (k = 0, le = 2; k < log(fftFrameSize)/log(2.); k++) { -+ le <<= 1; -+ le2 = le>>1; -+ ur = 1.0; -+ ui = 0.0; -+ arg = M_PI / (le2>>1); -+ wr = cos(arg); -+ wi = sign*sin(arg); -+ for (j = 0; j < le2; j += 2) { -+ p1r = fftBuffer+j; p1i = p1r+1; -+ p2r = p1r+le2; p2i = p2r+1; -+ for (i = j; i < 2*fftFrameSize; i += le) { -+ tr = *p2r * ur - *p2i * ui; -+ ti = *p2r * ui + *p2i * ur; -+ *p2r = *p1r - tr; *p2i = *p1i - ti; -+ *p1r += tr; *p1i += ti; -+ p1r += le; p1i += le; -+ p2r += le; p2i += le; -+ } -+ tr = ur*wr - ui*wi; -+ ui = ur*wi + ui*wr; -+ ur = tr; -+ } -+ } -+} -+ -diff -urNb audacity-src-1.1.0/src/effects/smsPitchScale.h audacity-src-1.1.0-timestretch/src/effects/smsPitchScale.h ---- audacity-src-1.1.0/src/effects/smsPitchScale.h Wed Dec 31 16:00:00 1969 -+++ audacity-src-1.1.0-timestretch/src/effects/smsPitchScale.h Sat Aug 10 01:17:18 2002 -@@ -0,0 +1,33 @@ -+/********************************************************************** -+ -+ Audacity: A Digital Audio Editor -+ -+ smsPitchScale.cpp -+ -+ Doug Hoyte -+ -+ These functions are used by the TimeStretch class in order to provide -+ pitch scaling. Parts of these functions may have been modified by me. -+ -+ smsPitchScale.cpp and smsPitchScale.h are... -+ -+* COPYRIGHT 1999 Stephan M. Sprenger <sms@dspdimension.com> -+* -+* The Wide Open License (WOL) -+* -+* Permission to use, copy, modify, distribute and sell this software and its -+* documentation for any purpose is hereby granted without fee, provided that -+* the above copyright notice and this license appear in all source copies. -+* THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY OF -+* ANY KIND. See http://www.dspguru.com/wol.htm for more information. -+* -+*****************************************************************************/ -+ -+ -+#define M_PI 3.14159265358979323846 -+#define MAX_FRAME_LENGTH 8192 -+ -+void smsFft(float *fftBuffer, long fftFrameSize, long sign); -+ -+void smsPitchScale(float pitchScale, long numSampsToProcess, long fftFrameSize, -+long osamp, float sampleRate, float *indata, float *outdata); diff --git a/media-sound/audacity/files/digest-audacity-1.1.1 b/media-sound/audacity/files/digest-audacity-1.1.1 deleted file mode 100644 index e2f6eff266dd..000000000000 --- a/media-sound/audacity/files/digest-audacity-1.1.1 +++ /dev/null @@ -1 +0,0 @@ -MD5 70ffc1f9b076bccd4892148a87a24502 audacity-src-1.1.1.tgz 2310533 diff --git a/media-sound/audacity/files/digest-audacity-1.1.1-r1 b/media-sound/audacity/files/digest-audacity-1.1.1-r1 deleted file mode 100644 index 4880d8bb2f2d..000000000000 --- a/media-sound/audacity/files/digest-audacity-1.1.1-r1 +++ /dev/null @@ -1 +0,0 @@ -MD5 8fd7fc8ccc06b51ab3244a574dc0f3a9 audacity-src-1.1.1-3.tgz 2310873 diff --git a/media-sound/audacity/files/id3lib-3.8.0-gcc3.patch b/media-sound/audacity/files/id3lib-3.8.0-gcc3.patch deleted file mode 100644 index 12c8bc5ab37a..000000000000 --- a/media-sound/audacity/files/id3lib-3.8.0-gcc3.patch +++ /dev/null @@ -1,97 +0,0 @@ ---- include/id3/id3lib_strings.h.orig 2002-08-21 16:41:11.000000000 -0600 -+++ include/id3/id3lib_strings.h 2002-08-21 16:40:32.000000000 -0600 -@@ -30,6 +30,94 @@ - - #include <string> - -+#if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000)) -+namespace std -+{ -+ template<> -+ struct char_traits<unsigned char> -+ { -+ typedef unsigned char char_type; -+ // Unsigned as wint_t in unsigned. -+ typedef unsigned long int_type; -+ typedef streampos pos_type; -+ typedef streamoff off_type; -+ typedef mbstate_t state_type; -+ -+ static void -+ assign(char_type& __c1, const char_type& __c2) -+ { __c1 = __c2; } -+ -+ static bool -+ eq(const char_type& __c1, const char_type& __c2) -+ { return __c1 == __c2; } -+ -+ static bool -+ lt(const char_type& __c1, const char_type& __c2) -+ { return __c1 < __c2; } -+ -+ static int -+ compare(const char_type* __s1, const char_type* __s2, size_t __n) -+ { -+ for (size_t __i = 0; __i < __n; ++__i) -+ if (!eq(__s1[__i], __s2[__i])) -+ return lt(__s1[__i], __s2[__i]) ? -1 : 1; -+ return 0; -+ } -+ -+ static size_t -+ length(const char_type* __s) -+ { -+ const char_type* __p = __s; -+ while (__p) -+ ++__p; -+ return (__p - __s); -+ } -+ -+ static const char_type* -+ find(const char_type* __s, size_t __n, const char_type& __a) -+ { -+ for (const char_type* __p = __s; size_t(__p - __s) < __n; ++__p) -+ if (*__p == __a) return __p; -+ return 0; -+ } -+ -+ static char_type* -+ move(char_type* __s1, const char_type* __s2, size_t __n) -+ { return (char_type*) memmove(__s1, __s2, __n * sizeof(char_type)); } -+ -+ static char_type* -+ copy(char_type* __s1, const char_type* __s2, size_t __n) -+ { return (char_type*) memcpy(__s1, __s2, __n * sizeof(char_type)); } -+ -+ static char_type* -+ assign(char_type* __s, size_t __n, char_type __a) -+ { -+ for (char_type* __p = __s; __p < __s + __n; ++__p) -+ assign(*__p, __a); -+ return __s; -+ } -+ -+ static char_type -+ to_char_type(const int_type& __c) -+ { return char_type(); } -+ -+ static int_type -+ to_int_type(const char_type& __c) { return int_type(); } -+ -+ static bool -+ eq_int_type(const int_type& __c1, const int_type& __c2) -+ { return __c1 == __c2; } -+ -+ static int_type -+ eof() { return static_cast<int_type>(-1); } -+ -+ static int_type -+ not_eof(const int_type& __c) -+ { return eq_int_type(__c, eof()) ? int_type(0) : __c; } -+ }; -+} // namespace std -+#endif -+ - namespace dami - { - typedef std::basic_string<char> String; diff --git a/media-sound/audacity/files/mono_mp3_export.patch b/media-sound/audacity/files/mono_mp3_export.patch deleted file mode 100644 index 18bed1aeeb09..000000000000 --- a/media-sound/audacity/files/mono_mp3_export.patch +++ /dev/null @@ -1,150 +0,0 @@ -diff -ru audacity-src-1.1.1-3/src/export/ExportMP3.cpp /var/tmp/portage/audacity-1.1.1/work/audacity-src-1.1.1-3/src/export/ExportMP3.cpp ---- audacity-src-1.1.1-3/src/export/ExportMP3.cpp 2002-11-11 00:58:21.000000000 -0600 -+++ /var/tmp/portage/audacity-1.1.1/work/audacity-src-1.1.1-3/src/export/ExportMP3.cpp 2003-01-15 00:30:29.000000000 -0600 -@@ -190,6 +190,7 @@ - /* function pointers to the symbols we get from the library */ - lame_init_t* lame_init; - lame_init_params_t* lame_init_params; -+ lame_encode_buffer_t* lame_encode_buffer; - lame_encode_buffer_interleaved_t* lame_encode_buffer_interleaved; - lame_encode_flush_t* lame_encode_flush; - lame_close_t* lame_close; -@@ -259,6 +260,10 @@ - "get_lame_version"); - lame_init_params = - (lame_init_params_t *) wxDllLoader::GetSymbol(libHandle, "lame_init_params"); -+ -+ lame_encode_buffer = -+ (lame_encode_buffer_t *) wxDllLoader::GetSymbol(libHandle, -+ "lame_encode_buffer"); - lame_encode_buffer_interleaved = - (lame_encode_buffer_interleaved_t *) wxDllLoader::GetSymbol(libHandle, - "lame_encode_buffer_interleaved"); -@@ -294,6 +299,7 @@ - if (!lame_init || - !get_lame_version || - !lame_init_params || -+ !lame_encode_buffer || - !lame_encode_buffer_interleaved || - !lame_encode_flush || - !lame_close || -@@ -346,6 +352,22 @@ - mOutBufferSize); - } - -+ -+ -+ int EncodeBufferMono(short int inbuffer[], unsigned char outbuffer[]) { -+ if(!mEncoding) return -1; -+ -+ return lame_encode_buffer(mGF, inbuffer,inbuffer, mSamplesPerChunk, -+ outbuffer, mOutBufferSize); -+ } -+ -+ int EncodeRemainderMono(short int inbuffer[], int nSamples, -+ unsigned char outbuffer[]) { -+ return lame_encode_buffer(mGF, inbuffer, inbuffer, nSamples, outbuffer, -+ mOutBufferSize); -+ } -+ -+ - int FinishStream(unsigned char outbuffer[]) { - mEncoding = false; - int result = lame_encode_flush(mGF, outbuffer, mOutBufferSize); -@@ -425,6 +447,7 @@ - /* function pointers to the symbols we get from the library */ - lame_init_t* lame_init; - lame_init_params_t* lame_init_params; -+ lame_encode_buffer_t* lame_encode_buffer; - lame_encode_buffer_interleaved_t* lame_encode_buffer_interleaved; - lame_encode_flush_t* lame_encode_flush; - lame_close_t* lame_close; -@@ -556,6 +579,10 @@ - FindSymbol(connID, name, &mainAddr, &symClass); - lame_encode_buffer_interleaved = NewMachOFromCFM(mainAddr); - -+ MakePString(name, "lame_encode_buffer"); -+ FindSymbol(connID, name, &mainAddr, &symClass); -+ lame_encode_buffer = NewMachOFromCFM(mainAddr); -+ - MakePString(name, "lame_encode_flush"); - FindSymbol(connID, name, &mainAddr, &symClass); - lame_encode_flush = NewMachOFromCFM(mainAddr); -@@ -594,6 +621,7 @@ - if (!lame_init || - !get_lame_version || - !lame_init_params || -+ !lame_encode_buffer || - !lame_encode_buffer_interleaved || - !lame_encode_flush || - !lame_close || -@@ -636,7 +664,7 @@ - int EncodeBuffer(short int inbuffer[], unsigned char outbuffer[]) { - if(!mEncoding) return -1; - -- return lame_encode_buffer_interleaved(mGF, inbuffer, mSamplesPerChunk, -+ return lame_encode_buffer_interleaved(mGF, inbuffer, inbuffer, mSamplesPerChunk, - outbuffer, mOutBufferSize); - } - -@@ -646,6 +674,19 @@ - mOutBufferSize); - } - -+ int EncodeBufferMono(short int inbuffer[], unsigned char outbuffer[]) { -+ if(!mEncoding) return -1; -+ -+ return lame_encode_buffer(mGF, inbuffer, inbuffer, mSamplesPerChunk, -+ outbuffer, mOutBufferSize); -+ } -+ -+ int EncodeRemainderMono(short int inbuffer[], int nSamples, -+ unsigned char outbuffer[]) { -+ return lame_encode_buffer(mGF, inbuffer, inbuffer , inbuffer, nSamples, outbuffer, -+ mOutBufferSize); -+ } -+ - int FinishStream(unsigned char outbuffer[]) { - mEncoding = false; - int result = lame_encode_flush(mGF, outbuffer, mOutBufferSize); -@@ -1285,9 +1326,22 @@ - short *mixed = (short *)mixer->GetBuffer(); - - if(lastFrame) -- bytes = GetMP3Exporter()->EncodeRemainder(mixed, numSamples, buffer); -- else -- bytes = GetMP3Exporter()->EncodeBuffer(mixed, buffer); -+ -+ if (stereo) { -+ bytes = GetMP3Exporter()->EncodeRemainder(mixed, numSamples , buffer); -+ } -+ else{ -+ bytes = GetMP3Exporter()->EncodeRemainderMono(mixed, numSamples , buffer); -+ } -+ else { -+ -+ if (stereo) { -+ bytes = GetMP3Exporter()->EncodeBuffer(mixed, buffer); -+ } -+ else { -+ bytes = GetMP3Exporter()->EncodeBufferMono(mixed, buffer); -+ } -+ } - - outFile.Write(buffer, bytes); - -diff -ru audacity-src-1.1.1-3/src/export/ExportMP3.h /var/tmp/portage/audacity-1.1.1/work/audacity-src-1.1.1-3/src/export/ExportMP3.h ---- audacity-src-1.1.1-3/src/export/ExportMP3.h 2002-11-11 00:58:21.000000000 -0600 -+++ /var/tmp/portage/audacity-1.1.1/work/audacity-src-1.1.1-3/src/export/ExportMP3.h 2003-01-15 00:30:29.000000000 -0600 -@@ -38,6 +38,11 @@ - virtual int EncodeBuffer(short int inbuffer[], unsigned char outbuffer[]) = 0; - virtual int EncodeRemainder(short int inbuffer[], int nSamples, - unsigned char outbuffer[]) = 0; -+ -+ virtual int EncodeBufferMono(short int inbuffer[], unsigned char outbuffer[]) = 0; -+ virtual int EncodeRemainderMono(short int inbuffer[], int nSamples, -+ unsigned char outbuffer[]) = 0; -+ - virtual int FinishStream(unsigned char outbuffer[]) = 0; - virtual void CancelEncoding() = 0; - |