LIJI32 / SameBoy

Game Boy and Game Boy Color emulator written in C
https://sameboy.github.io/
Other
1.58k stars 205 forks source link

Library access to raw APU channel volumes #549

Closed nununoisy closed 1 year ago

nununoisy commented 1 year ago

API implementation for the non-redundant methods laid out in #548.

This includes methods for fetching channel volume, pre-mix amplitude, and period, alongside the wave table with entry splitting as well as edge trigger detection. These are useful for visualizing APU data, e.g. for oscilloscope views of individual channels.

LIJI32 commented 1 year ago

Looks good, just two things:

  1. Move the edge_triggered variables from apu_t to apu_output_t – these are temporary variables that don't affect emulation, so they shouldn't be in apu_t which is saved into save states.
  2. Styling – the opening { of a function definition should be on its own line. (The rest of the {s are well-positioned)
nununoisy commented 1 year ago

Done.

LIJI32 commented 1 year ago

Merged, thanks!