Switch between A2DP and line input #503
-
i made two function out of which bluetooth(bt()) function work fine every time but when i switch to line input (rca())there is no output.please help. void bt() } |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 3 replies
-
Your description does not make any sense to me. You should open I2S for input and output and you write data whenever you want and read data whenever you want. There should not be any need for doing any switching whatsoever... |
Beta Was this translation helpful? Give feedback.
-
thanks problem solved. i use many input ouput so there is some delay in "copier(). can this work done by other core of esp32. Do it divide RAM and create problem. or any alternative of copier(). |
Beta Was this translation helpful? Give feedback.
-
If you want to decrease any delay you need to decrease the size of all involved buffers: https://github.com/pschatzmann/arduino-audio-tools/wiki/Performance |
Beta Was this translation helpful? Give feedback.
-
thanks done , one last problem is that equalizer work on a2dp but not in line input |
Beta Was this translation helpful? Give feedback.
-
If this is the case you did not structure the flow right: Just put it before I2S and make sure that all output is written to the Equilizer |
Beta Was this translation helpful? Give feedback.
-
what is alternative of command a2dp_sink.set_stream_reader(read_data_stream, false); for line input. |
Beta Was this translation helpful? Give feedback.
-
in example code if i write copier to equalizer then there is error. i do not understand how i can write incoming data to equalizer. #include "AudioTools.h" AudioKitStream kit; // Access I2S as stream void read_data_stream(const uint8_t *data, uint32_t length) { void setup(void) {
cfg_eq = eq.defaultConfig(); // register callback // Arduino loop - copy data |
Beta Was this translation helpful? Give feedback.
-
I dont see the Equalizer defined anywhere in your code but the copy should rather be StreamCopy copier(eq, kit); // copy kit to eq |
Beta Was this translation helpful? Give feedback.
-
thank you very much. |
Beta Was this translation helpful? Give feedback.
I dont see the Equalizer defined anywhere in your code but the copy should rather be StreamCopy copier(eq, kit); // copy kit to eq
if you want to send the output thru the Equilizer...