13
0

add 8kHz as an available export format sample rate

git-svn-id: svn://localhost/ardour2/branches/3.0@13214 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2012-10-08 19:45:25 +00:00
parent 0bb2227eb8
commit 9a4fbfcdfe
6 changed files with 8 additions and 1 deletions

View File

@ -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,

View File

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

View File

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

View File

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

View File

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

View File

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