Opened 10 years ago

Closed 10 years ago

Last modified 13 months ago

#9163 closed patch

GSoC: SCUMM stopped audio from playing while saving

Reported by: SF/wickedshell Owned by: salty-horse
Priority: normal Component: Engine: SCUMM
Keywords: Cc:
Game: Day of the Tentacle

Description

proposed patch for bug 2090846

the problem is that the audio continues to play after the pause that the menu imposes, but during the saving process, and then gets paused for the display message.

The solution I implemented was to simply pause the game engine while saving, so that the audio won't start then stop. Possible issues are noticing pauses on the less powerful platforms while autosaving, if this is an issue it can be changed such that it will only pause the engine ofr user requested saves. I tested this on Day of the Tentacle.

Ticket imported from: #2984508. Ticket imported from: patches/1268.

Attachments (2)

saveAudio.patch (558 bytes ) - added by SF/wickedshell 10 years ago.
saveAudiov2.patch (561 bytes ) - added by SF/wickedshell 10 years ago.

Download all attachments as: .zip

Change History (11)

by SF/wickedshell, 10 years ago

Attachment: saveAudio.patch added

comment:1 by fingolfin, 10 years ago

Ori, since this patch is meant for a bug you submitted, could you give the patch a try?

comment:2 by fingolfin, 10 years ago

Owner: set to salty-horse

comment:3 by salty-horse, 10 years ago

The patch seems to solve the problem :D

I added a sleep() in there to make the testing a bit easier, and then I noticed that the cursor turns into the game's "crosshairs" cursor and then back into the GUI cursor, but this is out of scope for this patch and bug.

I do have a few issues with the patch style:
1) Please use tabs instead of spaces for indentation -- you can read <http://wiki.scummvm.org/index.php/Code_Formatting_Conventions> for more details.

Tip: You can also open the patch in a text editor before submitting it. Sometimes things like tabs/spaces mix will become visible.

2) Please put the call to pauseEngine() after the variable declarations, with an empty line between them. It's not part of the official guidelines, but I think it will make the function a bit more readable.

Thanks again for the patch!

comment:4 by salty-horse, 10 years ago

WickedShell, I also noticed that your patch has this Index: scummvm.new/trunk/engines/scumm/saveload.cpp

It's customary to run the "svn diff" command when in a trunk checkout. In your case, cd into scummvm.new/trunk and THEN run the diff.

I have a feeling you checked out the entire scummvm repository that includes the tags/ and branches/ dirs alongside the "trunk" dir.
This is a process which can take a long time, and which you don't really need to do.
I'm in the process of writing a guide on the wiki on the topic of how to get the code, but if you have any questions, I (and others, I hope :) would be happy to answer on IRC.

comment:5 by SF/wickedshell, 10 years ago

Thanks for the comments. I'd forgotten to tell my editor not to auto replace tabs with spaces, because that's what I use at school. Anyway I fixed it, and would happy to submit it a fixed version in, (I've already made it) but I can't figure out a way to attach it to this... (First time actually submitting things in SourceForge)

salty-horse, your absolutely right I did checkout the entire repository, and ran "svn diff' from the wrong place. This is the first project I've used svn for at all, and I stumbled my way through the entire thing. I look forward to seeing the guide.

Thanks for the comments!

comment:6 by SF/wickedshell, 10 years ago

Wait, I just found it. Sorry my bad!

by SF/wickedshell, 10 years ago

Attachment: saveAudiov2.patch added

comment:7 by salty-horse, 10 years ago

Thanks!
Committed as r48630

comment:8 by salty-horse, 10 years ago

Status: newclosed

comment:9 by digitall, 13 months ago

Component: Engine: SCUMM
Game: Day of the Tentacle
Note: See TracTickets for help on using tickets.