1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-01 16:39:30 +02:00

Bug 46 - GSM 6.10 files cannot be exported - failure messages are unhelpful un-illuminating

This commit is contained in:
James Crook 2019-09-01 13:15:13 +01:00
parent 1a49d0a812
commit 844778797a

View File

@ -470,6 +470,18 @@ ProgressResult ExportPCM::Export(AudacityProject *project,
info.sections = 1;
info.seekable = 0;
// Bug 46. Trap here, as sndfile.c does not trap it properly.
if( (numChannels != 1) && ((sf_format & SF_FORMAT_SUBMASK) == SF_FORMAT_GSM610) )
{
AudacityMessageBox(_("GSM 6.10 requires mono"));
return ProgressResult::Cancelled;
}
if( sf_format == SF_FORMAT_WAVEX + SF_FORMAT_GSM610){
AudacityMessageBox( _("WAVEX and GSM 6.10 formats are not compatible") );
return ProgressResult::Cancelled;
}
// If we can't export exactly the format they requested,
// try the default format for that header type...
if (!sf_format_check(&info))