Kodi Community Forum
Linux [BUG?] audio DSP processing enabling/disabling on the fly problem. - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+---- Forum: Audio DSP (https://forum.kodi.tv/forumdisplay.php?fid=235)
+---- Thread: Linux [BUG?] audio DSP processing enabling/disabling on the fly problem. (/showthread.php?tid=282032)



[BUG?] audio DSP processing enabling/disabling on the fly problem. - BytEvil - 2016-07-08

Hi, friends! I use small python script for enabling/disabling audio DSP processing on the fly, mapped to my ir remote button.


Code:
# created by BytEvil (2016)

import xbmc
import os

tempdir = xbmc.translatePath('special://temp/')
tempfile0 = os.path.join(tempdir, 'audiooutput0')

print("CURRENT DSP STATUS:")
print(xbmc.executeJSONRPC('{"jsonrpc":"2.0","method":"Settings.GetSettingValue", "params":{"setting":"audiooutput.dspaddonsenabled"},"id":1}'))

if not os.path.isfile(tempfile0):
    # dsp addon enabled
        xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.dspaddonsenabled","value":true}, "id":1}')
        xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"GUI.ShowNotification", "params":{"title":"AUDIO OUTPUT", "message":"DSP enabled", "image":"/home/vis/.kodi/addons/audiooutput.dspswitch/icon.png"}, "id":1}')
        file = open(tempfile0, "a")
        file.close()
else:
    # dsp addon disabled
        xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"Settings.SetSettingValue", "params":{"setting":"audiooutput.dspaddonsenabled","value":false}, "id":1}')
        xbmc.executeJSONRPC('{"jsonrpc":"2.0", "method":"GUI.ShowNotification", "params":{"title":"AUDIO OUTPUT", "message":"DSP disabled", "image":"/home/vis/.kodi/addons/audiooutput.dspswitch/icon.png"}, "id":1}')
    os.remove(tempfile0)

When the music plays and i disable audio DSP processing on the fly music continues to play and when i enable audio DSP processing again music track starts playing from the beginning. This is a bug or feature? Confused


RE: [BUG?] audio DSP processing enabling/disabling on the fly problem. - AchimTuran - 2016-09-05

AudioDSP is not designed for on the fly enabling and disabling. In future the button for enabling and disabling AudioDSP will be removed. But I can't say when this will be.


RE: [BUG?] audio DSP processing enabling/disabling on the fly problem. - AchimTuran - 2016-09-30

I found the place where AudioDSP restarts the stream. This will be removed in the next AudioDSP version.


RE: [BUG?] audio DSP processing enabling/disabling on the fly problem. - BytEvil - 2016-10-01

(2016-09-30, 13:57)wisler Wrote: I found the place where AudioDSP restarts the stream. This will be removed in the next AudioDSP version.

Very good. Thanks!