summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfile_helpers.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-02-06 10:19:58 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-02-06 10:33:01 -0500
commit63a1b56560df7f56c8d25c93d0ffeb30997e9325 (patch)
treeba6caa599202d757899998ad295609c4c96fc231 /libs/ardour/sndfile_helpers.cc
parent6b9415aedb35d03561ef16d846f08bc0fc7c57c7 (diff)
fix (and comment) on subtle bug with audio file data width function
Diffstat (limited to 'libs/ardour/sndfile_helpers.cc')
-rw-r--r--libs/ardour/sndfile_helpers.cc15
1 files changed, 1 insertions, 14 deletions
diff --git a/libs/ardour/sndfile_helpers.cc b/libs/ardour/sndfile_helpers.cc
index 6a3ce248bc..08c57bfec2 100644
--- a/libs/ardour/sndfile_helpers.cc
+++ b/libs/ardour/sndfile_helpers.cc
@@ -133,26 +133,13 @@ sndfile_data_width (int format)
case SF_FORMAT_PCM_32:
return 32;
case SF_FORMAT_FLOAT:
- return 32;
+ return 1; /* ridiculous but used as a magic value */
default:
// we don't handle anything else within ardour
return 0;
}
}
-int
-sndfile_data_width (ARDOUR::SampleFormat format)
-{
- switch (format) {
- case ARDOUR::FormatInt16:
- return sndfile_data_width (SF_FORMAT_PCM_16);
- case ARDOUR::FormatInt24:
- return sndfile_data_width (SF_FORMAT_PCM_24);
- default:
- return sndfile_data_width (SF_FORMAT_FLOAT);
- }
-}
-
string
sndfile_major_format(int format)
{