We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
int outputUrlToSpeaker(String url) { static int lastms = 0; unsigned long startTime = millis(); // 현재 시간 기록
file = new AudioFileSourceHTTPStream(url.c_str()); buff = new AudioFileSourceBuffer(file, preallocateBuffer, preallocateBufferSize); mp3 = new AudioGeneratorMP3(); mp3->begin(buff, out); digitalWrite(LED_audio, HIGH); while (mp3->isRunning() && millis() - startTime < 10000) { // 현재 시간이 시작 시간으로부터 10초 이내일 때까지 루프 실행 if (!mp3->loop()) { mp3->stop(); <---- After the sound stops, wait 4-5 minutes. problem???? if (file != nullptr) { delete file; file = nullptr; } digitalWrite(LED_audio, LOW); delete out; delete mp3; return -1; // MP3가 중간에 중단되었음을 나타냄 } // 1초마다 시간 출력 if (millis() - lastms > 1000) { lastms = millis(); Serial.printf("Running for %d ms...\n", lastms); Serial.flush(); } } return 0; // 성공적으로 MP3가 종료됨을 나타냄
}
The text was updated successfully, but these errors were encountered:
...and what happens after 4-5 minutes?
Sorry, something went wrong.
No branches or pull requests
int outputUrlToSpeaker(String url) {
static int lastms = 0;
unsigned long startTime = millis(); // 현재 시간 기록
}
The text was updated successfully, but these errors were encountered: