-
Notifications
You must be signed in to change notification settings - Fork 291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DUMB 2.0 and 0.9.3 support #823
Conversation
More light on the crash inside DUMB 1.0 A5 runtime! I've built DUMB 1.0 with debugging flags, let A5 use that debugging build, and get a much more informative stacktrace, along with:
All XM files work. All IT, MOD, and S3M files crash. Explanation:
I suppose:
Now it's time to dig deep into A5 source and the DUMB API... |
I've fixed the API mismatches to the best of my knowledge. I've submitted new documentation about Ive changed A5's I'll continue to investigate. For any questions, I'll sit in |
d713245
to
34ba82f
Compare
I've got it working! XM, IT, MOD, S3M all play well with the DUMB git HEAD. DUMB supports even more tracked formats in 1.0, but Allegro doesn't register loaders for them yet. We can look into that soon. My code relies on |
As an aside, I am glad this is coming together! Thank you very much, Simon,
for your relentless efforts.
…On 17 Sep 2017 10:37, "Simon Na." ***@***.***> wrote:
I've got it working! XM, IT, MOD, S3M all play well with the DUMB git HEAD.
DUMB supports even more tracked formats in 1.0, but Allegro doesn't
register loaders for them yet. We can look into that soon.
My code relies on dumb.h reporting the correct version. Since the DUMB
commit tagged 1.0 reports 0.9.3 internally, I've proposed upstream to
release another tagged 1.y.z > 1.0.0: kode54/dumb#48
<kode54/dumb#48>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#823 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEWeazhmdM_FSV3mxlghReLJjLLvUNmks5sjNpMgaJpZM4PVl9N>
.
|
You're welcome! Feels so good when research and work pay off. I haven't contributed to either library before and dug through internals in both. |
News from DUMB upstream: We're working on stabilizing the API for DUMB 2.0. kode54, the maintainer, hasn't planned any breaking changes, only bugfixes. The DUMB header needs small clean-up in the public API, and I'm helping upstream getting all the ducks in a row. This means A5 should wait until DUMB 2.0 before merging this PR. I estimate we'll have DUMB 2.0 in 2 weeks. Then, I'll push another commit to this PR's target branch to make A5 check for DUMB 2.0 instead of 1.0. DUMB 2.0 has a catch-all loader to guess file format from an open file. Looks like I can simplify the A5 code and allow all the 10+ tracker formats in one go. |
addons/acodec/acodec.c
Outdated
@@ -38,6 +38,48 @@ bool al_init_acodec_addon(void) | |||
#endif | |||
|
|||
#ifdef ALLEGRO_CFG_ACODEC_MODAUDIO | |||
#include <dumb.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably shouldn't include a header inside the body of a function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, thanks. Fixed in new commit below.
545b41c
to
c1b2600
Compare
I expect the DUMB 2.0 API to stabilize in a week. I have pushed a commit to this PR (A5-DUMB-2.0-interop) that uses the most likely DUMB 2.0 API, and still should build with DUMB 0.9.3. Once DUMB 2.0 is tagged upstream, I'll adapt to the then-stable API, and rebase this PR onto A5 master, squashing commits as appropriate. I'd love to make it onto the A5 October release before the ship sails! In |
I am not the one to decide but I consider this feature important enough to
delay the next Allegro 5 release for. The DUMB dependency was getting
stale, upgrading to 2.0 seems a great idea.
…On 21 Sep 2017 11:04 a.m., "Simon Naarmann" ***@***.***> wrote:
I expect the DUMB 2.0 API to stabilize within a week. I have pushed a
commit to this PR (A5-DUMB-2.0-interop) that uses the most likely DUMB 2.0
API, and still should build with DUMB 0.9.3.
Once DUMB 2.0 is tagged upstream, I'll rebase this PR onto A5 master and
squash commits as appropriate.
I'd love to make it onto the A5 October release before the ship sails!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#823 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEWeQNIvONau1RRy6-1RagSJC1yfVTMks5skiaegaJpZM4PVl9N>
.
|
It's fine to change MOD_FILE's declaration to whatever you need it to be, it's purely an internal implementation detail with no user-visible API or ABI effects. |
Hmm, even if it's purely internal, I think I'll keep We have gold-plated the DUMB API for 64-bit file offsets (module files > 2 GB), but that's only because we want the API future-proof. Maybe that was unnecessary already. Upstream, I have an open PR with small changes to the 2.0 API release candidate. Maybe everybody will already agree with that API, maybe there'll be 1 (unlikely: 2 or more) PR after that one. That means: Early 2017-10 tag of DUMB 2.0 is still likely. |
DUMB 2.0.0 is tagged upstream! @SiegeLord will look over this PR one more time tomorrow, afterwards I'll rebase and squash. I've run a quick module-playing test with this PR (including yesterday's commit) against tagged 2.0.0, nothing broke here. |
addons/acodec/acodec.c
Outdated
ret &= al_register_audio_stream_loader_f(".mod", _al_load_dumb_audio_stream_f); | ||
ret &= al_register_audio_stream_loader(".mtm", _al_load_dumb_audio_stream); | ||
ret &= al_register_audio_stream_loader_f(".mtm", _al_load_dumb_audio_stream_f); | ||
ret &= al_register_audio_stream_loader(".nst", _al_load_dumb_audio_stream); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't you just say it wasn't listed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think he meant it wasn't listed in the DUMB documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Earlier upstream discussion: kode54/dumb#53 (comment) -- based on that, I decided to add .nst
in the code above.
I'm considering to remove .nst
above because, after googling around, it seems really hard to find NST modules with that extension. Not even modarchive lists NST as a format to search.
I tried this with dumb2, and found one issue. It appears that the stream length is not reported correctly (e.g. I used |
Excellent catch. Can reproduce exactly as you told me: With my latest A5 PR and |
f8cc830
to
a947cb2
Compare
Fixed both issues ( I fixed the seek failure with Strangely, |
It's all fixed and good! I've bisected the DUMB codebase, and now I feel dumb: In this A5 PR, I I should always use The 64-bit DUMB API has nothing to do with this, sorry for tying @SiegeLord into an hour of rambling! |
Ok, tested this again and it seemed to work fine. Feel free to squash it when convenient. |
@SiegeLord On the subject of squashing, I see that now Github has a convenient looking "squash and merge" button for Allegro developers with sufficient privileges to the repo. Do you think it is OK to actually use this button once all reviews and tests are OK? It saves the contributor the effort of having to do a manual squash. |
a947cb2
to
b08f5f4
Compare
Squashed into 2 commits: Fixing whitespace, then a clean diff of the feature. @beoran: As contributor, I like the manual squash and take my time to get it perfect, because it defines the patch's final presentation. I care about it. But maybe others are fine however their patch turn out? Github's squash-and-merge might certainly be handy when somebody wouldn't want to squash their commits themselves. :-) |
We support two versions of DUMB to play tracked music: * 0.9.3 from Sourceforge <http://dumb.sourceforge.net> * 2.0.0 by kode54 on github <https://github.com/kode54/dumb> The DUMB homepage on Sourceforge endorses kode54's fork and links to it. The Allegro source tests the DUMB version and supports either API. Supported tracker formats in DUMB 2.0 that Allegro 5 can now play: * IT (Impulse Tracker) * XM (Fasttracker II) * MOD (Ultimate SoundTracker, ProTracker) * STM (Scream Tracker) * S3M (Scream Tracker 3) * 669 (Composer 669) * AMF (Asylum Music Format) * AMF (Digital Sound and Music Interface Advanced Music Format) * DSM (Digital Sound Interface Kit module format) * MTM (MultiTracker) * OKT (Oktalyzer) * PSM (Protracker Studio, both the older PSM16 and the newer PSM) * PTM (PolyTracker) * RIFF AM/AMFF (Galaxy Music System internal format) The CMake build script uses -lm on all platforms for the compile test. Without -lm, cmake finds the include paths and libraries, can compile the test program, but couldn't link it on Arch Linux.
b08f5f4
to
5e2ac76
Compare
@beoran, it doesn't do the rebase, as far as I can tell. I really don't like having merges in the history. We very rarely ask people to squash and rebase (I always rebase myself before merging), Simon is just being super nice :D. |
I hate repositories who have 1000ds of useless merge commits - so I'm really glad we avoid them in Allegro (except for actual branch merges, which are rare now that we switched to a single development branch). |
I see, I can agree with that. I will refrain from using the button, then.
…On 28 Sep 2017 20:14, "elias-pschernig" ***@***.***> wrote:
I hate repositories who have 1000ds of useless merge commits - so I'm
really glad we avoid them in Allegro (except for actual branch merges,
which are rare now that we switched to a single development branch).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#823 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEWeY-rAGzpHOiE6xJsVy_XtQjBQTYpks5sm-H0gaJpZM4PVl9N>
.
|
Alright, merged! Thanks a lot Simon, you're the best! |
You're welcome! Thanks to SiegeLord for the frequent reviews, and to everyone for feedback and encouragement. |
Specifying
-lm
on Arch Linux is necessary for DUMB support: Otherwise, cmake concludes that DUMB is not available. I used the DUMB 1.0-1 binary package from the Arch repo. This Arch package points to kode54's fork of DUMB with version 1.0 as suggested by the DUMB homepage, not to version 0.9.3 that A5 officially supports.I didn't test whether this is required on other systems, or whether it breaks the build on other systems.
Still no successful playback: I've merely fixed A5's build for me. I can load a module with Allegro 5, but then my application will immediately crash within DUMB. Crashlog follows. I haven't debugged this crash yet! The fault could be in DUMB, in the DUMB Arch package, in A5, in my code, in a faulty module, ...
I'll understand if you won't merge this PR before we have seen successful playback with DUMB 1.0 and A5. According to @SiegeLord, DUMB 1.0 made breaking changes. Still, I'm opening this PR to share my findings, allowing others to shed more light on this.
For reference, here's an excerpt from cmake's error log when DUMB's libraries don't specify
-lm
: