Kodi Community Forum
Linux PulseAudio Sink - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Linux (https://forum.kodi.tv/forumdisplay.php?fid=52)
+---- Thread: Linux PulseAudio Sink (/showthread.php?tid=183436)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14


RE: PulseAudio Sink - fritsch - 2014-02-14

Nice - thx for reporting back.


RE: PulseAudio Sink - Slurp - 2014-02-22

Is the AE_SINK=ALSA a env var, because using export AE_SINK=ALSA doens't work.
Or is it possible to set it with the advancedsettings.xml ?


RE: PulseAudio Sink - un1versal - 2014-02-22

It's

Code:
AE_SINK=ALSA xbmc

and you start xbmc from terminal with that. I imagine you can do it via xinit or similar upstart medhods or whatever.


Re: RE: PulseAudio Sink - nickr - 2014-02-22

(2014-02-22, 23:07)uNiversal Wrote: It's

Code:
AE_SINK=ALSA xbmc

and you start xbmc from terminal with that. I imagine you can do it via xinit or similar upstart medhods or whatever.

So
Code:
export AE_SINK=ALSA
xbmc
should work. I think he is saying it doesn't.


RE: PulseAudio Sink - Slurp - 2014-02-22

(2014-02-22, 23:07)uNiversal Wrote: It's

Code:
AE_SINK=ALSA xbmc

and you start xbmc from terminal with that. I imagine you can do it via xinit or similar upstart medhods or whatever.


I know that works, but that is not possible from the launcher. And i don't want to start a terminal. And my girlfriend doesn't know how then Wink


Re: PulseAudio Sink - nickr - 2014-02-22

What launcher are you referring to.


RE: PulseAudio Sink - Slurp - 2014-02-22

Ubuntu launcher.

But would be really nice to do it through the advanced settings.

And indeed the
Code:
export AE_SINK=ALSA
xbmc

way doens't work. Also not in the bash.rc or other ways to set a env var


Re: PulseAudio Sink - nickr - 2014-02-22

Write a script to start xbmc and run that from the launcher.


RE: PulseAudio Sink - un1versal - 2014-02-22

(2014-02-22, 23:18)Slurp Wrote:
(2014-02-22, 23:07)uNiversal Wrote: It's

Code:
AE_SINK=ALSA xbmc

and you start xbmc from terminal with that. I imagine you can do it via xinit or similar upstart medhods or whatever.


I know that works, but that is not possible from the launcher. And i don't want to start a terminal. And my girlfriend doesn't know how then Wink

Yes, like nickr says, write a script and call that from launcher, the girlfriend excuse was great but that also means you cant ask us how to write a script Wink haha

Linux lets you do anything you want so as long as you doing it in a sane manner fyi the answer is in the interwebs in case your "girlfriend" doesn't know how to google.

Edit: Also the advancedsettings is less likely since the philosophy is to not have advancedsettings at all.


RE: PulseAudio Sink - fritsch - 2014-02-22

Let's stick to the topic. advancedsettings.xml is not possible cause it is loaded after audio engine initialization ...

Still interested why people run full blown ubuntu sessions with unity (that kills sync and swapbuffers) and pulseaudio installed and then - don't want to use it. DTS-HD passthrough at 60hz and a compositer behind is the last thing I would want ...


RE: PulseAudio Sink - Slurp - 2014-02-23

(2014-02-22, 23:45)uNiversal Wrote: Yes, like nickr says, write a script and call that from launcher, the girlfriend excuse was great but that also means you cant ask us how to write a script Wink haha

Linux lets you do anything you want so as long as you doing it in a sane manner fyi the answer is in the interwebs in case your "girlfriend" doesn't know how to google.

Edit: Also the advancedsettings is less likely since the philosophy is to not have advancedsettings at all.

Did i ask for a script? I asked for a better solution. Because i find running a script not the best solution if it where possible to use the AE_SINK as a env var. Which was mentioned in the thread.
And the laucher takes exec cmd's but the EXEC = AE_SINK = ALSA xbmc breaks on the second =.
And the girlfriend just knows which icon she needs to click to start xbmc and start watching.


And the advancedsettings is just for these kind of things IMHO.

(2014-02-22, 23:52)fritsch Wrote: Let's stick to the topic. advancedsettings.xml is not possible cause it is loaded after audio engine initialization ...

Still interested why people run full blown ubuntu sessions with unity (that kills sync and swapbuffers) and pulseaudio installed and then - don't want to use it. DTS-HD passthrough at 60hz and a compositer behind is the last thing I would want ...

But can it be a env var? because now it doesn't work as it seems.

Sometimes you don't have much of a choice.


RE: PulseAudio Sink - RipT - 2014-02-23

I was using a script from the launcher to get xbmc to start with alsa, but I don't anymore as the latest nightlies work fine with pulse. So it can be done. write an actual script file, such as a text file called xbmc-alsa. put this in it:

Code:
#!/bin/bash

AE_SINK=ALSA xbmc

Put it in your path and make it executable with chmod. Then just call xbmc-alsa with your launcher. Or, better yet, upgrade to the latest nightly and let it run pulse.


RE: PulseAudio Sink - nickr - 2014-02-23

No need to get snarky.

Try this approach: /usr/bin/xbmc is a script anyway. It starts xbmc.bin which does the real work. Edit /usr/bin/xbmc how you want.

It will break next time you update xbmc from a repo as /usr/bin/xbmc will be over written.

Alternative 2, write a script named xbmcmyway (or whatever you want to call it
Code:
#!/bin/sh
AE_SINK=ALSA xbmc

Put it in /usr/local/bin and make is executable.

Copy /usr/share/applications/xbmc.desktop to /usr/share/applications/xbmcmyway.desktop

Change the line Exec=xbmc to Exec=xbmcmyway

Now click on that to make xbmc go. Even edit the icon to distinguish it from the usual xbmc icon.

I am not sure why your environment variable method isn't working, it should. How are you setting the variable?


RE: PulseAudio Sink - Slurp - 2014-02-23

Got the second approach already working, but thanx for the help.

But the environment variable is indeed not working.

First tried export.
And also added it to my .bashrc

Tested it with :
Code:
set | grep AE
AE_SINK=ALSA

So it seems that it is set but doesn't get picked up.


RE: PulseAudio Sink - nickr - 2014-02-23

You have to be sure it is set in the right environment.

For example if I open an x-terminal and type
Code:
export MYVAR=test
echo $MYVAR
I get the response
Code:
test

However if I then open another x-terminal it returns nothing, because it is not set in that new environment.

So I suspect your .bashrc is not read by whatever mechanism is starting xbmc.

Try putting it in ~/.profile, or read man bash, particularly the section titled INVOCATION.