Code Monkey home page Code Monkey logo

Comments (3)

iflan avatar iflan commented on June 1, 2024

That's very interesting. It made me think about different ways of approaching it.

The way you suggest is mostly straightforward. The only minor problem is that the emulator doesn't (currently) have code that supports delayed actions, like going back into accelerated mode, except by using browser timers. But the browser timers are in real-time, regardless of what the emulator is doing.

I wonder if it is possible to just slow down the sound output instead of actually slowing down the emulation by changing how _calcSampleRate works. I'm guessing that this would work fine because few (if any) programs that make sound count on the accelerator. (And if they did count on the accelerator, then they would have to account for the difference between the FASTChip, ZIP Chip and others.

Thoughts?

from apple2js.

inexorabletash avatar inexorabletash commented on June 1, 2024

For long sounds (eg Electric Duet) the buffer would get very large. For short SFX it might work.

from apple2js.

whscullin avatar whscullin commented on June 1, 2024

For the most part the way cycles are handled hasn't been updated since it was a struggle to get 1/30th of a second's worth of CPU into the gap between frames. Having a conditional or any additional code during the run loop was troublesome. Now we can do 60fps with room to spare, so it might be reasonable add code to count fast and slow cycles and handle frames that are mix. We'd have to think about how we'd want to do that.

from apple2js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.