KEMBAR78
SLUDGE: Added support for impulse tracker files using libmikmod! by hari01584 · Pull Request #4836 · scummvm/scummvm · GitHub
Skip to content

Conversation

@hari01584
Copy link
Contributor

Changes

  1. Added libmikmod compilation and scripts to configure!
  2. Impulse tracker mod wrappers in audio/mods!
  3. Testbed engine updated to support .it files playback!
  4. Sludge engine sound updated to add support for impulse tracker files!

@hari01584 hari01584 force-pushed the it2 branch 3 times, most recently from 86e934c to 3d2789c Compare March 23, 2023 05:41
@hari01584 hari01584 marked this pull request as ready for review March 23, 2023 05:41
Copy link
Member

@sev- sev- left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did my review


MikMod_InitThreads();

// No sound driver as we will be routing through scrumm mixer!
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "scrumm mixer"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea, it like meant going through the inbuilt system to play, rather than using mikmod internal players, i think its better to just remove this comment

MikMod_RegisterLoader(&load_it);


// TODO: Not currently in use
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it truly not in use now?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is, however wrapped in MREADER instance, this is like for now we just remove this class parameter _stream and still the program will work

_reader = createMikMemoryReader(_stream);
_mod = Player_LoadGeneric(_reader, 64, 0);
if (!_mod) {
warning("ImpulseTrackerMod::ImpulseTrackerMod(): Parsing mod error : %s", MikMod_strerror(MikMod_errno));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove space before colon error: %s


} // End of namespace Audio

#endif // USE_MIKMOD No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

End line is missing

* @param disposeAfterUse whether to delete the stream after use
* @return a new AudioStream, or NULL, if an error occurred
*/
RewindableAudioStream *makeImpulseStream(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename to makeImpulseTrackerStream()


class RewindableAudioStream;
/**
* Create a new AudioStream from the impulse tracker data in the given stream.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please write "Impulse Tracker"

audio/module.mk Outdated
mods/maxtrax.o \
mods/mod_xm_s3m.o \
mods/module.o \
mods/impulsetracker.o \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This must be sorted alphabetically

configure Outdated
EOF
if test -n "$_host"; then
# don't execute while cross compiling
cc_check $MIKMOD_CFLAGS $MIKMOD_LIBS -lmikmod && _mikmod=yes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use libmikmod-config to obtain proper compilation and linker flags. See freetype-config in this file for a good example.

}

} // End of namespace Testbed
} // End of namespace Testbed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you remove end line here?

@hari01584 hari01584 force-pushed the it2 branch 2 times, most recently from 293f530 to d881b4d Compare March 23, 2023 22:37
@criezy
Copy link
Member

criezy commented Mar 23, 2023

sev already did a thorough review.

I have one additional comment though: the split of the changes between the two commits is a mess, and the first commit likely does not compile. This will need to be fixed by moving some changes between the commits.

@hari01584
Copy link
Contributor Author

That is indeed correct, I was thinking of squashing these two commits into one, will that be okay?

@criezy
Copy link
Member

criezy commented Mar 23, 2023

That is indeed correct, I was thinking of squashing these two commits into one, will that be okay?

I think it would be better to have the changes in audio/ and those in the engines in separate commits.

@hari01584
Copy link
Contributor Author

Agreed, please check the latest changes, split into 3 commits each for engine/task!

@sev-
Copy link
Member

sev- commented Mar 24, 2023

All the changes look OK now, except for this new commit log message.

Please, fix it to "AUDIO: Add support for Impulse Tracker using libmikmod"

@sev-
Copy link
Member

sev- commented Mar 24, 2023

Thanks!

@sev- sev- merged commit 68bae81 into scummvm:master Mar 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants