mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-21 23:00:06 +02:00
Bug 2016 - Multiple problems with Change Pitch
This commit is contained in:
parent
3be57fce49
commit
cc2c3dc2fc
@ -407,9 +407,17 @@ bool EffectChangePitch::TransferDataFromWindow()
|
|||||||
// the selection. Then set some other params accordingly.
|
// the selection. Then set some other params accordingly.
|
||||||
void EffectChangePitch::DeduceFrequencies()
|
void EffectChangePitch::DeduceFrequencies()
|
||||||
{
|
{
|
||||||
|
auto FirstTrack = [&]()->const WaveTrack *{
|
||||||
|
if( !inputTracks() )
|
||||||
|
return nullptr;
|
||||||
|
return *( inputTracks()->Selected< const WaveTrack >() ).first;
|
||||||
|
};
|
||||||
|
|
||||||
|
m_dStartFrequency = 261.265;// Middle C.
|
||||||
|
|
||||||
// As a neat trick, attempt to get the frequency of the note at the
|
// As a neat trick, attempt to get the frequency of the note at the
|
||||||
// beginning of the selection.
|
// beginning of the selection.
|
||||||
auto track = *( inputTracks()->Selected< const WaveTrack >() ).first;
|
auto track = FirstTrack();
|
||||||
if (track) {
|
if (track) {
|
||||||
double rate = track->GetRate();
|
double rate = track->GetRate();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user