4

With Windows IOT before and after playing a sound file on the Raspberry (both 2 and 3) a loud click can be heard thru the speakers; is there a way to make it so no click is heard?

Here is the code I am using ...

Dim file As StorageFile = Await StorageFile.GetFileFromApplicationUriAsync(New Uri("ms-appx:///Assets/tunein.wav"))
Dim player As MediaPlayer = BackgroundMediaPlayer.Current
player.AutoPlay = False
player.SetFileSource(file)
player.Volume = 0.2
player.Play()

I've tried turning the audio level to zero before and after the file is played; but even when the audio level is set to zero the loud click is heard.

Also, this post from 2013 says its a problem with the firmware and an upgrade would fix it (but the problem is on a PI 3 as well) so I'm not sure if its wise to apply that firmware upgrade; it also recommends some linux fixes which don't apply in the Windows IOT world.

  • Anecdotally: There was an admission when the +/2 form factor models were released that there were imperfections with the sound system in the previous (A/B) versions that had been corrected in newer models. I did not notice any improvement at all in the sound quality, including various induced clicks. It was suggested to me that I remove the ground from the headphone jack connection but note in that case it had to do with an earth loop with another device. – goldilocks Apr 2 '16 at 17:34
  • 1
    In any case, anecdotally again but including various posts here by people complaining of similar problems: the audio subsystem on the pi is crap. It has symptoms of such. This is probably one of them ("earth loop" internal to the board?). But good luck with a real answer! – goldilocks Apr 2 '16 at 17:35
1

The reason you're hearing a sound click is probably from the DAC (Digital to Analogue Converter) or the amplifier on the audio 'card' from turning on and closing a circuit with a floating ground. Either way: what you're experiencing is called a 'transient' and they occur in practically every electrical device. The solution is to minimize them from happening by properly grounding the source and destination device. (Or, maybe the device is faulty? Who knows? Transients can probably have a number of causes. But in your case? It's probably a grounding issue.)

However, there's also software 'fix': have an application use the audio system and constantly outputting silence. A simple $ cat /dev/zero | aplay will do, really. What this will do is keep the circuit closed and so you won't get any transients. You probably will still get a DC current flowing over the audio cable, but you probably won't pick up the DC offset on the recording device.

I know it's a lot of probablies, but hey! I'm a software guy!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.