Comments (3)
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.
For long sounds (eg Electric Duet) the buffer would get very large. For short SFX it might work.
from apple2js.
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)
- CATALOG Bug on Floppy Disk HOT 5
- Apple II DeskTop's triggering DHR Mono mode fails HOT 2
- State saving and recovery is not good when using a smart drive HOT 4
- Mocking board emulation
- ThunderClock is not interrupting. HOT 2
- Loading a disk into Drive 2 reloads the disk from Drive 1 HOT 1
- how to exit fullscreen HOT 10
- Saving self-written program to file/localStorage? HOT 3
- Disabling Mouse Joystick HOT 1
- Better Rendering HOT 2
- Virtual keyboard issue on Android hosted Chrome
- Issue in bank 1 writing HOT 3
- Merlin need Apple 2c or 2e-128 HOT 1
- Is there documentation, or a changelog, besides the commit comments?
- a bit more explanation on creating a static distribution HOT 1
- Save state, load no more? HOT 1
- README says sit instead of git HOT 1
- Memory size? HOT 3
- Apple IIgs support? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apple2js.