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
This commit is contained in:
Paul Davis 2010-07-22 02:27:06 +00:00
parent 448eb1acdd
commit a1bbbcb41b
8 changed files with 68 additions and 31 deletions

View file

@ -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); }
}