Skip to content

Commit 940ed3e

Browse files
author
runrevali
committed
[[ Bug 13428 ]] Play stop not called in livecode 7
1 parent 9f89453 commit 940ed3e

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

docs/notes/bugfix-13428.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Play stop not working

engine/src/cmdse.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2255,8 +2255,13 @@ void MCMM::exec_ctxt(MCExecContext &ctxt)
22552255
else
22562256
MCMultimediaExecPlayLastVideoOperation(ctxt, PP_UNDEFINED);
22572257
}
2258+
// AL-2014-09-12: [[ Bug 13428 ]] The only valid audio action without a clip is stop
2259+
else if (audio)
2260+
{
2261+
MCMultimediaExecStopPlaying(ctxt);
2262+
}
22582263
}
2259-
else
2264+
else
22602265
{
22612266
MCObject *optr = nil;
22622267
if (stack != NULL)

engine/src/exec-multimedia.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ void MCMultimediaExecStopPlaying(MCExecContext& ctxt)
303303
{
304304
MCU_play_stop();
305305
}
306+
306307
void MCMultimediaExecStopPlayingObject(MCExecContext& ctxt, MCObject *p_object)
307308
{
308309
if (p_object->gettype() == CT_PLAYER)
@@ -580,6 +581,9 @@ void MCMultimediaExecPrepareVideoClip(MCExecContext& ctxt, MCStack *p_target, in
580581

581582
void MCMultimediaExecPlayAudioClip(MCExecContext& ctxt, MCStack *p_target, int p_chunk_type, MCStringRef p_clip, bool p_looping)
582583
{
584+
// AL-2014-09-12: [[ Bug 13428 ]] Missed an MCU_play_stop() in the refactoring
585+
MCU_play_stop();
586+
583587
MCStack *sptr;
584588
sptr = p_target != nil ? p_target : MCdefaultstackptr;
585589

0 commit comments

Comments
 (0)