From e705df0cbfeb040d96fb1a385edfa5fdfc3f3203 Mon Sep 17 00:00:00 2001 From: Hendrik Langer Date: Fri, 21 Apr 2017 16:42:45 +0200 Subject: [PATCH] Don't play random noise on startup --- src/sound.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/sound.cpp b/src/sound.cpp index f1efbea..838119d 100644 --- a/src/sound.cpp +++ b/src/sound.cpp @@ -59,6 +59,7 @@ void Sound::init() { i2s_driver_install(i2s_num, &i2s_config, 0, NULL); i2s_set_pin(i2s_num, &pin_config); + /* play a sine wave (example code) */ triangle_float = -32767; for(i = 0; i < SAMPLE_PER_CYCLE; i++) { @@ -76,6 +77,8 @@ void Sound::init() { i2s_push_sample(i2s_num, (char *)&sample_val, portMAX_DELAY); } + + stop(); } void Sound::play() {