I was able to make my own audio without using QMK's audio features, if it helps anyone here is some sample code that works, it would be nice if QMK audio could work though if anyone has thoughts on that issue:
#include <avr/io.h>
#include <util/delay.h>
#define SPEAKER_PORT PORTC
#define SPEAKER_DDR DDRC
#define SPEAKER_PIN 6
void delay_10_us(uint16_t count) {
while(count--) {
_delay_us(10);
}
}
void PLAYNOTE(float duration, float frequency)
{
long int i,cycles;
float half_period;
float wavelength;
wavelength=(1/frequency)*1000;
cycles=duration/wavelength;
half_period = (wavelength/2)*34;
SPEAKER_DDR |= (1 << SPEAKER_PIN);
for (i=0;i<cycles;i++)
{
delay_10_us(half_period);
SPEAKER_PORT |= (1 << SPEAKER_PIN);
delay_10_us(half_period);
SPEAKER_PORT &= ~(1 << SPEAKER_PIN);
}
return;
}
PLAYNOTE(400,880);
PLAYNOTE(400,932);
PLAYNOTE(400,988);
PLAYNOTE(400,1047);
PLAYNOTE(400,1109);