1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-20 17:41:13 +02:00

Bug 2128 fix

Fixes incorrect recording speed when Track rate not matched to Project Rate.
Fix by binarywisdom. Pull request 423.
This commit is contained in:
SteveDaulton
2020-04-20 18:54:25 +01:00
parent 80f95d407a
commit 70b7487820
3 changed files with 136 additions and 13 deletions

View File

@@ -17,6 +17,8 @@ Paul Licameli split from ProjectManager.h
#include "AudioIOListener.h" // to inherit
#include "ClientData.h" // to inherit
constexpr int RATE_NOT_SELECTED{ -1 };
class AudacityProject;
struct AudioIOStartStreamOptions;
class TrackList;
@@ -47,7 +49,8 @@ public:
// Find suitable tracks to record into, or return an empty array.
static WaveTrackArray ChooseExistingRecordingTracks(
AudacityProject &proj, bool selectedOnly);
AudacityProject &proj, bool selectedOnly,
double targetRate = RATE_NOT_SELECTED);
static bool UseDuplex();
@@ -161,6 +164,15 @@ private:
AudioIOStartStreamOptions DefaultPlayOptions( AudacityProject &project );
AudioIOStartStreamOptions DefaultSpeedPlayOptions( AudacityProject &project );
struct PropertiesOfSelected
{
bool allSameRate{ false };
int rateOfSelected{ RATE_NOT_SELECTED };
int numberOfSelected{ 0 };
};
PropertiesOfSelected GetPropertiesOfSelected(const AudacityProject &proj);
#include "commands/CommandFlag.h"
extern const ReservedCommandFlag