mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-30 15:49:41 +02:00
Bug1502: VST and AU plug-ins should show correct rates and spectra
This commit is contained in:
parent
2d56c8ec32
commit
ddf236993f
@ -1908,7 +1908,9 @@ int AudioIO::StartStream(const ConstWaveTrackArray &playbackTracks,
|
||||
if (mNumPlaybackChannels > 0)
|
||||
{
|
||||
EffectManager & em = EffectManager::Get();
|
||||
em.RealtimeInitialize();
|
||||
// Setup for realtime playback at the rate of the realtime
|
||||
// stream, not the rate of the track.
|
||||
em.RealtimeInitialize(mRate);
|
||||
|
||||
// The following adds a NEW effect processor for each logical track and the
|
||||
// group determination should mimic what is done in audacityAudioCallback()
|
||||
@ -1925,7 +1927,9 @@ int AudioIO::StartStream(const ConstWaveTrackArray &playbackTracks,
|
||||
chanCnt++;
|
||||
}
|
||||
|
||||
em.RealtimeAddProcessor(group++, chanCnt, vt->GetRate());
|
||||
// Setup for realtime playback at the rate of the realtime
|
||||
// stream, not the rate of the track.
|
||||
em.RealtimeAddProcessor(group++, chanCnt, mRate);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -463,7 +463,7 @@ void EffectManager::RealtimeRemoveEffect(Effect *effect)
|
||||
RealtimeResume();
|
||||
}
|
||||
|
||||
void EffectManager::RealtimeInitialize()
|
||||
void EffectManager::RealtimeInitialize(double rate)
|
||||
{
|
||||
// The audio thread should not be running yet, but protect anyway
|
||||
RealtimeSuspend();
|
||||
@ -477,8 +477,10 @@ void EffectManager::RealtimeInitialize()
|
||||
mRealtimeActive = true;
|
||||
|
||||
// Tell each effect to get ready for action
|
||||
for (auto e : mRealtimeEffects)
|
||||
for (auto e : mRealtimeEffects) {
|
||||
e->SetSampleRate(rate);
|
||||
e->RealtimeInitialize();
|
||||
}
|
||||
|
||||
// Get things moving
|
||||
RealtimeResume();
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
void RealtimeAddEffect(Effect *effect);
|
||||
void RealtimeRemoveEffect(Effect *effect);
|
||||
void RealtimeSetEffects(const EffectArray & mActive);
|
||||
void RealtimeInitialize();
|
||||
void RealtimeInitialize(double rate);
|
||||
void RealtimeAddProcessor(int group, unsigned chans, float rate);
|
||||
void RealtimeFinalize();
|
||||
void RealtimeSuspend();
|
||||
|
Loading…
x
Reference in New Issue
Block a user