Unverified Commit 57b3bb7d authored by Wolle's avatar Wolle Committed by GitHub

access to audiodata for external use

parent 10e7eb6b
......@@ -3797,6 +3797,15 @@ int Audio::sendBytes(uint8_t* data, size_t len) {
}
}
compute_audioCurrentTime(bytesDecoded);
if(audio_process_extern){
bool continueI2S = false;
audio_process_extern(m_outBuff, m_validSamples, &continueI2S);
if(!continueI2S){
return bytesDecoded;
}
}
while(m_validSamples) {
playChunk();
}
......
......@@ -2,7 +2,7 @@
* Audio.h
*
* Created on: Oct 26,2018
* Updated on: Oct 27,2021
* Updated on: Nov 10,2021
* Author: Wolle (schreibfaul1)
*/
......@@ -77,6 +77,7 @@ extern __attribute__((weak)) void audio_icydescription(const char*);
extern __attribute__((weak)) void audio_lasthost(const char*);
extern __attribute__((weak)) void audio_eof_speech(const char*);
extern __attribute__((weak)) void audio_eof_stream(const char*); // The webstream comes to an end
extern __attribute__((weak)) void audio_process_extern(int16_t* buff, uint16_t len, bool *continueI2S); // record audiodata or send via BT
//----------------------------------------------------------------------------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment