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

Refactor runtime to support AudioPlayer #306

Merged
merged 19 commits into from
Feb 5, 2023
Merged

Conversation

JD557
Copy link
Owner

@JD557 JD557 commented Feb 5, 2023

Refactors the runtime so that the audio player can be used just as easily as the Canvas.

This is a large PR with a ton of changes:

  • Low-level subsystems are now abstracted
  • Manager classes (e.g. CanvasManager) were removed in favor of plain Function0
  • RenderLoop completely refactored:
    • RenderLoop renamed to AppLoop
    • Loop class was removed
    • ImpureRenderLoop/PureRenderLoop distinction was removed. The effect is now picked automatically with a FrameEffect typeclass
    • The impure render frame operation is now State => Subsystem => Unit instead of (Subsystem, State) => Unit
    • Currying changed (see the new AppLoop.Definition)
  • MinartApp moved from pure to core, now it can also be used in impure programs
  • Added the new AudioPlayerIO operations

I'm not entirely happy with the results (namely, composing subsystems seems unnecessarily complex), but some of the changes seem to be on the right direction for #18

@JD557 JD557 added this to the 0.5.0 milestone Feb 5, 2023
@JD557 JD557 merged commit e7362d9 into experimental-0.5 Feb 5, 2023
@JD557 JD557 deleted the compose-managers branch February 5, 2023 14:19
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