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