[Audacity-devel] Import 24/32 bit WAV, IEEE float WAV
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Nick L. <nj...@ec...> - 2002-06-16 04:40:38
|
Two changes are needed to make Audacity usable for a full range of WAV
files including IEEE float and 24-bit integer.
* Choose "Copy" not "Edit" in the preferences, the code for "Copy" is
mostly correct, whilst that for "Edit" is certainly broken
* Apply the patch below to tell libsndfile that Audacity prefers its
float values as +/- 1.0, rather than e.g. +/- 8 million
Fixing the "edit" import mode is more complex. It might be better
to disable it altogether for everything except 16bit integer and
IEEE float. Opinions ?
RCS file: /cvsroot/audacity/audacity-src/src/import/ImportPCM.cpp,v
retrieving revision 1.7
diff -u -r1.7 ImportPCM.cpp
--- src/import/ImportPCM.cpp 26 May 2002 06:18:47 -0000 1.7
+++ src/import/ImportPCM.cpp 16 Jun 2002 04:27:51 -0000
@@ -76,8 +76,10 @@
*numChannels = info.channels;
*channels = new WaveTrack*[*numChannels];
- if (info.pcmbitwidth > 16)
+ if (info.pcmbitwidth > 16) {
format = floatSample;
+ sf_command (fp, "norm float", (void *) "on", 0);
+ }
else
format = int16Sample;
|