Skip to content

Defined ZephyrJS Audio Scope #51

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

Open
OttCS opened this issue Apr 18, 2023 · 6 comments
Open

Defined ZephyrJS Audio Scope #51

OttCS opened this issue Apr 18, 2023 · 6 comments
Labels
enhancement New feature or request Optimization Priority This either is currently being worked on or needs to be.

Comments

@OttCS
Copy link
Collaborator

OttCS commented Apr 18, 2023

ZephyrJS must add something that is entirely unique to Audio, which warrants the creation and not use of Pixi.Sound.

@OttCS OttCS added the Priority This either is currently being worked on or needs to be. label Apr 18, 2023
@OttCS OttCS self-assigned this Apr 18, 2023
@OttCS
Copy link
Collaborator Author

OttCS commented Apr 18, 2023

Two types of ZephyrJS Audio sprites: direct and spatial.

Spatial should have a "source" they are associated with, as well as a "listener." The player function will take care of properly using the webaudio panner node to place it correctly in space.

Implemented. Direct lets the dev set specific gain/pan

@OttCS
Copy link
Collaborator Author

OttCS commented Apr 18, 2023

ZephyrJS Audio sprites should have extremely easy creation, with a good storage backend to eliminate duplicated buffers.

Shared buffer and AudioContext backend for both Direct and Spatial (Good performance, low memory usage)

@OttCS
Copy link
Collaborator Author

OttCS commented Apr 18, 2023

Direct audio should have a simple "gain" attribute for setting the volume and "pan" for left/right, which get created in nodes on a play() call.

Gain and Pan working

@OttCS
Copy link
Collaborator Author

OttCS commented Apr 18, 2023

Clean up finished/dead Audio Nodes so there isn't a memory leak.

According to this:
https://stackoverflow.com/questions/8037930/cleanup-of-audionodes-in-web-audio
Cleanup isn't needed. Nulling out memory might be useful thouh, so adding a Set to store nodes that when stop() gets called, it disconnect, nulls, and removes.

@OttCS OttCS added enhancement New feature or request Optimization Priority This either is currently being worked on or needs to be. and removed Priority This either is currently being worked on or needs to be. labels Apr 18, 2023
@OttCS OttCS changed the title Define ZephyrJS Audio Scope Defined ZephyrJS Audio Scope Apr 18, 2023
@OttCS
Copy link
Collaborator Author

OttCS commented Apr 26, 2023

DirectAudio now has loop and speed options, as well as a much better constructor

@OttCS
Copy link
Collaborator Author

OttCS commented Apr 26, 2023

Autoplay is in progress, but it doesn't work until user interaction with the page.

@OttCS OttCS moved this to 🔧 Active in ZephyrJS Progress Board Jul 12, 2023
@OttCS OttCS moved this from 🔧 Active to 🤔 Requests in ZephyrJS Progress Board Sep 6, 2023
@OttCS OttCS removed their assignment Sep 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Optimization Priority This either is currently being worked on or needs to be.
Projects
Status: 🤔 Requests
Development

No branches or pull requests

1 participant