Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
F
FOSS-2024-1-final
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
AudacityFontProject
FOSS-2024-1-final
Commits
ccee770a
Commit
ccee770a
authored
2 years ago
by
Dmitry Vedenko
Browse files
Options
Downloads
Patches
Plain Diff
Fixes Apply button during the preview
parent
3641318c
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/effects/EffectUI.cpp
+18
-4
18 additions, 4 deletions
src/effects/EffectUI.cpp
src/effects/EffectUI.h
+2
-0
2 additions, 0 deletions
src/effects/EffectUI.h
with
20 additions
and
4 deletions
src/effects/EffectUI.cpp
+
18
−
4
View file @
ccee770a
...
@@ -501,6 +501,9 @@ void EffectUIHost::OnPaint(wxPaintEvent & WXUNUSED(evt))
...
@@ -501,6 +501,9 @@ void EffectUIHost::OnPaint(wxPaintEvent & WXUNUSED(evt))
void
EffectUIHost
::
OnClose
(
wxCloseEvent
&
WXUNUSED
(
evt
))
void
EffectUIHost
::
OnClose
(
wxCloseEvent
&
WXUNUSED
(
evt
))
{
{
if
(
mPlaying
)
StopPlayback
();
DoCancel
();
DoCancel
();
CleanupRealtime
();
CleanupRealtime
();
...
@@ -531,6 +534,9 @@ void EffectUIHost::OnApply(wxCommandEvent & evt)
...
@@ -531,6 +534,9 @@ void EffectUIHost::OnApply(wxCommandEvent & evt)
return
;
return
;
}
}
if
(
mPlaying
)
StopPlayback
();
// Honor the "select all if none" preference...a little hackish, but whatcha gonna do...
// Honor the "select all if none" preference...a little hackish, but whatcha gonna do...
if
(
!
mIsBatch
&&
if
(
!
mIsBatch
&&
mEffectUIHost
.
GetDefinition
().
GetType
()
!=
EffectTypeGenerate
&&
mEffectUIHost
.
GetDefinition
().
GetType
()
!=
EffectTypeGenerate
&&
...
@@ -735,10 +741,7 @@ void EffectUIHost::OnPlay(wxCommandEvent & WXUNUSED(evt))
...
@@ -735,10 +741,7 @@ void EffectUIHost::OnPlay(wxCommandEvent & WXUNUSED(evt))
if
(
mPlaying
)
if
(
mPlaying
)
{
{
auto
gAudioIO
=
AudioIO
::
Get
();
StopPlayback
();
mPlayPos
=
gAudioIO
->
GetStreamTime
();
auto
&
projectAudioManager
=
ProjectAudioManager
::
Get
(
mProject
);
projectAudioManager
.
Stop
();
}
}
else
else
{
{
...
@@ -1160,6 +1163,17 @@ void EffectUIHost::CleanupRealtime()
...
@@ -1160,6 +1163,17 @@ void EffectUIHost::CleanupRealtime()
}
}
}
}
void
EffectUIHost
::
StopPlayback
()
{
if
(
!
mPlaying
)
return
;
auto
gAudioIO
=
AudioIO
::
Get
();
mPlayPos
=
gAudioIO
->
GetStreamTime
();
auto
&
projectAudioManager
=
ProjectAudioManager
::
Get
(
mProject
);
projectAudioManager
.
Stop
();
}
DialogFactoryResults
EffectUI
::
DialogFactory
(
wxWindow
&
parent
,
DialogFactoryResults
EffectUI
::
DialogFactory
(
wxWindow
&
parent
,
EffectPlugin
&
host
,
EffectUIClientInterface
&
client
,
EffectPlugin
&
host
,
EffectUIClientInterface
&
client
,
EffectSettingsAccess
&
access
)
EffectSettingsAccess
&
access
)
...
...
This diff is collapsed.
Click to expand it.
src/effects/EffectUI.h
+
2
−
0
View file @
ccee770a
...
@@ -110,6 +110,8 @@ private:
...
@@ -110,6 +110,8 @@ private:
void
CleanupRealtime
();
void
CleanupRealtime
();
void
StopPlayback
();
private
:
private
:
Observer
::
Subscription
mAudioIOSubscription
,
mEffectStateSubscription
;
Observer
::
Subscription
mAudioIOSubscription
,
mEffectStateSubscription
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment