Skip to content

Commit

Permalink
Merged revision(s) 20311 from trunk/OpenMPT:
Browse files Browse the repository at this point in the history
[Imp] Sample tab: Avoid holding audio lock while updating UI after pasting a sample.
........


git-svn-id: https://source.openmpt.org/svn/openmpt/branches/OpenMPT-1.31@20312 56274372-70c3-4bfc-bfc3-4c3a0b034d27
  • Loading branch information
sagamusix committed Mar 12, 2024
1 parent bf30524 commit 987ab1b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mptrack/View_smp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2713,6 +2713,7 @@ void CViewSample::DoPaste(PasteMode pasteMode)
int16 *pNewSample = static_cast<int16 *>(ModSample::AllocateSample(newLength, 2u * newNumChannels));
if(pNewSample == nullptr)
{
cs.Leave();
ErrorBox(IDS_ERR_OUTOFMEMORY, this);
ok = false;
} else
Expand Down Expand Up @@ -2792,6 +2793,7 @@ void CViewSample::DoPaste(PasteMode pasteMode)
{
SetCurSel(selBegin, selEnd);
sample.PrecomputeLoops(sndFile, true);
cs.Leave();
SetModified(SampleHint().Info().Data().Names(), true, false);
if(pasteMode == PasteMode::Replace)
{
Expand Down

0 comments on commit 987ab1b

Please sign in to comment.