add debug messages to audio

master
Gabriel Young 2017-03-02 12:28:12 -08:00
parent d11962aeb2
commit 0734f56940
1 changed files with 150 additions and 144 deletions

View File

@ -106,6 +106,8 @@ void audio_init()
void stop_all_notes()
{
dprintf("audio stop all notes");
if (!audio_initialized) {
audio_init();
}
@ -128,6 +130,8 @@ void stop_all_notes()
void stop_note(float freq)
{
dprintf("audio stop note freq=%d", (int)freq);
if (playing_note) {
if (!audio_initialized) {
audio_init();
@ -312,6 +316,8 @@ ISR(TIMER3_COMPA_vect)
void play_note(float freq, int vol) {
dprintf("audio play note freq=%d vol=%d", (int)freq, vol);
if (!audio_initialized) {
audio_init();
}