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

audio_music: log the reason why mixer could not be created #4168

Merged
merged 1 commit into from
Sep 5, 2021
Merged

audio_music: log the reason why mixer could not be created #4168

merged 1 commit into from
Sep 5, 2021

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Sep 5, 2021

On NixOS SDL2_mixer was not configured fully against timidity,
but it was not immediately clear:
10:02:38: [ERROR] PlayMusic: music parameter was NULL

With the patch error reporting is more straightforward:
10:03:45: [ERROR] Play: Couldn't open /etc/timidity/freepats.cfg

The change makes error handling in
void Music::Play( const std::vector<uint8_t> & v, const bool loop )
void Music::Play( const std::string & file, const bool loop )
identical.

On NixOS SDL2_mixer was not configured fully against timidity,
but it was not immediately clear:
    10:02:38: [ERROR]       PlayMusic:  music parameter was NULL

With the patch error reporting is more straightforward:
    10:03:45: [ERROR]       Play:  Couldn't open /etc/timidity/freepats.cfg

The change makes error handling in
    void Music::Play( const std::vector<uint8_t> & v, const bool loop )
    void Music::Play( const std::string & file, const bool loop )
identical.
@oleg-derevenetz oleg-derevenetz added improvement New feature, request or improvement audio Sound and music related stuff labels Sep 5, 2021
@oleg-derevenetz oleg-derevenetz added this to the 0.9.7 milestone Sep 5, 2021
src/engine/audio.cpp Show resolved Hide resolved
@ihhub ihhub merged commit 91f9899 into ihhub:master Sep 5, 2021
@ihhub
Copy link
Owner

ihhub commented Sep 5, 2021

@trofi , thank you so much for your contribution to the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
audio Sound and music related stuff improvement New feature, request or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants