Skip to content
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

Error when building with custom sounds. #63

Open
Spider-bomb opened this issue Sep 8, 2021 · 3 comments
Open

Error when building with custom sounds. #63

Spider-bomb opened this issue Sep 8, 2021 · 3 comments

Comments

@Spider-bomb
Copy link

I'm attempting to build a romhack of this game that others have been able to build successfully, but I'm getting the following error when attempting to implement custom sounds. Replacing the sounds with their original counterparts seems to solve the issue, but as this hack replaces several characters, this is less than ideal.

tools/aiff_extract_codebook sound/samples/sfx_mario/00.aiff >build/us_3ds/sound/samples/sfx_mario/00.table
Assertion failed: !canSeek() || (tell() == m_track->fpos_next_frame), file audiofile.cpp, line 6170
tools/vadpcm_enc -c build/us_3ds/sound/samples/sfx_mario/00.table sound/samples/sfx_mario/00.aiff build/us_3ds/sound/samples/sfx_mario/00.aifc
You should specify a coefficient codebook with the [-c] option
make: *** [Makefile:738: build/us_3ds/sound/samples/sfx_mario/00.aifc] Error 1

Additional information: I've followed the guide to the best of my ability, and have successfully compiled a non modified version of the game. Besides following the installation guide for MSYS itself and successfully compiling the PC build with sm64pcbuilder2, this is otherwise a completely fresh install of MSYS. I can provide any additional information on request. I have tried with both an original mario 64 rom and a patched version of the rom, and both throw some variation on the above error eventually when getting to custom sounds. The hack I'm trying to build can be found here, if that's worth anything: https://romhacking.com/hack/super-cream-64

@NaomiReadbeforeint
Copy link

Did u ever figure this out

@Spider-bomb
Copy link
Author

Unfortunately, no, I did not.

@Erotemic
Copy link

Erotemic commented Oct 9, 2024

I'm also running into this issue with my random asset generator: https://github.com/Erotemic/sm64-random-assets

I will try to solve the issue and follow up.

EDIT: I think this might be an issue in ./tools/aiff_extract_codebook.c When I run the compiled executable:

./tools/aiff_extract_codebook sound/samples/bowser_organ/00_organ_1.aiff

on Linux on a custom audio file it works fine, but when I do it on windows I get the assertion error. (I may be wrong on this, I need to generate a MWE to double check).

Observations:

I'm looking for any difference in the systems.

NewLines

When running:

tools/aiff_extract_codebook sound/samples/bowser_organ/00_organ_1.aiff >build/us_pc/sound/samples/bowser_organ/00_organ_1.table
python3 -c "from pathlib import Path; print(repr(Path('build/us_pc/sound/samples/bowser_organ/00_organ_1.table').read_bytes()))"

We see that we have \r\n new lines in the windows file, but \n in linux. I'm not sure if this could matter.

We can "fix" the newline issue with (if it is an issue):

sed -i -e 's/\r//g' build/us_pc/sound/samples/bowser_organ/00_organ_1.table

In tools/aiff_extract_codebook

When I "generate zeros" for the audio signals windows fails on

tools/aiff_extract_codebook sound/samples/instruments/14_strings_5.aiff

Windows: fails

tabledesign: input AIFC file [sound/samples/instruments/14_strings_5.aiff] could not be opened.

Linux: seems to work correctly:

2
2
    0     0     0     0     0     0     0     0 
    0     0     0     0     0     0     0     0 
    0     0     0     0     0     0     0     0 
    0     0     0     0     0     0     0     0 

Note, on windows some zeroed files like
sound/samples/bowser_organ/00_organ_1.aiff work fine (up to newline
difference):

tools/aiff_extract_codebook sound/samples/bowser_organ/00_organ_1.aiff 

The output is the same as it is for sound/samples/instruments/14_strings_5.aiff, which is shown above.

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

No branches or pull requests

3 participants