miegl / PiFmAdv

Advanced Raspberry Pi FM transmitter with RDS encoding
GNU General Public License v3.0
487 stars 82 forks source link

Piping audio from USB microphone input has ticking sound in background #39

Open Nawor3565 opened 5 years ago

Nawor3565 commented 5 years ago

I just bought a USB microphone adapter, so I can use my phone to pipe audio directly into PiFmAdv. However, when piping audio, there is a ticking noise that can be heard around every second. I recorded a few seconds of this, can be heard here. This ticking sound can be heard whether my phone is actually playing audio or not, and even pressing the "mute microphone" button on my USB adapter doesn't stop the sound. I recorded audio with the adapter on my PC, and there isn't any ticking there, and it doesn't happen when transmitting a .wav file directly. I'm not sure what is causing this, but it's very audible even when playing music, so it's rather annoying.

miegl commented 5 years ago

Not sure what's causing this. From my testing playing an audio file supported by pifmadv (libsndfile) is working just fine. But when piping the audio something goes wrong. The ticking noise appears and after a long period of time it even stops transmitting on the desired frequency completely.

miegl commented 5 years ago

Please try piping an audio stream with sox or ffmpeg to pifmadv just to confirm that this problem is not caused by the usb sound card.

Nawor3565 commented 5 years ago

Sorry for late reply, but I can confirm that there's no ticking when piping an MP3 to PiFmAdv with sox. It also doesn't seem to stop transmitting after some time, which is a problem I also have.

miegl commented 5 years ago

Possibly related to https://github.com/Miegl/PiFmAdv/issues/40