Menu Close

ATI audio distortion on Kodi

I use Kodi as my HTPC software of choice. In the bedroom I am using a Raspberry Pi 2 running OpenElec which I have had absolutely zero issues with.

As for the living room setup, I can’t say the same.

For this setup, I am using a fairly descent desktop PC as my HTPC which is tucked away behind the bookshelf so it’s out of sight. The PC connects to the TV via a HDMI connection provided by an ATI 5450 card because…well it was cheap and did not have a fan for noise purposes.

The problem that I notice is that approx every hour or so, the audio gets all distorted and tinny and echoes. This happens regardless or what I am using the PC for – some light gaming, but mostly when using Kodi. It’s super annoying when my wife and I are watching a movie and the audio issue pops up.

The manual fix I had found for this issue was to mute, then un-mute the audio. If I do this, the audio will work for a while but then issue comes back. I have to essential stop what I am doing, in some cases quit the application, mute then un-mute the audio, launch my application.

So, what’s the point of all this? Do I have a fix? Yes…sort of.

While this is not a permanent solution, I have found a way to mute/un-mute the audio via a Powershell script which runs every 30 minutes via Task Scheduler. Below is the code I used:

The only thing I had changed here was to set mute to $true/$false to allow the script to function without any intervention.

Now, simply create a New Task in Task Scheduler to execute every x minutes (I set mine to 30) and you will never come across the audio issue…you will however notice a slight pause in the audio however. It is very quick – less than a second – so it should suffice.

One issue I notice when running the Powershell script through the Task Scheduler was that I would get a black CMD window popping up whenever the task was run. To get around this, I wrapped the Powershell file in some VB Script code so that the window would not display – I had issues with the -WindowStyle Hidden switch in the Task Scheduler arguments. Blow is the code:

Posted in Code, Powershell, Tech

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.