Re: [Audacity-devel] 8000Hz sample rate bug in Audacity 1.3.5-beta
A free multi-track audio editor and recorder
Brought to you by:
aosiniao
|
From: Martyn S. <mar...@go...> - 2008-05-17 21:23:01
|
Paul
I would caution against that fix as that code was recently put there
to allow typing into the rate box as well as normal selection.
Why is SelectionBar::OnRate getting hit when Audacity starts? It
doesn't on Windows.
AudioIO::GetOptimalSupportedSampleRate() should get hit as the program
starts, then GetSelectionBar()->SetRate(mRate) sets mRateBox. I think
you should look at whether the problem is there.
HTH
Martyn
Paul Martin wrote:
> The problem is that SetValue() on a combo box sets the selection number (as
> returned by GetSelection() ) to zero, which caused it to always believe that
> 8000 Hz was selected.
>
--- audacity-1.3.5/src/toolbars/SelectionBar.cpp~ 2008-05-17
16:49:08.000000000 +0100
+++ audacity-1.3.5/src/toolbars/SelectionBar.cpp 2008-05-17
16:50:08.909032646 +0100
@@ -449,12 +449,8 @@
void SelectionBar::OnRate(wxCommandEvent & WXUNUSED(event))
{
- int nSel = mRateBox->GetSelection();
wxString sValue;
- if (nSel != -1) // one of the existing choices
- sValue = mRateBox->GetString(nSel);
- else
- sValue = mRateBox->GetValue();
+ sValue = mRateBox->GetValue();
if (sValue.ToDouble(&mRate) && // is a numeric value
(mRate != 0.0))
|