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

Add new audio objects for loading sounds #17188

Merged
merged 7 commits into from
May 23, 2022

Conversation

IntelOrca
Copy link
Contributor

@IntelOrca IntelOrca commented May 9, 2022

All references to CSS are now moved to an object file which is loaded at the start of the game. The audio object type is a new kind of object which is not saved to park files.

New audio objects are available in this PR:
OpenRCT2/objects#185

They include:
rct2.audio.base - Base audio for OpenRCT2, includes all sound effects and crowd ambience.
rct2.audio.title - The RCT2 title music.
rct2.audio.circus - The "ride music" that is played by the circus ride.
rct1.audio.title - The RCT1 title music.

The audio code is a bit of a mess. It went through a few refactors and still remains unfinished. So at some point I need to go back and clean it up.

data/language/en-GB.txt Outdated Show resolved Hide resolved
@Gymnasiast
Copy link
Member

I don’t have a lot to remark about the design, it seems fine to me. Perhaps Duncan can say more about that.

I do think it might be worth splitting off (some of?) the object refactors so everything can be tested properly.

Copy link
Contributor

@frutiemax frutiemax left a comment

Choose a reason for hiding this comment

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

Some auto* places to correct

src/openrct2-ui/audio/AudioContext.cpp Outdated Show resolved Hide resolved
src/openrct2-ui/audio/AudioContext.cpp Outdated Show resolved Hide resolved
src/openrct2-ui/audio/AudioContext.cpp Outdated Show resolved Hide resolved
src/openrct2-ui/audio/AudioContext.cpp Outdated Show resolved Hide resolved
src/openrct2-ui/audio/AudioMixer.cpp Outdated Show resolved Hide resolved
src/openrct2/audio/Audio.cpp Outdated Show resolved Hide resolved
src/openrct2/audio/Audio.cpp Outdated Show resolved Hide resolved
src/openrct2/audio/Audio.cpp Outdated Show resolved Hide resolved
src/openrct2/audio/Audio.cpp Outdated Show resolved Hide resolved
src/openrct2/audio/Audio.cpp Outdated Show resolved Hide resolved
private:
struct Entry
{
OpenRCT2::Audio::IAudioSource* Source{};
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't this a smart pointer.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sources are stored as smart pointers, but on the mixer.

@duncanspumpkin
Copy link
Contributor

There is far too much happening in this PR to be able to review it properly. If it all works i've got nothing much to say about it the audio code as you know is not the prettiest to use.

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.

5 participants