From edf51f4704c35790ab84cffc5d726b9ca1dc7e63 Mon Sep 17 00:00:00 2001 From: Kizarm Date: Sat, 9 Mar 2024 13:41:24 +0100 Subject: [PATCH] clean midiplayer --- midi/midiplayer.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/midi/midiplayer.cpp b/midi/midiplayer.cpp index 9a364f4..497cfa6 100644 --- a/midi/midiplayer.cpp +++ b/midi/midiplayer.cpp @@ -2,7 +2,7 @@ #include "tone.h" #include "audio.h" #include "pcmdma.h" -//#include "filtr.h" +#include "pwmconfig.h" /** * @file * @brief Jednoduchý přehrávač midi souborů. @@ -48,18 +48,17 @@ static unsigned pwm_sd (const int input) { /******************************************************************/ /// Konstruktor -MidiPlayer::MidiPlayer() noexcept : OneWay() /*, but(GpioPortA, 2, GPIO_Mode_IN)*/ { - //but.setPuPd(GPIO_PuPd_UP); +MidiPlayer::MidiPlayer() noexcept : OneWay() { index = 0; pause = 0; melody = scores[index++]; running = true; } unsigned MidiPlayer::Send (uint16_t * const ptr, const unsigned len) { - // if (!but.get()) running = true; +//if (!but.get()) running = true; // případně spouštět tlačítkem, není implementováno if (!running) { - for (unsigned n=0; n> 1; return len; } @@ -70,7 +69,7 @@ unsigned MidiPlayer::Send (uint16_t * const ptr, const unsigned len) { return len; } void MidiPlayer::stop (void) { -//running = false; +//running = false; // cyklicky, furt melody = scores[index++]; if (!melody) { index = 0;