diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2007-07-16 21:44:14 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2007-07-16 21:44:14 +0000 |
commit | c0529df1a354d51911921b15acdb771707c44287 (patch) | |
tree | de09987cbd22d60b85dfd18155bb6b163264fb70 | |
parent | 21a260ebf46c9c57061b3319f81e8306c1a8f4af (diff) |
support for 16 bit native files
git-svn-id: svn://localhost/ardour2/branches/2.0-ongoing@2132 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | gtk2_ardour/ardour.menus | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui.cc | 3 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_ed.cc | 1 | ||||
-rw-r--r-- | gtk2_ardour/ardour_ui_options.cc | 7 | ||||
-rw-r--r-- | libs/ardour/ardour/types.h | 3 | ||||
-rw-r--r-- | libs/ardour/enums.cc | 1 | ||||
-rw-r--r-- | libs/ardour/session.cc | 4 | ||||
-rw-r--r-- | libs/ardour/sndfilesource.cc | 4 |
8 files changed, 23 insertions, 1 deletions
diff --git a/gtk2_ardour/ardour.menus b/gtk2_ardour/ardour.menus index b872a8d500..71a15a7bd3 100644 --- a/gtk2_ardour/ardour.menus +++ b/gtk2_ardour/ardour.menus @@ -247,6 +247,7 @@ <menu action='AudioFileFormatData'> <menuitem action='FileDataFormatFloat'/> <menuitem action='FileDataFormat24bit'/> + <menuitem action='FileDataFormat16bit'/> </menu> <menu action='AudioFileFormatHeader'> <menuitem action='FileHeaderFormatBWF'/> diff --git a/gtk2_ardour/ardour_ui.cc b/gtk2_ardour/ardour_ui.cc index 5022e6e6ee..c8a67ed7ec 100644 --- a/gtk2_ardour/ardour_ui.cc +++ b/gtk2_ardour/ardour_ui.cc @@ -2564,6 +2564,9 @@ ARDOUR_UI::use_config () case FormatInt24: act = ActionManager::get_action (X_("options"), X_("FileDataFormat24bit")); break; + case FormatInt16: + act = ActionManager::get_action (X_("options"), X_("FileDataFormat16bit")); + break; } if (act) { diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index 78c7a3dcf9..8ab8e6931a 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -476,6 +476,7 @@ ARDOUR_UI::install_actions () act = ActionManager::register_radio_action (option_actions, file_data_group, X_("FileDataFormatFloat"), X_("32-bit floating point"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_data_format), ARDOUR::FormatFloat)); act = ActionManager::register_radio_action (option_actions, file_data_group, X_("FileDataFormat24bit"), X_("24-bit signed integer"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_data_format), ARDOUR::FormatInt24)); + act = ActionManager::register_radio_action (option_actions, file_data_group, X_("FileDataFormat16bit"), X_("16-bit signed integer"), bind (mem_fun (*this, &ARDOUR_UI::set_native_file_data_format), ARDOUR::FormatInt16)); RadioAction::Group monitoring_group; diff --git a/gtk2_ardour/ardour_ui_options.cc b/gtk2_ardour/ardour_ui_options.cc index 813c615d39..4a6bef6b5f 100644 --- a/gtk2_ardour/ardour_ui_options.cc +++ b/gtk2_ardour/ardour_ui_options.cc @@ -135,6 +135,9 @@ ARDOUR_UI::set_native_file_data_format (SampleFormat sf) case FormatInt24: action = X_("FileDataFormat24bit"); break; + case FormatInt16: + action = X_("FileDataFormat16bit"); + break; default: fatal << string_compose (_("programming error: %1"), "illegal file data format in ::set_native_file_data_format") << endmsg; /*NOTREACHED*/ @@ -692,6 +695,10 @@ ARDOUR_UI::map_file_data_format () action = X_("FileDataFormat24bit"); break; + case FormatInt16: + action = X_("FileDataFormat16bit"); + break; + default: fatal << string_compose (_("programming error: unknown file data format passed to ARDOUR_UI::map_file_data_format: %1"), Config->get_native_file_data_format()) << endmsg; diff --git a/libs/ardour/ardour/types.h b/libs/ardour/ardour/types.h index 182172dff6..397575f087 100644 --- a/libs/ardour/ardour/types.h +++ b/libs/ardour/ardour/types.h @@ -315,7 +315,8 @@ namespace ARDOUR { enum SampleFormat { FormatFloat = 0, - FormatInt24 + FormatInt24, + FormatInt16 }; diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 5a4ee251b6..068aec654d 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -193,6 +193,7 @@ setup_enum_writer () REGISTER_ENUM (FormatFloat); REGISTER_ENUM (FormatInt24); + REGISTER_ENUM (FormatInt16); REGISTER (_SampleFormat); REGISTER_ENUM (BWF); diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 687fad4fec..0af1272c0a 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -3529,6 +3529,10 @@ Session::available_capture_duration () sample_bytes_on_disk = 3.0; break; + case FormatInt16: + sample_bytes_on_disk = 2.0; + break; + default: /* impossible, but keep some gcc versions happy */ fatal << string_compose (_("programming error: %1"), diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index 24647030ab..ed1378a723 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -122,6 +122,10 @@ SndFileSource::SndFileSource (Session& s, ustring path, SampleFormat sfmt, Heade case FormatInt24: fmt |= SF_FORMAT_PCM_24; break; + + case FormatInt16: + fmt |= SF_FORMAT_PCM_16; + break; } _info.channels = 1; |