Start with speakers off.
This commit is contained in:
parent
bcf7625285
commit
3751904cb4
@ -70,6 +70,11 @@ void setup() {
|
||||
#endif
|
||||
INFO("Initializing...\n");
|
||||
|
||||
PIN_SPEAKER_L_SETUP();
|
||||
PIN_SPEAKER_R_SETUP();
|
||||
PIN_SPEAKER_L(LOW);
|
||||
PIN_SPEAKER_R(LOW);
|
||||
|
||||
DEBUG("Setting up SPI...\n");
|
||||
SPI.begin();
|
||||
SPI.setHwCs(false);
|
||||
|
@ -10,8 +10,6 @@ Player::Player(SPIMaster* s) {
|
||||
_spi = s;
|
||||
PIN_VS1053_XRESET_SETUP();
|
||||
PIN_VS1053_XRESET(HIGH);
|
||||
PIN_SPEAKER_L_SETUP();
|
||||
PIN_SPEAKER_R_SETUP();
|
||||
_speaker_off();
|
||||
_spi->disable();
|
||||
PIN_VS1053_DREQ_SETUP();
|
||||
@ -534,6 +532,7 @@ bool Player::play() {
|
||||
if (_state != idle) return false;
|
||||
if (_current_playlist == NULL) return false;
|
||||
if (_current_playlist->get_file_count()==0) return false;
|
||||
_speaker_on();
|
||||
_current_playlist->start();
|
||||
String file;
|
||||
if (!_current_playlist->get_current_file(&file)) {
|
||||
|
@ -77,7 +77,6 @@ void Playlist::_examine_http_url(String url) {
|
||||
String ct = http->getContentType();
|
||||
DEBUG("Content-Type is %s.\n", ct.c_str());
|
||||
if (ct.startsWith("audio/x-mpegurl")) {
|
||||
|
||||
_parse_m3u(http);
|
||||
} else if (ct.startsWith("audio/")) {
|
||||
persistence = PERSIST_NONE;
|
||||
|
Loading…
Reference in New Issue
Block a user