Skip to content
Permalink
Browse files

sound fix

  • Loading branch information
corax89 committed Dec 3, 2019
1 parent 1f20d1f commit dd7470d69c1bebd4c10eda17ac1f52f09ff37de5
Showing with 5 additions and 10 deletions.
  1. +5 −10 ESP8266_little_game_engine.ino
  2. BIN ESP8266_little_game_engine.ino.d1_mini.bin
@@ -23,7 +23,7 @@
ESPboyLED myled;
#endif

Coos <5, 0> coos;
Coos <4, 0> coos;

// Use hardware SPI
TFT_eSPI tft = TFT_eSPI();
@@ -39,7 +39,7 @@ uint8_t i2c_adress;
uint8_t thiskey;
char c;
Ticker timer;
int delay_rtttl;
int delay_rtttl = 50;
uint16_t cadr_count = 0;
unsigned long timeF,timeR;
uint16_t timeCpu = 0,timeGpu = 0,timeSpr = 0,cpuOPS = 0,cpuOPSD = 0;
@@ -299,6 +299,8 @@ void coos_cpu(void){
cpuOPS += 1;
cpuRun(1000);
timeCpu += millis() - timeR;
if(delay_rtttl <= 0)
delay_rtttl = playRtttl();
}
}

@@ -331,6 +333,7 @@ void ICACHE_RAM_ATTR timer_tick(void){
if(timers[i] >= 1)
timers[i] --;
}
delay_rtttl--;
updateRtttl();
}

@@ -344,13 +347,6 @@ void coos_key(void){
}
}

void coos_rtttl(void){
while(1){
delay_rtttl = playRtttl();
COOS_DELAY(delay_rtttl);
}
}

void coos_info(void){
while(1){
COOS_DELAY(1000); // 1000 ms
@@ -491,7 +487,6 @@ void setup() {
coos.register_task(coos_cpu);
coos.register_task(coos_screen);
coos.register_task(coos_key);
coos.register_task(coos_rtttl);
coos.register_task(coos_info);
coos.start(); // init registered tasks
}
Binary file not shown.

0 comments on commit dd7470d

Please sign in to comment.
You can’t perform that action at this time.