Re: audio/audacity still does not compile due to issues with soundtouch

2013-03-05 Thread Dimitry Andric

On 2013-03-05 06:06, Joseph A. Nagy, Jr wrote:

On 03/04/13 22:42, Joseph A. Nagy, Jr wrote:

I am still having issues with Audacity trying to compile in soundtouch
plugins. Is this an issue with the port (there is no config option to
disable this behavior) or is it an upstream issue?


Full error messages follow:
effects/SoundTouchEffect.cpp:209:31: error: cannot initialize a
parameter of type 'const SAMPLETYPE *'
(aka 'const short *') with an lvalue of type 'float *'
mSoundTouch-putSamples(buffer, block);
^~
/usr/local/include/soundtouch/SoundTouch.h:237:31: note: passing
argument to parameter 'samples' here
  const SAMPLETYPE *samples,  /// Pointer to sample buffer.
^


It looks like you have configured the Soundtouch port with the
INTEGER_SAMPLES option.  In that case, Soundtouch defines SAMPLETYPE to
short, and apparently Audacity is hardcoded to expect float samples
instead.

Maybe this should be reported to Audacity, but I can imagine they would
say Soundtouch must be configured with float samples. :-)
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: audio/audacity still does not compile due to issues with soundtouch

2013-03-05 Thread Joseph A. Nagy, Jr

On 03/05/13 05:59, Dimitry Andric wrote:

On 2013-03-05 06:06, Joseph A. Nagy, Jr wrote:

On 03/04/13 22:42, Joseph A. Nagy, Jr wrote:

I am still having issues with Audacity trying to compile in soundtouch
plugins. Is this an issue with the port (there is no config option to
disable this behavior) or is it an upstream issue?


Full error messages follow:
effects/SoundTouchEffect.cpp:209:31: error: cannot initialize a
parameter of type 'const SAMPLETYPE *'
(aka 'const short *') with an lvalue of type 'float *'
mSoundTouch-putSamples(buffer, block);
^~
/usr/local/include/soundtouch/SoundTouch.h:237:31: note: passing
argument to parameter 'samples' here
  const SAMPLETYPE *samples,  /// Pointer to sample buffer.
^


It looks like you have configured the Soundtouch port with the
INTEGER_SAMPLES option.  In that case, Soundtouch defines SAMPLETYPE to
short, and apparently Audacity is hardcoded to expect float samples
instead.

Maybe this should be reported to Audacity, but I can imagine they would
say Soundtouch must be configured with float samples. :-)


I will report it to Audacity, right after I rebuild soundtouch w/o 
integer samples selected as an option.


--
Yours in Christ,

Joseph A Nagy Jr
Whoever loves instruction loves knowledge, But he who hates correction
is stupid. -- Proverbs 12:1
Emails are not formal business letters, whatever businesses may want.
Original content CopyFree (F) under the OWL 
http://copyfree.org/licenses/owl/license.txt

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: audio/audacity still does not compile due to issues with soundtouch

2013-03-05 Thread Dimitry Andric

On 2013-03-05 13:03, Joseph A. Nagy, Jr wrote:

On 03/05/13 05:59, Dimitry Andric wrote:

On 2013-03-05 06:06, Joseph A. Nagy, Jr wrote:

On 03/04/13 22:42, Joseph A. Nagy, Jr wrote:

I am still having issues with Audacity trying to compile in soundtouch
plugins. Is this an issue with the port (there is no config option to
disable this behavior) or is it an upstream issue?


Full error messages follow:
effects/SoundTouchEffect.cpp:209:31: error: cannot initialize a
parameter of type 'const SAMPLETYPE *'
 (aka 'const short *') with an lvalue of type 'float *'
 mSoundTouch-putSamples(buffer, block);
 ^~
/usr/local/include/soundtouch/SoundTouch.h:237:31: note: passing
argument to parameter 'samples' here
   const SAMPLETYPE *samples,  /// Pointer to sample buffer.
 ^


