diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2010-04-15 20:42:05 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2010-04-15 20:42:05 +0000 |
commit | dc815ea8e84d28fc01a68225c2ece4399c4a9c7e (patch) | |
tree | 27954a7b74ea3df1ca87d0ece20ad15a6f46f6be /libs/ardour/sndfilesource.cc | |
parent | d2beb38ea9fb39dbfb8667784bd248b32d171cbf (diff) |
forward-port from 2.X commits 5827-6000 including
git-svn-id: svn://localhost/ardour2/branches/3.0@6914 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r-- | libs/ardour/sndfilesource.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index fa709cde24..0ab55d160a 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -816,9 +816,15 @@ SndFileSource::get_soundfile_info (const ustring& path, SoundFileInfo& info, str info.samplerate = sf_info.samplerate; info.channels = sf_info.channels; info.length = sf_info.frames; - info.format_name = string_compose("Format: %1, %2", - sndfile_major_format(sf_info.format), - sndfile_minor_format(sf_info.format)); + + string major = sndfile_major_format(sf_info.format); + string minor = sndfile_minor_format(sf_info.format); + + if (major.length() + minor.length() < 16) { /* arbitrary */ + info.format_name = string_compose("%1/%2", major, minor); + } else { + info.format_name = string_compose("%1\n%2", major, minor); + } info.timecode = binfo.load_from_file (sf) ? binfo.get_time_reference() : 0; |