Example won't compile - error: use of deleted function #1579
-
I did a git pull today, also installed the sd fat library today via git clone. Using example: My ONLY change to code is cfg.name = "MyMusic"; Error Messages: `In file included from C:\Users\fscii\AppData\Local\Temp.arduinoIDE-unsaved2024428-17304-15na9t9.f6crf\player-sdfat-a2dp\player-sdfat-a2dp.ino:14: exit status 1 Compilation error: exit status 1` |
Beta Was this translation helpful? Give feedback.
Replies: 13 comments 2 replies
-
There seem to be some changes to the SDFAT library: If you read the Readme of that library you can find in the first sentence how to resolve this issue!
|
Beta Was this translation helpful? Give feedback.
-
I am using latest commit - it seems its been resolved. Thank you! There is one other issue. If Audiokit is using SD card (several examples I've tried), I cannot have UART connected or I get errors like: Example 1: Working SD Example 2: Not working SD Except now SD card (same sd card, same path as example 1) isn't working? [W] A2DPStream.h : 296 - ==> state: Connecting If I change headers and code to not use AudioSourceSDFAT.h anymore but make these changes: AudioSourceSD source(startFilePath, ext, PIN_AUDIO_KIT_SD_CARD_CS); I get similar results: It seems both libraries are having an issue with the SD card in 2nd example but not in the first example. What am I missing? |
Beta Was this translation helpful? Give feedback.
-
The AudioKits have different pin conflicts. If you activate the SD some buttons will not work and it depends on the version which one it is. I suggest that you have a closer look at pin assignments of your device to get a better understanding. The SD does not work in your second example because you did not activate it in your code! Have a look at the commented out code which shows how this is done for the AudioKit! The sketch uses the default (SPI and CS) pins of the ESP32 which are different then the ones needed by the AudioKit! |
Beta Was this translation helpful? Give feedback.
-
Surprise surprise, works fine lol. I went through so many AudioKit examples, when I didn't find SD+BT Transmit, I found it in another folder and missed that I had to set all of the SPI active not just CS because I forgot it wasn't an AudioKit example. Sorry about that and thanks! |
Beta Was this translation helpful? Give feedback.
-
There still seems to be one remaining issue. 2nd example, sd card only plays first file? In 1st example, sd plays through all mp3 files. ?? First song ending... then music stops and 2nd song not reached. -- AudioLogger set to Info [I] StreamCopy.h : 147 - StreamCopy::copy 1024 -> 1024 -> 1024 bytes - in 1 hops For reference, the sink/target is another ESP32 A2DP from ESP32_A2DP. |
Beta Was this translation helpful? Give feedback.
-
Try to activate the A2DP logging. Maybe the break between the files is too long and A2DP hangs up because it could not read any data. If this is the case you can try to set cfg.silence_on_nodata = true; |
Beta Was this translation helpful? Give feedback.
-
On the source I have: Is there code you could share how to do A2DP logging? I haven't seen it yet. I did anyway try cfg.silence_on_nodata = true; and I got the exact same error. |
Beta Was this translation helpful? Give feedback.
-
https://github.com/pschatzmann/ESP32-A2DP?tab=readme-ov-file#logging If the SD library is working for you, why don't you just stick with it ? |
Beta Was this translation helpful? Give feedback.
-
I am trying to use BT as source from audiokit which has sd card. This is why I'm using this example. Has anyone else tried this example? I added the additional logging set to Debug->Level: Info and here is the area of concern: (using only a few, few second long mp3 sound files to speed up testing) First one plays then it stops. I still have cfg.silence_on_nodata = true; [ 10977][I][BluetoothA2DPSource.cpp:655] bt_app_av_sm_hdlr(): [BT_AV] bt_app_av_sm_hdlr state APP_AV_STATE_CONNECTED, evt 0x1 (this last line repeats forever) Do you get the same result? |
Beta Was this translation helpful? Give feedback.
-
Did you try to change your sketch to use the SD library ? Maybe you need to be a little bit more systematic to identfy your issue. This sketch is way too complicated to test the SDFAT library. |
Beta Was this translation helpful? Give feedback.
-
I did try SD Library after SDFat gave some trouble. Both work but both give same result. I'm currently using the SD libary. Note: Running on AudioKit `/**
//remove this, to find issues regarding mp3 decoding #include "AudioTools.h" const char startFilePath="/"; void setup() { // Setting up SPI if necessary with the right SD pins by calling // setup output - We send the test signal via A2DP - so we conect to a Bluetooth Speaker cfg.silence_on_nodata = true; // suggested by author when a2dp disconnects after first file played out.begin(cfg); // setup player } void loop() { |
Beta Was this translation helpful? Give feedback.
-
For the record, I took your advice and looked at: I tried I2S microphone into A2DP --> out to another BT speaker (same one) and it works fine. I just had to add: a2dp_source.set_volume(64); because without volume control, horrific feedback probably due to 2 microphones on audiokit (?) (New question. why is BluetoothA2DPSource::set_volume(uint_8) but AudioPlayer::set_volume(float)? Still no luck on SD->A2DP tho. Seems like something in SD breaks A2DP sink. |
Beta Was this translation helpful? Give feedback.
-
BluetoothA2DPSource is part of the A2DP project and uses the original (unconverted) A2DP volume values. The AudioTools project (classes) use volume values between 0 and 1.0 consistently. |
Beta Was this translation helpful? Give feedback.
There seem to be some changes to the SDFAT library: If you read the Readme of that library you can find in the first sentence how to resolve this issue!