X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fsndfile_helpers.cc;h=08c57bfec2703e8f881fe805c840e5e66d90168f;hb=6584a89c4eb5024fe89a15acd8e4fa4697e606be;hp=2e618e043bb3b5cba8f52a297ff9ab5a1f00373c;hpb=f4b5f4c72ee60b6f509e307c5bfd164108d1f30b;p=ardour.git diff --git a/libs/ardour/sndfile_helpers.cc b/libs/ardour/sndfile_helpers.cc index 2e618e043b..08c57bfec2 100644 --- a/libs/ardour/sndfile_helpers.cc +++ b/libs/ardour/sndfile_helpers.cc @@ -123,19 +123,19 @@ sndfile_data_width (int format) int tval = format & 0xf; switch (tval) { - case SF_FORMAT_PCM_S8: - case SF_FORMAT_PCM_U8: + case SF_FORMAT_PCM_S8: + case SF_FORMAT_PCM_U8: return 8; - case SF_FORMAT_PCM_16: + case SF_FORMAT_PCM_16: return 16; - case SF_FORMAT_PCM_24: + case SF_FORMAT_PCM_24: return 24; - case SF_FORMAT_PCM_32: + case SF_FORMAT_PCM_32: return 32; - case SF_FORMAT_FLOAT: - return 1; // heh, heh - default: - // we don't handle anything else within ardour + case SF_FORMAT_FLOAT: + return 1; /* ridiculous but used as a magic value */ + default: + // we don't handle anything else within ardour return 0; } }