diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-12-06 11:37:06 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-12-06 11:37:06 +0000 |
commit | 389f48d169226d726b358e554476f06baa37be74 (patch) | |
tree | 6a13aee3c0ec01e8731e2061f4d1a68030fd3084 | |
parent | 302d88d60448753be8755192716e77cefdfb1187 (diff) |
fix up shorter versions of coreaudio file format strings2.7.1
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@4296 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/SAE-de-nokeypad.bindings.in | 3 | ||||
-rw-r--r-- | libs/ardour/coreaudiosource.cc | 24 |
2 files changed, 20 insertions, 7 deletions
diff --git a/gtk2_ardour/SAE-de-nokeypad.bindings.in b/gtk2_ardour/SAE-de-nokeypad.bindings.in index f0799b2be0..27c824e5dd 100644 --- a/gtk2_ardour/SAE-de-nokeypad.bindings.in +++ b/gtk2_ardour/SAE-de-nokeypad.bindings.in @@ -9,6 +9,8 @@ (gtk_accel_path "<Actions>/Transport/ToggleRollForgetCapture" "<%PRIMARY%>period") (gtk_accel_path "<Actions>/Transport/record-roll" "<%PRIMARY%>space") +(gtk_accel_path "<Actions>/Common/ToggleOptionsEditor" "<%PRIMARY%>,") + (gtk_accel_path "<Actions>/Editor/align-regions-end" "<%PRIMARY%><%SECONDARY%>less") (gtk_accel_path "<Actions>/Editor/align-regions-end-relative" "<%PRIMARY%>less") (gtk_accel_path "<Actions>/Editor/align-regions-start" "<%LEVEL4%><%SECONDARY%>less") @@ -61,7 +63,6 @@ (gtk_accel_path "<Actions>/Editor/insert-region" "i") (gtk_accel_path "<Actions>/Editor/addExistingAudioFiles" "<%PRIMARY%>i") (gtk_accel_path "<Actions>/Editor/invert-selection" "<%TERTIARY%>i") -(gtk_accel_path "<Actions>/Common/ToggleOptionsEditor" "<%SECONDARY%>o") (gtk_accel_path "<Actions>/Main/Open" "<%PRIMARY%>o") (gtk_accel_path "<Actions>/Main/Recent" "<%PRIMARY%><%TERTIARY%>o") (gtk_accel_path "<Actions>/Editor/naturalize-region" "<%LEVEL4%>o") diff --git a/libs/ardour/coreaudiosource.cc b/libs/ardour/coreaudiosource.cc index 693be65035..a6aceb7842 100644 --- a/libs/ardour/coreaudiosource.cc +++ b/libs/ardour/coreaudiosource.cc @@ -19,6 +19,8 @@ */ #include <algorithm> +#define __STDC_FORMAT_MACROS +#include <inttypes.h> #include <pbd/error.h> #include <ardour/coreaudiosource.h> @@ -256,6 +258,8 @@ CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string& goto out; } + _info.format_name = ""; + if (absd.mFormatID == kAudioFormatLinearPCM) { if (absd.mFormatFlags & kAudioFormatFlagIsBigEndian) { _info.format_name += "big-endian"; @@ -264,17 +268,17 @@ CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string& } char buf[32]; - snprintf (buf, sizeof (buf), "%u bit", absd.mBitsPerChannel); + snprintf (buf, sizeof (buf), " %" PRIu32 " bit", absd.mBitsPerChannel); _info.format_name += buf; _info.format_name += '\n'; if (absd.mFormatFlags & kAudioFormatFlagIsFloat) { - _info.format_name += " float"; + _info.format_name += "float"; } else { if (absd.mFormatFlags & kAudioFormatFlagIsSignedInteger) { - _info.format_name += " signed"; + _info.format_name += "signed"; } else { - _info.format_name += " unsigned"; + _info.format_name += "unsigned"; } /* integer is typical, do not show it */ } @@ -302,8 +306,16 @@ CoreAudioSource::get_soundfile_info (string path, SoundFileInfo& _info, string& _info.format_name += "60958 AC3"; break; - case kAudioFormatMPEG: - _info.format_name += "MPEG"; + case kAudioFormatMPEGLayer1: + _info.format_name += "MPEG-1"; + break; + + case kAudioFormatMPEGLayer2: + _info.format_name += "MPEG-2"; + break; + + case kAudioFormatMPEGLayer3: + _info.format_name += "MPEG-3"; break; case kAudioFormatAppleIMA4: |