Skip to content

Implement Audio playback #41

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

Merged
merged 6 commits into from
Jul 7, 2024
Merged

Implement Audio playback #41

merged 6 commits into from
Jul 7, 2024

Conversation

craigthomas
Copy link
Owner

@craigthomas craigthomas commented Jul 6, 2024

This PR adds audio playback to the emulator. It works by adding an audio_pattern_buffer that is 16 bytes long. The 16 byte pattern is then converted into a 128-bit array, by taking each bit of the pattern and generating either a 0 or a 1. The array is then resampled so that it matches the playback frequency of Pygame's mixer. This PR closes #32

Copy link

codecov bot commented Jul 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.87%. Comparing base (1da3918) to head (efb7d63).
Report is 7 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #41      +/-   ##
==========================================
+ Coverage   90.27%   92.87%   +2.60%     
==========================================
  Files           4        4              
  Lines         473      660     +187     
==========================================
+ Hits          427      613     +186     
- Misses         46       47       +1     
Files Coverage Δ
chip8/cpu.py 96.45% <100.00%> (-0.89%) ⬇️

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d73204c...efb7d63. Read the comment docs.

@craigthomas craigthomas merged commit cbcd53a into main Jul 7, 2024
3 checks passed
@craigthomas craigthomas deleted the audio-playback branch July 22, 2024 01:30
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.

Add Audio Playback Operation
1 participant