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

[Feature Request] Audio #23

Open
8 of 10 tasks
lucasstarsz opened this issue May 27, 2021 · 0 comments
Open
8 of 10 tasks

[Feature Request] Audio #23

lucasstarsz opened this issue May 27, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@lucasstarsz
Copy link
Member

lucasstarsz commented May 27, 2021

Is your feature request related to a problem? Please describe.

FastJ 1.5.0 is near, and an audio engine would be a great addition to the arsenal of tools.

What should the solution be like?

The Audio engine should, for 1.5.0, support the following features:

  • Load/Unload audio into memory
  • Play audio
  • Loop audio
  • Hook into audio events (start, stop, open, close)
  • Change audio volume
  • Change audio pan
  • Linearly interpolate between volume/pan/other configurable values

As an aside, the branch should also contain:

  • Examples for how to use the audio engine
    • Simple audio example explaining how to play sound using AudioManager#playSound as well as file paths
    • More complex example of working with audio, covering all topics mentioned above -- see Example Programs #20
  • Unit testing -- see Testing #3

Progress will be tracked in the audio branch.

@lucasstarsz lucasstarsz added the enhancement New feature or request label May 27, 2021
@lucasstarsz lucasstarsz self-assigned this May 27, 2021
@lucasstarsz lucasstarsz mentioned this issue May 27, 2021
18 tasks
lucasstarsz added a commit that referenced this issue May 31, 2021
New Additions:
- `Maths#withinRange` & `Maths.withinIntegerRange`, for constraining a float/int to be between two numbers.
Other Changes:
- Fixed package link in `module-info.java`
lucasstarsz added a commit that referenced this issue May 31, 2021
- `AudioEventListener`, for performing actions when audio events (open, start, pause, resume, stop, close) occur
- `PlaybackState`, for determining the exact state of the audio (playing, paused, stopped)
lucasstarsz added a commit that referenced this issue Jul 10, 2021
New Additions:
- `Audio` interface, stating the standard information and features of all `Audio` instances
    - Play, Pause, Resume, Stop Controls
    - Audio Event Hooks (open, close, play, pause, resume, stop)
    - Playback state-keeping
    - Playback position checking
- `MemoryAudio` class, the original `Audio` class but more aptly named for how it works.
    - Explicit Looping Controls (set loop count, loop points, immediate loop stopping)
    - Explicit playback position controls (seeking, rewinding)
- `StreamedAudio` class, the new `Audio` class which streams audio as it comes in, rather than loading it into memory.
    - Gain Controls
    - Pan Controls
    - Balance Controls
    - Mute Controls

Breaking Changes:
- `AudioManager` now handles all loading/unloading for both `MemoryAudio` and `StreamedAudio`
- `MemoryAudioPlayer` and `StreamedAudioPlayer` now handle all audio playing/state changing for `MemoryAudio` and `StreamedAudio` respectively

Other Changes:
- Added more audio unit tests
lucasstarsz added a commit that referenced this issue Jul 10, 2021
…g, added missing documentation

Breaking Changes:
- `PlaybackState` has been moved to `systems.audio.state`
lucasstarsz added a commit that referenced this issue Aug 9, 2021
lucasstarsz added a commit that referenced this issue Aug 9, 2021
lucasstarsz added a commit that referenced this issue Aug 9, 2021
* begin work on sound example

* add beginning description of MemoryAudio

* continue work on simple audio example

* (#3, #23) Add simple audio example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant