From b1930f06e532a50a9948708c91a0704e4cc22150 Mon Sep 17 00:00:00 2001 From: Thomas Goyne Date: Sat, 18 Feb 2012 00:40:58 +0000 Subject: [PATCH] Actually set the volume/audio zoom to the saved values rather than just setting the slider positions Originally committed to SVN as r6484. --- aegisub/src/audio_box.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aegisub/src/audio_box.cpp b/aegisub/src/audio_box.cpp index 7eb9059d4..1a69f0c4c 100644 --- a/aegisub/src/audio_box.cpp +++ b/aegisub/src/audio_box.cpp @@ -136,6 +136,10 @@ AudioBox::AudioBox(wxWindow *parent, agi::Context *context) SetMinimumSizeY(panel->GetSize().GetHeight()); audioDisplay->Bind(wxEVT_MOUSEWHEEL, &AudioBox::OnMouseWheel, this); + + audioDisplay->SetZoomLevel(-HorizontalZoom->GetValue()); + audioDisplay->SetAmplitudeScale(pow(mid(1, VerticalZoom->GetValue(), 100) / 50.0, 3)); + controller->SetVolume(pow(mid(1, VolumeBar->GetValue(), 100) / 50.0, 3)); } AudioBox::~AudioBox() { }