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 the audio module less unsafe #33

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Oct 23, 2019

  1. Make the audio module less unsafe

    This is achieved by eliminating two global variables and making the code
    work nicely with ownership analysis.
    
    This is possible because AudioDevice<NesCallback> has a lock method that
    returns an object that dereferences to NesCallback we can store the
    output buffer directly in NesCallback and then safely access it to
    update the raw sound data.
    
    The resulting code is easier to follow and contains fewer unsafe blocks.
    jstasiak committed Oct 23, 2019
    Configuration menu
    Copy the full SHA
    e981594 View commit details
    Browse the repository at this point in the history