how to receive input from line in and output to headphones using the 'streams-audiokit-audiokit' example from arduino-audio-tools #821
Replies: 2 comments 2 replies
-
By default the output is sent to both output devices. So if you just want to send it to one you would specify it in the config, like you did for the intput device with cfg.output_device (values are AUDIO_HAL_DAC_OUTPUT_LINE1, AUDIO_HAL_DAC_OUTPUT_LINE2, AUDIO_HAL_DAC_OUTPUT_ALL) Or you could just turn the amplifier off with kit.setSpeakerActive(false); |
Beta Was this translation helpful? Give feedback.
-
I have succeeded in streaming line input to headphone output using the following code that you advised me to try several times. I'm a little confused about the fact that 'AUDIO_HAL_ADC_INPUT_LINE2' is for the built-in microphone, but it worked when I set it up like below. Thank you once again. #include "AudioTools.h" AudioKitStream kit; // Access I2S as stream // Arduino Setup
} // Arduino loop |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dear Phil Schatzmann,
I recently purchased an esp32 audio kit (AUDIOKIT_BOARD 5) type board and have been working on a project using your amazing library. I am extremely grateful to you every time I look at the source code.
I have tested most of the example programs, but there is one source code that doesn't work well, and I have a question about it.
I couldn't find an example of streaming the line input of the esp32 audio kit (AUDIOKIT_BOARD 5) type board to headphone output, and I found a similar example code. It works well from the built-in microphone input (AUDIO_HAL_ADC_INPUT_LINE2) to headphone output, but I'd like to know how to stream the line input to the headphone output.
#include "AudioTools.h"
#include "AudioLibs/AudioKit.h"
AudioKitStream kit; // Access I2S as stream
StreamCopy copier(kit, kit); // copy kit to kit
// Arduino Setup
void setup(void) {
Serial.begin(115200);
AudioLogger::instance().begin(Serial, AudioLogger::Warning);
}
// Arduino loop - copy data
void loop() {
copier.copy();
}
Beta Was this translation helpful? Give feedback.
All reactions