Fixing audio glitches with wave and noise channels

This commit is contained in:
2025-02-14 16:44:22 -07:00
parent 8fc7992ca5
commit 96c0196306
7 changed files with 166 additions and 25 deletions

View File

@ -99,6 +99,24 @@ typedef struct {
u8 wave_ram[16];
float sq1_history[4410];
u32 sq1_index;
float sq2_history[4410];
u32 sq2_index;
float ch3_history[4410];
u32 ch3_index;
float ch4_history[4410];
u32 ch4_index;
float left_history[4410];
u32 left_index;
float right_history[4410];
u32 right_index;
} audio_context;
void audio_init();
@ -106,4 +124,6 @@ void audio_tick();
void audio_period_tick();
u8 audio_read(u16 address);
void audio_write(u16 address, u8 value);
void audio_write(u16 address, u8 value);
audio_context *audio_get_context();