From 93b6888394aaed5d9df2ab4e9a948de74f1f2584 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Fri, 2 Jan 2015 13:08:11 +0100 Subject: [PATCH 1/2] Fix export for some locales --- src/gui/export_project_dialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/gui/export_project_dialog.cpp b/src/gui/export_project_dialog.cpp index cd26ab955..66040cbf3 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/export_project_dialog.cpp @@ -253,10 +253,13 @@ ProjectRenderer* exportProjectDialog::prepRender() static_cast(interpolationCB->currentIndex()), static_cast(oversamplingCB->currentIndex()) ); + int samplerates[5] = { 44100, 48000, 88200, 96000, 192000 }; + int bitrates[6] = { 64, 128, 160, 192, 256, 320 }; + ProjectRenderer::OutputSettings os = ProjectRenderer::OutputSettings( - samplerateCB->currentText().section(" ", 0, 0).toUInt(), + samplerates[ samplerateCB->currentIndex() ], false, - bitrateCB->currentText().section(" ", 0, 0).toUInt(), + bitrates[ bitrateCB->currentIndex() ], static_cast( depthCB->currentIndex() ) ); engine::getSong()->setExportLoop( exportLoopCB->isChecked() ); From 44f72b0f13e89d7f8352a149e85002ec59f99fd5 Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Fri, 2 Jan 2015 14:21:39 +0100 Subject: [PATCH 2/2] Added const --- src/gui/export_project_dialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/export_project_dialog.cpp b/src/gui/export_project_dialog.cpp index 66040cbf3..1a18b5695 100644 --- a/src/gui/export_project_dialog.cpp +++ b/src/gui/export_project_dialog.cpp @@ -253,8 +253,8 @@ ProjectRenderer* exportProjectDialog::prepRender() static_cast(interpolationCB->currentIndex()), static_cast(oversamplingCB->currentIndex()) ); - int samplerates[5] = { 44100, 48000, 88200, 96000, 192000 }; - int bitrates[6] = { 64, 128, 160, 192, 256, 320 }; + const int samplerates[5] = { 44100, 48000, 88200, 96000, 192000 }; + const int bitrates[6] = { 64, 128, 160, 192, 256, 320 }; ProjectRenderer::OutputSettings os = ProjectRenderer::OutputSettings( samplerates[ samplerateCB->currentIndex() ],