diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-07-22 02:27:06 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-07-22 02:27:06 +0000 |
commit | a1bbbcb41b520c24b4e568eec0b0abcea6aee9ef (patch) | |
tree | d19b6059b4bbd962a2fb0344c6e55c78e2e27e57 /libs/ardour/utils.cc | |
parent | 448eb1acddbb4ac215f6b9ef4667b0befbe173a4 (diff) |
first part of using appropriate .ext extensions for the current chosen native file header format
git-svn-id: svn://localhost/ardour2/branches/3.0@7468 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r-- | libs/ardour/utils.cc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc index 2bfe16222d..abdba63803 100644 --- a/libs/ardour/utils.cc +++ b/libs/ardour/utils.cc @@ -509,6 +509,35 @@ string_is_affirmative (const std::string& str) return str == "1" || str == "y" || str == "Y" || (!g_strncasecmp(str.c_str(), "yes", str.length())); } +const char* +native_header_format_extension (HeaderFormat hf, const DataType& type) +{ + if (type == DataType::MIDI) { + return ".mid"; + } + + switch (hf) { + case BWF: + return ".wav"; + case WAVE: + return ".wav"; + case WAVE64: + return ".w64"; + case CAF: + return ".caf"; + case AIFF: + return ".aif"; + case iXML: + return ".ixml"; + case RF64: + return ".rf64"; + } + + fatal << string_compose (_("programming error: unknown native header format: %1"), hf); + /*NOTREACHED*/ + return ".wav"; +} + extern "C" { void c_stacktrace() { stacktrace (cerr); } } |