Header file issue and IntegerDivideByZero Exception #1568
-
Board: ESP32 Dev First issue is header file inclusion - see comments in code for #include area - what causes this and how do I fix it? After code, see exception report from AudioLogger::Debug. Only changes to source was having to add AudioConfig.h for unexplainable reason since its already contained in AudioTools.h (???) and I2S settings for pins and Adafruit I2S format for MAX98357A board. `#include "BluetoothA2DPSink.h" BluetoothA2DPSink a2dp_sink; // Write data to I2S void setup() { // register callback // Start Bluetooth Audio Receiver // setup output cfg.pin_bck = 12; cfg.sample_rate = a2dp_sink.sample_rate(); void loop() { delay(100); }` Exception report: `ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) Core 1 register dump: Backtrace: 0x400d8991:0x3ffcb7f0 0x400d96fd:0x3ffcb840 0x400d30ee:0x3ffcb880 0x400d32b9:0x3ffcb900 0x400d3529:0x3ffcb970 0x400d3efd:0x3ffcb9e0 0x400d6d86:0x3ffcbaa0 ELF file SHA256: d8221aa412343b94 Board Settings See attachment |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Update: - do this: '#include "AudioTools.h" not this and suddenly include problem with requiring AudioConfig.h goes away. But exception remains. |
Beta Was this translation helpful? Give feedback.
-
Where do you have the example from that does the import of A2DP first ? The crash comes from the fact that the sample rate is not defined: it must be 44100!
|
Beta Was this translation helpful? Give feedback.
-
The example comes from: the cfgcfg.sample_rate = 44100; and the while(!a2dp_sink.is_connected()) delay(10); both worked. I will stick with the delay so i2s can determine sample rate from a2dp. I also decided to do the install via git so git pull can keep updates going. I do get one warning even tho everything works, just for your information... E (461) esp_core_dump_fl��K���ɕ�dump data check failed: Everything works well. Thank you for this library and your help. Sending coffee! |
Beta Was this translation helpful? Give feedback.
Where do you have the example from that does the import of A2DP first ?
The crash comes from the fact that the sample rate is not defined: it must be 44100!
The effective sample rate is only available after you have connected, so you need to either