From d8c8ee30765d7620555aca8837e7662194c95032 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Sun, 19 Apr 2015 23:24:29 -0500 Subject: [PATCH] Added "WAV (Microsoft) float PCM" to the file types --- src/export/ExportPCM.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/export/ExportPCM.cpp b/src/export/ExportPCM.cpp index 483e80878..03ebb3be6 100644 --- a/src/export/ExportPCM.cpp +++ b/src/export/ExportPCM.cpp @@ -377,7 +377,18 @@ ExportPCM::ExportPCM() AddExtension(wavext,format); SetMaxChannels(si.channels - 1,format); - /* add GSM6.10 to list of formats at position 3 */ + /* add WAV float at position 3 */ + si.format = SF_FORMAT_WAV | SF_FORMAT_FLOAT; + for (si.channels = 1; sf_format_check(&si); si.channels++){}; + format = AddFormat() - 1; + SetFormat(wxT("WAV"),format); + SetCanMetaData(true,format); + SetDescription(_("WAV (Microsoft) float PCM"),format); + // we sorted out wavext near the begining + AddExtension(wavext,format); + SetMaxChannels(si.channels - 1,format); + + /* add GSM6.10 to list of formats at position 4 */ si.format = SF_FORMAT_WAV | SF_FORMAT_GSM610; for (si.channels = 1; sf_format_check(&si); si.channels++){}; format = AddFormat() - 1; @@ -423,7 +434,10 @@ int ExportPCM::Export(AudacityProject *project, case 2: // WAV sf_format = SF_FORMAT_WAV | SF_FORMAT_PCM_16; break; - case 3: + case 3: // WAV (float) + sf_format = SF_FORMAT_WAV | SF_FORMAT_FLOAT; + break; + case 4: sf_format = SF_FORMAT_WAV | SF_FORMAT_GSM610; break; default: // land here if supplied a sub-format that we don't know about