From 9a4fbfcdfe0db5eade0a2bd77fe62c5ffa73103d Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 8 Oct 2012 19:45:25 +0000 Subject: [PATCH] add 8kHz as an available export format sample rate git-svn-id: svn://localhost/ardour2/branches/3.0@13214 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/ardour/export_format_base.h | 1 + libs/ardour/enums.cc | 1 + libs/ardour/export_format_base.cc | 2 +- libs/ardour/export_format_manager.cc | 1 + libs/ardour/export_format_specification.cc | 3 +++ libs/ardour/export_formats.cc | 1 + 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/libs/ardour/ardour/export_format_base.h b/libs/ardour/ardour/export_format_base.h index 46b44e2252..a96d1148fc 100644 --- a/libs/ardour/ardour/export_format_base.h +++ b/libs/ardour/ardour/export_format_base.h @@ -94,6 +94,7 @@ class ExportFormatBase { enum SampleRate { SR_None = 0, SR_Session = 1, + SR_8 = 8000, SR_22_05 = 220500, SR_44_1 = 44100, SR_48 = 48000, diff --git a/libs/ardour/enums.cc b/libs/ardour/enums.cc index 961041c2da..b291372503 100644 --- a/libs/ardour/enums.cc +++ b/libs/ardour/enums.cc @@ -511,6 +511,7 @@ setup_enum_writer () REGISTER_CLASS_ENUM (ExportFormatBase, SR_None); REGISTER_CLASS_ENUM (ExportFormatBase, SR_Session); + REGISTER_CLASS_ENUM (ExportFormatBase, SR_8); REGISTER_CLASS_ENUM (ExportFormatBase, SR_22_05); REGISTER_CLASS_ENUM (ExportFormatBase, SR_44_1); REGISTER_CLASS_ENUM (ExportFormatBase, SR_48); diff --git a/libs/ardour/export_format_base.cc b/libs/ardour/export_format_base.cc index 62fae52c9e..c218b6154a 100644 --- a/libs/ardour/export_format_base.cc +++ b/libs/ardour/export_format_base.cc @@ -191,7 +191,7 @@ ExportFormatBase::nearest_sample_rate (framecnt_t sample_rate) best_match = (rate); \ } - DO_SR_COMPARISON(SR_22_05); + DO_SR_COMPARISON(SR_8); DO_SR_COMPARISON(SR_22_05); DO_SR_COMPARISON(SR_44_1); DO_SR_COMPARISON(SR_48); diff --git a/libs/ardour/export_format_manager.cc b/libs/ardour/export_format_manager.cc index 5bb04696b9..08238ff710 100644 --- a/libs/ardour/export_format_manager.cc +++ b/libs/ardour/export_format_manager.cc @@ -205,6 +205,7 @@ void ExportFormatManager::init_sample_rates () { add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_Session, _("Session rate")))); + add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_8, "8 kHz"))); add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_22_05, "22,05 kHz"))); add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_44_1, "44,1 kHz"))); add_sample_rate (SampleRatePtr (new SampleRateState (ExportFormatBase::SR_48, "48 kHz"))); diff --git a/libs/ardour/export_format_specification.cc b/libs/ardour/export_format_specification.cc index c4e61dea39..ce61babcbf 100644 --- a/libs/ardour/export_format_specification.cc +++ b/libs/ardour/export_format_specification.cc @@ -550,6 +550,9 @@ ExportFormatSpecification::description (bool include_name) } switch (sample_rate()) { + case SR_8: + components.push_back ("8 kHz"); + break; case SR_22_05: components.push_back ("22,5 kHz"); break; diff --git a/libs/ardour/export_formats.cc b/libs/ardour/export_formats.cc index 32b71f6b04..463a09468a 100644 --- a/libs/ardour/export_formats.cc +++ b/libs/ardour/export_formats.cc @@ -186,6 +186,7 @@ ExportFormatLinear::ExportFormatLinear (string name, FormatId format_id) : set_name (name); set_format_id (format_id); + add_sample_rate (SR_8); add_sample_rate (SR_22_05); add_sample_rate (SR_44_1); add_sample_rate (SR_48);