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

feat(audio): add audioPlugin and audio sample #1383

Merged
merged 3 commits into from
Nov 29, 2024

Conversation

diogomsmiranda
Copy link
Contributor

@diogomsmiranda diogomsmiranda commented Nov 23, 2024

Description

Adds audioPlugin, this finally adds audio to CUBOS. You can manage entities now with the new components AudioListenerand AudioSource.

You can play, stop and pause sounds by adding the components, AudioPlay, AudioPause, AudioStop, to the AudioSource's entity.

closes #1004 #1317 #1318 #231 #1041 #1042

What's Missing

A more extensive sample?
Core Tests / Engine Tests?

Checklist

  • Self-review changes.
  • Evaluate impact on the documentation.
  • Ensure test coverage.
  • Write new samples.
  • Add entry to the changelog's unreleased section.

Copy link
Contributor

github-actions bot commented Nov 23, 2024

PR Preview Action v1.4.8
🚀 Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1383/
on branch gh-pages at 2024-11-29 20:15 UTC

@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch from d3ab458 to 6fa4a18 Compare November 23, 2024 17:51
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

engine/samples/audio/main.cpp Show resolved Hide resolved
core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
engine/src/audio/plugin.cpp Outdated Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Outdated Show resolved Hide resolved
@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch from 6fa4a18 to 044b775 Compare November 23, 2024 17:56
Copy link

codecov bot commented Nov 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 182 lines in your changes missing coverage. Please review.

Project coverage is 53.04%. Comparing base (b7c2823) to head (0e8a268).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
engine/src/audio/plugin.cpp 0.00% 118 Missing ⚠️
core/src/al/miniaudio_context.cpp 0.00% 31 Missing ⚠️
engine/src/audio/source.cpp 0.00% 12 Missing ⚠️
engine/src/audio/listener.cpp 0.00% 4 Missing ⚠️
engine/src/audio/listener_impl.cpp 0.00% 4 Missing ⚠️
engine/src/transform/local_to_world.cpp 0.00% 4 Missing ⚠️
engine/src/audio/pause.cpp 0.00% 2 Missing ⚠️
engine/src/audio/play.cpp 0.00% 2 Missing ⚠️
engine/src/audio/source_impl.cpp 0.00% 2 Missing ⚠️
engine/src/audio/stop.cpp 0.00% 2 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1383      +/-   ##
==========================================
- Coverage   53.39%   53.04%   -0.35%     
==========================================
  Files         451      460       +9     
  Lines       25844    26014     +170     
  Branches     2390     2411      +21     
==========================================
  Hits        13800    13800              
- Misses      12044    12214     +170     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch from c632fe1 to d05104f Compare November 24, 2024 19:17
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/2)

core/include/cubos/core/al/miniaudio_context.hpp Outdated Show resolved Hide resolved
engine/include/cubos/engine/audio/source.hpp Outdated Show resolved Hide resolved
engine/include/cubos/engine/audio/source.hpp Outdated Show resolved Hide resolved
engine/include/cubos/engine/audio/source.hpp Outdated Show resolved Hide resolved
engine/include/cubos/engine/audio/source.hpp Outdated Show resolved Hide resolved
engine/include/cubos/engine/audio/source.hpp Outdated Show resolved Hide resolved
engine/include/cubos/engine/audio/source.hpp Outdated Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (2/2)

engine/src/audio/plugin.cpp Show resolved Hide resolved
@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch 4 times, most recently from d5018ed to 6ece7c3 Compare November 26, 2024 00:23
@diogomsmiranda diogomsmiranda marked this pull request as ready for review November 26, 2024 00:52
@diogomsmiranda diogomsmiranda requested review from RiscadoA and a team as code owners November 26, 2024 00:52
@diogomsmiranda diogomsmiranda requested review from Dageus and removed request for a team November 26, 2024 00:52
@kuukitenshi kuukitenshi self-requested a review November 26, 2024 09:39
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
core/src/al/miniaudio_context.cpp Outdated Show resolved Hide resolved
@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch from 3fd3e5e to b10a017 Compare November 26, 2024 12:38
Copy link
Contributor

@Dageus Dageus left a comment

Choose a reason for hiding this comment

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

There's not much to point out since I also worked on this, lgtm!

Copy link
Contributor

@kuukitenshi kuukitenshi left a comment

Choose a reason for hiding this comment

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

Seems good overall! 🚀
The only thing that I'd point out, it's what has already been discussed about the physics plugin to get velocity, etc, so it's fine for now :)

Copy link
Member

@RiscadoA RiscadoA left a comment

Choose a reason for hiding this comment

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

Ty very much for working on this! Feel free to merge after resolving my comments.
Make sure to take the time to open follow up issues on work that can be done to improve what this PR adds, or stuff that's missing.
Also, the issues you linked to be closed were not detected by GitHub automatically, you'll have to link them manually.

core/include/cubos/core/al/audio_context.hpp Outdated Show resolved Hide resolved
core/src/al/audio_context.cpp Outdated Show resolved Hide resolved
engine/samples/audio/assets/medieval_fanfare.wav Outdated Show resolved Hide resolved
engine/samples/audio/main.cpp Outdated Show resolved Hide resolved
engine/samples/audio/main.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Show resolved Hide resolved
engine/src/audio/plugin.cpp Outdated Show resolved Hide resolved
engine/src/audio/plugin.cpp Outdated Show resolved Hide resolved
engine/src/audio/source_impl.hpp Outdated Show resolved Hide resolved
@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch 2 times, most recently from d48f9dc to d7c63fc Compare November 29, 2024 19:33
@github-actions github-actions bot added D-Complex Looks hard S-Blocked Blocked on another issue or PR S-Needs-Design Demands some time designing an implementation labels Nov 29, 2024
@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch from d7c63fc to 659eb2f Compare November 29, 2024 19:45
Co-Authored-By: João Miguel Nogueira <[email protected]>
@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch from 659eb2f to 39c8d7c Compare November 29, 2024 19:46
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

⚠️ Clang-Tidy found issue(s) with the introduced code (1/1)

engine/src/audio/plugin.cpp Show resolved Hide resolved
@Dageus Dageus force-pushed the 231-add-initial-audio-plugin branch from 39c8d7c to 2fd7e02 Compare November 29, 2024 20:13
diogomsmiranda and others added 2 commits November 29, 2024 20:14
Co-Authored-By: João Miguel Nogueira <[email protected]>
@diogomsmiranda diogomsmiranda force-pushed the 231-add-initial-audio-plugin branch from 2fd7e02 to 0e8a268 Compare November 29, 2024 20:15
@diogomsmiranda diogomsmiranda enabled auto-merge (rebase) November 29, 2024 20:16
@diogomsmiranda diogomsmiranda merged commit 9f6aac1 into main Nov 29, 2024
9 checks passed
@diogomsmiranda diogomsmiranda deleted the 231-add-initial-audio-plugin branch November 29, 2024 20:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core A-Engine B-Assets B-Audio C-Tracking-Issue D-Complex Looks hard S-Blocked Blocked on another issue or PR S-Needs-Design Demands some time designing an implementation
Projects
None yet
4 participants