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

Make APIs more consistent between Planes/SurfaceViews and AudioWaves/AudioClips #347

Merged
merged 3 commits into from
Apr 8, 2023

Conversation

JD557
Copy link
Owner

@JD557 JD557 commented Apr 8, 2023

Makes the following changes to the APIs

  • AudioWave is now a trait
  • Methods accept Plane instead of (Int, Int) => Color and AudioWave instead of Double => Double
    • Since Scala 2.11 support was dropped, the old syntax should still work due to SAMs, and the API is clearer
    • Added an AudioClip.fromFunction helper anyway, if one wants to be explicit
  • AudioClip doesn't extend Double => Double anymore
  • AudioClip#contramap returns an AudioWave (previously returned a clip with the same duration)
  • Deprecated Plane#fromSurfaceWithRepetition in favor of a new SurfaceView#repeating

@JD557 JD557 added this to the 0.5.1 milestone Apr 8, 2023
@JD557 JD557 merged commit cf0e57b into master Apr 8, 2023
@JD557 JD557 deleted the sam-encoding branch April 8, 2023 17:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant