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 test cases for AudioStreamWAV #60736

Merged

Conversation

StrawbDev
Copy link
Contributor

Part of #43440

This PR adds tests for AudioStreamSample, mostly to check the save_to_wav() method. This needs the AudioServer running for it to work, so I modified the test case listener in test_main.cpp to start AudioServer with the dummy driver for these tests. The saved .wav files are checked using ResourceImporterWAV, but that is only available if compiling with tools enabled. This is my first PR for Godot so if there are any problems with this please let me know :)

@StrawbDev StrawbDev requested a review from a team as a code owner May 3, 2022 22:06
@Calinou Calinou added this to the 4.0 milestone May 3, 2022
@StrawbDev StrawbDev force-pushed the audio-stream-sample-unit-test branch from 25cadb4 to 354d7c4 Compare May 3, 2022 23:15
@akien-mga akien-mga changed the title Add test cases for AudioStreamSample Add test cases for AudioStreamWAV Aug 4, 2022
@akien-mga akien-mga force-pushed the audio-stream-sample-unit-test branch from 354d7c4 to 3c252d5 Compare August 4, 2022 11:26
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

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

Apologies for the late review.

This looks great! I force pushed an update to rename Sample to WAV following #60957.

I also tweaked the test to initialize the AudioServer in test_main.cpp to match only on Audio so we can use it for future audio-related tests. This calls for some refactoring eventually so that tests can be responsible for registering what kind of additional features they need, but that's not critical for now.

@akien-mga akien-mga merged commit 29afda3 into godotengine:master Aug 4, 2022
@akien-mga
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants