1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-14 15:20:29 +02:00

fix clipping on export 24 bit signed pcm wav (bug 166)

This commit is contained in:
mchinen 2010-06-15 17:51:23 +00:00
parent dcb3dc656a
commit ff7c013f16

View File

@ -485,6 +485,8 @@ int ExportPCM::Export(AudacityProject *project,
// libsndfile can't (under Windows).
ODManager::LockLibSndFileMutex();
sf = sf_open_fd(f.fd(), SFM_WRITE, &info, FALSE);
//add clipping for integer formats. We allow floats to clip.
sf_command(sf, SFC_SET_CLIPPING, NULL,sf_subtype_is_integer(sf_format)?SF_TRUE:SF_FALSE) ;
ODManager::UnlockLibSndFileMutex();
}