Opened 16 years ago

Closed 15 years ago

Last modified 6 years ago

#9020 closed patch

GSOC: Transform scummvm into a modplayer

Reported by: SF/nolange Owned by:
Priority: normal Component: Audio
Version: Keywords:
Cc: Game:

Description

Since Im going to implement a couple audioformats its important I can test them easily. This patch is disabling the normal scummvm-launcher and instead simply loads a protracker module and plays it. Included are new projectfiles for MSVC9 and adjustments to Makefile.common to include a new directory "TFMX". I will keep any auxiliary stuff in this folder (docs describing the format, commented disassemblies,etc)

Ticket imported from: #2795660. Ticket imported from: patches/1125.

Attachments (5)

patch.diff (44.5 KB ) - added by SF/nolange 16 years ago.
patch against rev 40797
patch2.diff (50.7 KB ) - added by SF/nolange 16 years ago.
patch against 40857
patch3.diff (51.2 KB ) - added by SF/nolange 16 years ago.
Corrected conventions and foldername
TFMXPatch1.diff (93.1 KB ) - added by SF/nolange 15 years ago.
initial TFMX commit
TFMXPatch2.diff (93.4 KB ) - added by SF/nolange 15 years ago.
Compiles under Linux, minor fixes

Download all attachments as: .zip

Change History (19)

by SF/nolange, 16 years ago

Attachment: patch.diff added

patch against rev 40797

comment:1 by lordhoto, 16 years ago

Parts of the patch are not correctly formatted, you should read up on our code formatting guidelines: http://wiki.scummvm.org/index.php/Code_Formatting_Conventions .

About the new directory:

The name should be all lowercase. Also I'm myself actually unsure of the new directory, later on the standalone TFMX player should be placed in sound/. For the time of working it might be easier of course to use an alternative file with the main, as you did it. I guess your mentor(s) will have the final word here.

comment:2 by SF/nolange, 16 years ago

this TFMX directory wont be merged back in the main branch, it will contain stuff that I need for developing the TFMX-module. the code that ends up in scummvm will be in sound/mods - its just not there yet.

Yes I havent been correcting the code I disabled with the #if 0 directive (the rest should be fine). I wont be around on Saturday and I wanted to commit something.

comment:3 by SF/nolange, 16 years ago

New patch uploaded (patch2). Now parses a TFMX Module and creates a instance of a Tfmx Class based on it. Files have to be named music.dat and sample.dat (standard names for TFMX) and placed into current working dir.

by SF/nolange, 16 years ago

Attachment: patch2.diff added

patch against 40857

comment:4 by SF/knakos, 16 years ago

Looks good so far Norbert! Keep it up!

PS. Love the patch title :-)

comment:5 by lordhoto, 16 years ago

Ah ok I didn't know about your plans with the "tfmx" directory before. :-)

comment:6 by sev-, 16 years ago

Code formatting woes. Particularly Tfmx::load() method.

Please, fix it.

Also please, do not use caps in the directory names.

comment:7 by SF/nolange, 16 years ago

knakos: thanks.

Ok, Folder is lowercase now and I went over the source... twice. I hope for both our sakes that Im getting used to this convention fast =) Please tell me if Im doing anything consistenly wrong.

by SF/nolange, 16 years ago

Attachment: patch3.diff added

Corrected conventions and foldername

by SF/nolange, 15 years ago

Attachment: TFMXPatch1.diff added

initial TFMX commit

comment:8 by SF/nolange, 15 years ago

Changes in Paula.cpp/Paula.h + soundfx.cpp: Added (easy) queueing of samples by implementing methods that act similar like writes to the Amiga-Chipset would. Added counting of DMA-Interrupts, that is how often a sample finished playing. Added a base for the interrupt-interval, in most cases this will be the Cia-clockrate. Derived classes can then set the interval without scaling to the samplerate

Changes in common/scummsys.h: Only disable warnings with pragmas for MS Compilers that cant do so otherwise. Newer MSVC Versions can and should disable warnings in the Project-Settings.

Files in tfmx: Some files for debugging. Wont ever be commited back into trunk so those will contain some messy and hackish code

Added: tfmx.h/tfmx.cpp Player for TFMX-Modules.

Rest: main.cpp etc. Modified buildsystem to include new directory, modified main.cpp so it calls tfmxmain (tfmxplayer.cpp) instead of starting the GUI.

Unfortunatly it complains about unfound symbols under Unix, need some help fixing this as I dont have an idea whats wrong

comment:9 by DrMcCoy, 15 years ago

Just some quick comments:

About the linking issues: You need to specify libtfmx.a before libsound.a. I.e. in Makefile.common, tfmx should be before sound in MODULES.

Also, you forgot a "#define TFMXDEBUG_H" in tfmx/tfmxdebug.h.

Another minor thing: You might want to use spaces for alignment, like when you aligned "="s in the enum in paula.h. I've got my tabwidth set to 2, alignment-tabs break then. Generally, tabs for indenting and spaces for alignment is the way to go, IMO.

comment:10 by DrMcCoy, 15 years ago

And another thing: The boundaryCheck-assertion gets triggered for me. Digging into it a bit (valgrind ftw :)) showed that you forgot to initialize the _channelCtx array.

by SF/nolange, 15 years ago

Attachment: TFMXPatch2.diff added

Compiles under Linux, minor fixes

comment:11 by SF/nolange, 15 years ago

New version: fixed linking issues, TFMXDEBUG and paula.h

comment:12 by SF/nolange, 15 years ago

Status: newclosed

comment:13 by SF/nolange, 15 years ago

Closed, patch will be committed to gsoc2009-mods branch

comment:14 by digitall, 6 years ago

Component: Audio
Note: See TracTickets for help on using tickets.