13
0

Handle SF_FORMAT_DOUBLE in sndfile_data_width

Many formats use ExportFormatBase::SF_Double which incorrectly would end
up in the default "we don't handle anything else within ardour" branch.

(It happened to work correctly anyway, since ExportGraphBuilder::SFC
handled the "magic" value 1 the same was as the "error" value 0.)

For correctness, use the "magic" value 1 for double.
This commit is contained in:
Mads Kiilerich 2022-10-13 17:15:42 +02:00 committed by Robin Gareus
parent 652a2aa3ac
commit 6fba7f6308

View File

@ -134,6 +134,7 @@ sndfile_data_width (int format)
case SF_FORMAT_PCM_32:
return 32;
case SF_FORMAT_FLOAT:
case SF_FORMAT_DOUBLE:
return 1; /* ridiculous but used as a magic value */
default:
// we don't handle anything else within ardour