It looks like you have configured the Soundtouch port with the
INTEGER_SAMPLES option.  In that case, Soundtouch defines SAMPLETYPE to
short, and apparently Audacity is hardcoded to expect float samples
instead.

Maybe this should be reported to Audacity, but I can imagine they would
say Soundtouch must be configured with float samples. :-)


I will report it to Audacity, right after I rebuild soundtouch w/o
integer samples selected as an option.


Joseph, can you please try out the attached diff for Audacity?

I have attempted to fix the assumption that samples are always in float
format, and Audacity now compiles and links, even if Soundtouch is
configured with the INTEGER_SAMPLES options.

However, I cannot currently test if this still properly works at
runtime.  Maybe you are able to run this on a test setup, and check if
the Soundtouch effects seem to work as expected.
Index: audio/audacity/files/patch-src__effects__SoundTouchEffect.cpp
===
--- audio/audacity/files/patch-src__effects__SoundTouchEffect.cpp	(revision 0)
+++ audio/audacity/files/patch-src__effects__SoundTouchEffect.cpp	(working copy)
@@ -0,0 +1,107 @@
+--- src/effects/SoundTouchEffect.cpp.orig	2013-01-18 16:50:47.0 +0100
 src/effects/SoundTouchEffect.cpp	2013-03-05 15:33:53.0 +0100
