gMan-87
Posts: 3
Joined: Thu Jun 16, 2016 2:06 am

Audio passthrough with delay.

Thu Jun 16, 2016 2:14 am

Hi All,

I'm trying to figure out a way of passing a audio signal through a Raspberry pi 3 and adding a 1 second delay.

I have a PA system where some of my phones are close to the PA Speakers.
I get horrible feedback when somebody uses those phones, and I figured if I can add a 1 second delay, maybe the feedback issue will go away.

Thanks in advance for any help.

Gman.

SopaXorzTaker
Posts: 13
Joined: Tue Dec 01, 2015 5:34 pm

Re: Audio passthrough with delay.

Thu Jun 16, 2016 5:24 am

Raspberry Pi doesn't have an audio input. It would be overkill to use it anyway, try looking for audio equipment.

gMan-87
Posts: 3
Joined: Thu Jun 16, 2016 2:06 am

Re: Audio passthrough with delay.

Thu Jun 16, 2016 5:32 am

I've connected a USB audio adapter that works with raspberry pi.

This is by no means overkill!
It's $35!!

I'm using it as a Annunciator right now, and if I were to go out and buy something similar, I'd be paying well over $200.

User avatar
flatmax
Posts: 346
Joined: Thu May 26, 2016 10:36 pm

Re: Audio passthrough with delay.

Fri Jun 17, 2016 9:21 am

You can use a USB sound card or a sound card add on (such as the one in my signautre).

To get the right delay, you can either set the buffers to the right number and length and pipe arecord to aplay with the correct buffer setup like so :
arecord -r 96000 -f S24_LE -c 2 | aplay -r 96000 -f S24_LE -c 2 -

But use the arecord or aplay buffer tuning flags such as "--buffer-time=#", " --period-size=#" and "--buffer-size=#"

Hope that helps
Matt
Discuss hearing, acoustics, audio injector products, - https://lists.audioinjector.net/mailman/listinfo/people
Sound card for the Raspberry Pi with inbuilt microphone : www.audioinjector.net
Audio Inector Octo multitrack GPIO sound card

gMan-87
Posts: 3
Joined: Thu Jun 16, 2016 2:06 am

Re: Audio passthrough with delay.

Tue Nov 15, 2016 8:13 pm

thanks flatmax!

I finally got around to that project again and it works just like I want it to.
I'll definitely look into your sound card if I end up making any more of these.

I'm trying to get that command to run at startup, I have a file called launcher.sh where I'm starting a python script....

Code: Select all

#!/bin/sh
#launcher.sh
#navigate to home directory, then to this directory, then execute python script, then back home

cd /
cd home/pi/Bell
sudo python bellTry3.py
cd /
sleep 5
arecord -r 44100 -f S16_LE -c 1 -D hw:1 -F0 --period-size=1024 -BO --buffer-size=4096 | aplay -f S16_LE -r 4100 -c 1 -D hw:0
it starts the bellTry3.py script just fine, but for some reason it's not running the command that's on the last line.
Any Ideas?

Return to “Beginners”