Sound Manager Cleanup [Updated]

Everything about development and the OpenMW source code.
Post Reply
Draygera
Posts: 16
Joined: 21 Dec 2011, 18:15

Sound Manager Cleanup [Updated]

Post by Draygera » 26 Dec 2011, 22:24

Today, I'm starting to check into this and am planning on getting most of it finished as soon as I can. Seems simple enough since most of the task is removing certain variables and their references.

--Brandon
Last edited by Draygera on 27 Dec 2011, 01:11, edited 1 time in total.

User avatar
Zini
Posts: 5494
Joined: 06 Aug 2011, 15:16

Re: Sound Manager Cleanup

Post by Zini » 26 Dec 2011, 22:36

For reference, we are talking about this task here: Sound Manager Cleanup

I still don't see you on the tracker, so I can't officially assign it to you yet.

Edit: And while you are at it you could also bring the SoundManager in line with our naming conventions (see wiki).

Draygera
Posts: 16
Joined: 21 Dec 2011, 18:15

Re: Sound Manager Cleanup

Post by Draygera » 26 Dec 2011, 23:14

Now I'm registered on the bug tracker. Sorry about that.

Draygera
Posts: 16
Joined: 21 Dec 2011, 18:15

Re: Sound Manager Cleanup [Updated]

Post by Draygera » 27 Dec 2011, 01:23

I removed the boost::timer variable from the SoundManager and replaced it with an incrementing integer and noticed that OpenMW loads and shuts down (seemingly almost instantly) faster with this gone. Did not notice any changes in sound quality or any other issues. I would like for someone else to test this out. Please and thank you.

swick
Posts: 96
Joined: 06 Aug 2011, 13:00

Re: Sound Manager Cleanup [Updated]

Post by swick » 27 Dec 2011, 03:24

I don't notice any speed differnce. I only got an unused var (go) in openmw/mwsound/soundmanager.cpp:579:38

Draygera
Posts: 16
Joined: 21 Dec 2011, 18:15

Re: Sound Manager Cleanup [Updated]

Post by Draygera » 27 Dec 2011, 05:08

Sorry. No speed difference. Didn't realize I was using the launcher instead of the executable. The launcher after closing for some reason hangs on the command line until you hit Enter. Really weird.

Swick, I checked that warning out and from what I can see:

Code: Select all


if(total == 0){
             while (!(soundIter == test.soundList.end()))
             {
                        ESM::NAME32 go = soundIter->sound;
                                int chance = (int) soundIter->chance;
                                //std::cout << "Sound: " << go.name <<" Chance:"
 <<  chance << "\n";
                                soundIter++;
                                total += chance;
                                }
                        }
                               
go looks like it was originally just for debugging purposes and it doesn't show up anywhere else in the code. If I comment out this entire group of code, except for some esmtools warnings:

Code: Select all

/home/draygera/Source/Engines/OpenMW/openmw-git/apps/esmtool/esmtool_cmd.c: In function 'update_arg':
/home/draygera/Source/Engines/OpenMW/openmw-git/apps/esmtool/esmtool_cmd.c:930:15: warning: variable 'val' set but not used [-Wunused-but-set-variable]
/home/draygera/Source/Engines/OpenMW/openmw-git/apps/esmtool/esmtool_cmd.c:929:9: warning: variable 'stop_char' set but not used [-Wunused-but-set-variable]
/home/draygera/Source/Engines/OpenMW/openmw-git/apps/esmtool/esmtool_cmd.c: In function 'cmdline_parser_internal':
/home/draygera/Source/Engines/OpenMW/openmw-git/apps/esmtool/esmtool_cmd.c:999:7: warning: variable 'check_required' set but not used [-Wunused-but-set-variable]
my code compiles fine and everything works as intended, so far.

User avatar
Zini
Posts: 5494
Joined: 06 Aug 2011, 15:16

Re: Sound Manager Cleanup [Updated]

Post by Zini » 27 Dec 2011, 10:12

Sorry, integer won't do. You would end up with inconsistent behaviour when the framerate is not constant. Please use the frame duration as described in the bug tracker.

Also, a few hints about procedures. We don't usually work with patches and since you have pushed the changes to your repository the patch you uploaded is redundant anyway.

Furthermore I would like to direct you to the developer documentation on the wiki again, especially the page about branching policies. You can continue to use your branch for now, since it is not a big deal, but please stick to our policies for future tasks.

Draygera
Posts: 16
Joined: 21 Dec 2011, 18:15

Re: Sound Manager Cleanup [Updated]

Post by Draygera » 27 Dec 2011, 20:19

Yes, sir. I will do that. I'm going to do some research now and I'll try to have it corrected by tonight or tomorrow.

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests