ensure frame rate and sample rate changes ripple through widgets
This commit is contained in:
@@ -431,10 +431,20 @@ void ViewerOutput::InputValueChangedEvent(const QString &input, int element)
|
||||
|
||||
} else if (input == kAudioParamsInput) {
|
||||
|
||||
AudioParams new_audio_params = GetAudioParams();
|
||||
|
||||
bool sample_rate_changed = new_audio_params.sample_rate() != cached_audio_params_.sample_rate();
|
||||
|
||||
if (sample_rate_changed) {
|
||||
emit SampleRateChanged(new_audio_params.sample_rate());
|
||||
}
|
||||
|
||||
emit AudioParamsChanged();
|
||||
|
||||
audio_playback_cache_.SetParameters(GetAudioParams());
|
||||
|
||||
cached_audio_params_ = new_audio_params;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -167,6 +167,8 @@ signals:
|
||||
|
||||
void TextureInputChanged();
|
||||
|
||||
void SampleRateChanged(int sr);
|
||||
|
||||
public slots:
|
||||
void VerifyLength();
|
||||
|
||||
@@ -200,6 +202,8 @@ private:
|
||||
|
||||
VideoParams cached_video_params_;
|
||||
|
||||
AudioParams cached_audio_params_;
|
||||
|
||||
TimelinePoints timeline_points_;
|
||||
|
||||
private slots:
|
||||
|
||||
Reference in New Issue
Block a user