Skip to content

Amb Reader#926

Open
stavrosfa wants to merge 4 commits intoC7-Game:Developmentfrom
stavrosfa:feature/amb-reader
Open

Amb Reader#926
stavrosfa wants to merge 4 commits intoC7-Game:Developmentfrom
stavrosfa:feature/amb-reader

Conversation

@stavrosfa
Copy link
Copy Markdown
Contributor

This will allow us to read .amb files.

It's by no means complete or fully tested, and could change in the future according to our needs.
It has worked well with what I have tested it so far, including with some .amb files that are known to be corrupted, I just haven't tested it with every .amb available to be sure of all the corner cases.

The Sfx struct is meant to be what we will be using as a sound effect data structure from now on, so even regular .wav files would have this format. This of course is also subject to change according to our needs.

I have included some useful links in the code if you want more info on parsing .amb and midi files.

@ajhalme
Copy link
Copy Markdown
Contributor

ajhalme commented May 5, 2026

How are you testing the reader? Can you include some of the wiring or a manual test case?

@stavrosfa
Copy link
Copy Markdown
Contributor Author

stavrosfa commented May 5, 2026

Yeah, I probably should have included something simple in the first place. I have modified the playSound() in the AnimationManager class to play all the wavs at the proper time, with pitch and volume variations, so that's how I was testing it.
I didn't want to include this modified method in this PR so it can stay as clean as possible.

Now, I see the tests are failing because we are on github and there is no civ3 installation, so I will use what we currently use in the other tests to block it here.

Copy link
Copy Markdown
Contributor

@ajhalme ajhalme left a comment

Choose a reason for hiding this comment

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

LGTM

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.

2 participants