+@@ -24,6 +24,12 @@ effect that uses SoundTouch to do its pr
+ #include TimeWarper.h
+ #include ../NoteTrack.h
+ 
++#ifdef SOUNDTOUCH_FLOAT_SAMPLES
++#define soundtouchSample floatSample
++#else
++#define soundtouchSample int16Sample
++#endif
++
+ bool EffectSoundTouch::ProcessLabelTrack(Track *track)
+ {
+ //   SetTimeWarper(new RegionTimeWarper(mCurT0, mCurT1,
+@@ -189,7 +195,7 @@ bool EffectSoundTouch::ProcessOne(WaveTr
+
+//Initiate a processing buffer.  This buffer will (most likely)
+//be shorter than the length of the track being processed.
+-   float *buffer = new float[track-GetMaxBlockSize()];
++   SAMPLETYPE *buffer = new SAMPLETYPE[track-GetMaxBlockSize()];
+
+//Go through the track one buffer at a time. s counts which
+//sample the current buffer starts at.
+@@ -203,7 +209,7 @@ bool EffectSoundTouch::ProcessOne(WaveTr
+  block = end - s;
+   
+   //Get the samples from the track and put them in the buffer
+-  track-Get((samplePtr) buffer, floatSample, s, block);
++  track-Get((samplePtr) buffer, soundtouchSample, s, block);
+   
+   //Add samples to SoundTouch
+   mSoundTouch-putSamples(buffer, block);
+@@ -211,9 +217,9 @@ bool EffectSoundTouch::ProcessOne(WaveTr
+   //Get back samples from SoundTouch
+   unsigned int outputCount = mSoundTouch-numSamples();
+   if (outputCount  0) {
+- float *buffer2 = new float[outputCount];
++ SAMPLETYPE *buffer2 = new SAMPLETYPE[outputCount];
+  mSoundTouch-receiveSamples(buffer2, outputCount);
+- outputTrack-Append((samplePtr)buffer2, floatSample, outputCount);
++ outputTrack-Append((samplePtr)buffer2, soundtouchSample, outputCount);
+  delete[] buffer2;
+   }
+   
+@@ -230,9 +236,9 @@ bool EffectSoundTouch::ProcessOne(WaveTr
+
+unsigned int outputCount = mSoundTouch-numSamples();
+if (outputCount  0) {
+-  float *buffer2 = new float[outputCount];
++  SAMPLETYPE *buffer2 = new SAMPLETYPE[outputCount];
+   mSoundTouch-receiveSamples(buffer2, outputCount);
+-  outputTrack-Append((samplePtr)buffer2, floatSample, outputCount);
++  outputTrack-Append((samplePtr)buffer2, soundtouchSample, outputCount);
+   delete[] buffer2;
+}
+
+@@ -277,9 +283,9 @@ bool EffectSoundTouch::ProcessStereo(Wav
+// because Soundtouch wants them interleaved, i.e., each 
+// Soundtouch sample is left-right pair. 
+sampleCount maxBlockSize = leftTrack-GetMaxBlockSize();
+-   float* leftBuffer = new float[maxBlockSize];
+-   float* rightBuffer = new float[maxBlockSize];
+-   float* soundTouchBuffer = new float[maxBlockSize * 2];
++   SAMPLETYPE* leftBuffer = new SAMPLETYPE[maxBlockSize];
++   SAMPLETYPE* rightBuffer = 

Re: audio/audacity still does not compile due to issues with soundtouch

2013-03-05 Thread Joseph A. Nagy, Jr

On 03/05/13 09:13, Dimitry Andric wrote:
snip

Joseph, can you please try out the attached diff for Audacity?

I have attempted to fix the assumption that samples are always in float
format, and Audacity now compiles and links, even if Soundtouch is
configured with the INTEGER_SAMPLES options.

However, I cannot currently test if this still properly works at
runtime.  Maybe you are able to run this on a test setup, and check if
the Soundtouch effects seem to work as expected.


I sure will as the project I was running is on hiatus for now so I have 
some time to test. Thanks, I'll try to get back to you tonight.

--
Yours in Christ,

Joseph A Nagy Jr
Whoever loves instruction loves knowledge, But he who hates correction
is stupid. -- Proverbs 12:1
Emails are not formal business letters, whatever businesses may want.
Original content CopyFree (F) under the OWL 
http://copyfree.org/licenses/owl/license.txt

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: audio/audacity still does not compile due to issues with soundtouch

2013-03-04 Thread Jeffrey Bouquet


--- On Mon, 3/4/13, Joseph A. Nagy, Jr jnagyjr1...@gmail.com wrote:

having issues with Audacity trying to compile in soundtouch plugins. Is this 
an issue with the port (there is no config option to disable this behavior) or 
is it an upstream issue?
-- Yours in Christ,

Joseph A Nagy Jr


FWIW soundtouch has not built here for quite a while...
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: audio/audacity still does not compile due to issues with soundtouch

2013-03-04 Thread Joseph A. Nagy, Jr

On 03/04/13 22:56, Jeffrey Bouquet wrote:



--- On Mon, 3/4/13, Joseph A. Nagy, Jr jnagyjr1...@gmail.com
wrote:


having issues with Audacity trying to compile in soundtouch
plugins. Is this an issue with the port (there is no config option
to disable this behavior) or is it an upstream issue? -- Yours in
Christ,



Joseph A Nagy Jr



FWIW soundtouch has not built here for quite a while...

snip

I have it installed (installed it a while back iirc), it's just when
audacity tries to compile in whatever soundtouch-related libraries it
chokes up and dies a horrible, burning death.

--
Yours in Christ,

Joseph A Nagy Jr
Whoever loves instruction loves knowledge, But he who hates correction
is stupid. -- Proverbs 12:1
Emails are not formal business letters, whatever businesses may want.
Original content CopyFree (F) under the OWL
http://copyfree.org/licenses/owl/license.txt
___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org


Re: audio/audacity still does not compile due to issues with soundtouch

2013-03-04 Thread Joseph A. Nagy, Jr

On 03/04/13 22:42, Joseph A. Nagy, Jr wrote:

Maintainer cc'd

I am still having issues with Audacity trying to compile in soundtouch
plugins. Is this an issue with the port (there is no config option to
disable this behavior) or is it an upstream issue?


Full error messages follow:
effects/SoundTouchEffect.cpp:209:31: error: cannot initialize a 
parameter of type 'const SAMPLETYPE *'

  (aka 'const short *') with an lvalue of type 'float *'
  mSoundTouch-putSamples(buffer, block);
  ^~
/usr/local/include/soundtouch/SoundTouch.h:237:31: note: passing 
argument to parameter 'samples' here

const SAMPLETYPE *samples,  /// Pointer to sample buffer.
  ^
effects/SoundTouchEffect.cpp:215:23: error: no matching member function 
for call to 'receiveSamples'

 mSoundTouch-receiveSamples(buffer2, outputCount);
 ~^~
/usr/local/include/soundtouch/FIFOSamplePipe.h:190:18: note: candidate 
function not viable: no known conversion from

  'float *' to 'SAMPLETYPE *' (aka 'short *') for 1st argument;
virtual uint receiveSamples(SAMPLETYPE *outBuffer, /// Buffer 
where to copy output samples.

 ^
/usr/local/include/soundtouch/FIFOSamplePipe.h:203:18: note: candidate 
function not viable: requires 1 argument, but 2

  were provided
virtual uint receiveSamples(uint maxSamples   /// Remove this many 
samples from the beginning of pipe.

 ^
effects/SoundTouchEffect.cpp:234:20: error: no matching member function 
for call to 'receiveSamples'

  mSoundTouch-receiveSamples(buffer2, outputCount);
  ~^~
/usr/local/include/soundtouch/FIFOSamplePipe.h:190:18: note: candidate 
function not viable: no known conversion from

  'float *' to 'SAMPLETYPE *' (aka 'short *') for 1st argument;
virtual uint receiveSamples(SAMPLETYPE *outBuffer, /// Buffer 
where to copy output samples.

 ^
/usr/local/include/soundtouch/FIFOSamplePipe.h:203:18: note: candidate 
function not viable: requires 1 argument, but 2

  were provided
virtual uint receiveSamples(uint maxSamples   /// Remove this many 
samples from the beginning of pipe.

 ^
effects/SoundTouchEffect.cpp:307:31: error: cannot initialize a 
parameter of type 'const SAMPLETYPE *'

  (aka 'const short *') with an lvalue of type 'float *'
  mSoundTouch-putSamples(soundTouchBuffer, blockSize);
  ^~~~
/usr/local/include/soundtouch/SoundTouch.h:237:31: note: passing 
argument to parameter 'samples' here

const SAMPLETYPE *samples,  /// Pointer to sample buffer.
  ^
effects/SoundTouchEffect.cpp:373:17: error: no matching member function 
for call to 'receiveSamples'

   mSoundTouch-receiveSamples(outputSoundTouchBuffer, outputCount);
   ~^~
/usr/local/include/soundtouch/FIFOSamplePipe.h:190:18: note: candidate 
function not viable: no known conversion from

  'float *' to 'SAMPLETYPE *' (aka 'short *') for 1st argument;
virtual uint receiveSamples(SAMPLETYPE *outBuffer, /// Buffer 
where to copy output samples.

 ^
/usr/local/include/soundtouch/FIFOSamplePipe.h:203:18: note: candidate 
function not viable: requires 1 argument, but 2

  were provided
virtual uint receiveSamples(uint maxSamples   /// Remove this many 
samples from the beginning of pipe.

 ^
12 warnings and 5 errors generated.
gmake[1]: *** [effects/SoundTouchEffect.o] Error 1
gmake[1]: Leaving directory 
`/usr/ports/audio/audacity/work/audacity-src-2.0.3/src'

gmake: *** [audacity] Error 2
*** [do-build] Error code 1

Stop in /usr/ports/audio/audacity.
*** [build] Error code 1

Stop in /usr/ports/audio/audacity.

=== make failed for audio/audacity
=== Aborting update

Terminated

=== You can restart from the point of failure with this command line:
   portmaster flags audio/audacity

--
Yours in Christ,

Joseph A Nagy Jr
Whoever loves instruction loves knowledge, But he who hates correction
is stupid. -- Proverbs 12:1
Emails are not formal business letters, whatever businesses may want.
Original content CopyFree (F) under the OWL 
http://copyfree.org/licenses/owl/license.txt

___
freebsd-ports@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ports
To unsubscribe, send any mail to freebsd-ports-unsubscr...@freebsd.org