mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-03 09:29:30 +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)
|
if (mNumPlaybackChannels > 0)
|
||||||
{
|
{
|
||||||
EffectManager & em = EffectManager::Get();
|
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
|
// The following adds a NEW effect processor for each logical track and the
|
||||||
// group determination should mimic what is done in audacityAudioCallback()
|
// group determination should mimic what is done in audacityAudioCallback()
|
||||||
@ -1925,7 +1927,9 @@ int AudioIO::StartStream(const ConstWaveTrackArray &playbackTracks,
|
|||||||
chanCnt++;
|
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();
|
RealtimeResume();
|
||||||
}
|
}
|
||||||
|
|
||||||
void EffectManager::RealtimeInitialize()
|
void EffectManager::RealtimeInitialize(double rate)
|
||||||
{
|
{
|
||||||
// The audio thread should not be running yet, but protect anyway
|
// The audio thread should not be running yet, but protect anyway
|
||||||
RealtimeSuspend();
|
RealtimeSuspend();
|
||||||
@ -477,8 +477,10 @@ void EffectManager::RealtimeInitialize()
|
|||||||
mRealtimeActive = true;
|
mRealtimeActive = true;
|
||||||
|
|
||||||
// Tell each effect to get ready for action
|
// Tell each effect to get ready for action
|
||||||
for (auto e : mRealtimeEffects)
|
for (auto e : mRealtimeEffects) {
|
||||||
|
e->SetSampleRate(rate);
|
||||||
e->RealtimeInitialize();
|
e->RealtimeInitialize();
|
||||||
|
}
|
||||||
|
|
||||||
// Get things moving
|
// Get things moving
|
||||||
RealtimeResume();
|
RealtimeResume();
|
||||||
|
@ -118,7 +118,7 @@ public:
|
|||||||
void RealtimeAddEffect(Effect *effect);
|
void RealtimeAddEffect(Effect *effect);
|
||||||
void RealtimeRemoveEffect(Effect *effect);
|
void RealtimeRemoveEffect(Effect *effect);
|
||||||
void RealtimeSetEffects(const EffectArray & mActive);
|
void RealtimeSetEffects(const EffectArray & mActive);
|
||||||
void RealtimeInitialize();
|
void RealtimeInitialize(double rate);
|
||||||
void RealtimeAddProcessor(int group, unsigned chans, float rate);
|
void RealtimeAddProcessor(int group, unsigned chans, float rate);
|
||||||
void RealtimeFinalize();
|
void RealtimeFinalize();
|
||||||
void RealtimeSuspend();
|
void RealtimeSuspend();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user