Kodi Community Forum
change default player for music - 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: change default player for music (/showthread.php?tid=40935)

Pages: 1 2


change default player for music - pyrates - 2008-11-24

Is there a way to change the default player for music? Currently if I click on play on a file, and select play using with the builtin dvdplayer instead of the default player, then I get audio working. But if I just play using the default player, I get no audio and I can't even see the time on the music going past 0:00.

So how can I change the default player for music to be the dvdplayer?


- althekiller - 2008-11-25

Sounds like a pulseaudio conflict. If you insist on not resolving it correctly (see forums) you should be able to set dvdplayer to default using advancedsettings.xml (see wiki).


- pyrates - 2008-11-25

I would like to resolve it if I could correctly. Unfortunately I don't know what to search for, hence my post here. So can you link me to a post that explains how to fix it? Smile

As for the changing of the default player, I will also look into that as well.

Update: did not work.

Here is my /home/username/.xbmc/userdata/Advancedsettings.xml:

Quote:<audio>
<headroom>0</headroom>
<karaokesyncdelay>0</karaokesyncdelay>
<defaultplayer>dvdplayer</defaultplayer>
</audio>



- topfs2 - 2008-11-25

the real fix is to write "killall pulseaudio" before starting xbmc in terminal (dont use the ")
Have you forgotten the advancedsettings clambers in the begining and end?

PAPlayer will hopefully support PulseAudio in the forseeable future and I have a patch on linux currently but its misbehaving on the other os´s so still needs some love Smile

Cheers,
Tobias


- pyrates - 2008-11-25

Topfs2 Wrote:the real fix is to write "killall pulseaudio" before starting xbmc in terminal (dont use the ")
Have you forgotten the advancedsettings clambers in the begining and end?

PAPlayer will hopefully support PulseAudio in the forseeable future and I have a patch on linux currently but its misbehaving on the other os´s so still needs some love Smile

Cheers,
Tobias

I will try the killall pulseaudio first.

Then I will add those extra tags. Will try those tonight.


- arnova - 2008-11-25

althekiller Wrote:Sounds like a pulseaudio conflict. If you insist on not resolving it correctly (see forums) you should be able to set dvdplayer to default using advancedsettings.xml (see wiki).

Althekiller, I've only implemented this advancedsetting last week on Xbox. I will commit/merge it to the Linux branch ASAP.


- pyrates - 2008-11-26

Well here's an update. I tried the killall pulseaudio and it said no such process.

Second is that I had not put in the necessary tags for the advanced settings.xml file. Here is what mine looks like in /home/username/.xbmc/userdata/advancedsettings.xml:

Quote:<advancedsettings>

<audio>
<headroom>0</headroom>
<karaokesyncdelay>0</karaokesyncdelay>
<defaultplayer>dvdplayer</defaultplayer>
</audio>

</advancedsettings>

And it still don't work. In fact now it sometimes doesn't even work for me, it will continue to use the paplayer it seems. So even though I press play, then play using, then select dvdplayer, I get no sound output and the time on the music does not advance. But after trying that several times, it did work once for me. Then it went back to not working after that.

I've also discovered a strange behavior. If I just click the OK button on my remote when on a song I want to play, it instead selects a different one. It's like it's on shuffle mode. And even though I had changed the default player to dvdplayer instead of paplayer, I got no sound then. Anyone else experience this?

Clearly the music part of this is still extremely buggy to me. Hence I can't use it yet. Too bad. I'll try it the next time it is updated on the next release. Unless someone else has a way for me to get it to work.


- topfs2 - 2008-11-26

Please provide a good Debug Log


- arnova - 2008-11-26

The defaultplayer patch just went in yesterday (http://trac.xbmc.org/changeset/16334). So if you want to use this feature you'll have to compile =>r16334 or wait for the next official release of XBMC.

Ps. I've also seen this strange "shuffling"-behaviour before but I don't know how to reproduce it.


- seanysean - 2008-11-26

pyrates Wrote:Well here's an update. I tried the killall pulseaudio and it said no such process.

Second is that I had not put in the necessary tags for the advanced settings.xml file. Here is what mine looks like in /home/username/.xbmc/userdata/advancedsettings.xml:



And it still don't work. In fact now it sometimes doesn't even work for me, it will continue to use the paplayer it seems. So even though I press play, then play using, then select dvdplayer, I get no sound output and the time on the music does not advance. But after trying that several times, it did work once for me. Then it went back to not working after that.

I've also discovered a strange behavior. If I just click the OK button on my remote when on a song I want to play, it instead selects a different one. It's like it's on shuffle mode. And even though I had changed the default player to dvdplayer instead of paplayer, I got no sound then. Anyone else experience this?

Clearly the music part of this is still extremely buggy to me. Hence I can't use it yet. Too bad. I'll try it the next time it is updated on the next release. Unless someone else has a way for me to get it to work.

Killall won't find the pulseaudio process if it's running as a different user, which it is (root, I think)

Do what I did in another thread - simply rename the pulseaudio executable in /usr/bin and reboot.


- elkano - 2008-11-29

I have the exact same problem, but there is no pulseaudio whatsoever installed in my system. In fact, there is no other application running which could use sound; menus sound works fine, videos sound works fine; it's just the music player.
I have found only this error in the logs:
Code:
208   ERROR: CreateStream - pcm_open, alsa error: Device or resource busy
208   ERROR: PAPlayer::Unable to create audio stream

This is a usual error when another application is locking the sound server; however, the only application who could be doing so is xbmc itself.
And if this was so, I still would see no reason why dvdplayer would work (as it does) and not the music player.

Edit: I solved the issue; it was actually with alsa itself. Since my card lacked a global volume control, I had some time ago created a Master control through an '.asoundrc' file. However, due to my stupidity, by doing so I override the dmix plugin. Everything is now working.



- pyrates - 2008-11-29

elkano Wrote:Edit: I solved the issue; it was actually with alsa itself. Since my card lacked a global volume control, I had some time ago created a Master control through an '.asoundrc' file. However, due to my stupidity, by doing so I override the dmix plugin. Everything is now working.

Ah that solved my problem with dvdplayer not able to play any of the music. Now it can play it sometimes but not all the time. I removed the /etc/asound.conf file and the /home/username/.asoundrc file as well. I have no pulseaudio process running here. I did sudo killall pulseaudio and it returned no such process to me. Here is my log of running xbmc:

Quote:root@xbmc:~# xbmc
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.ScreenSaver was not provided by any .service files
Error loading jpeg - no SOI marker found in first 4096 bytes
ALSA lib pcm_dmix.c:1008Sadsnd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1008Sadsnd_pcm_dmix_open) unable to open slave
Error loading jpeg - no SOI marker found in first 4096 bytes
ALSA lib pcm_dmix.c:1008Sadsnd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1008Sadsnd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1008Sadsnd_pcm_dmix_open) unable to open slave
ALSA lib pcm_dmix.c:1008Sadsnd_pcm_dmix_open) unable to open slave
CRITSEC[0x8a771e4]: Trying to enter destroyed section.
CRITSEC[0x8a771e4]: Trying to leave destroyed section.

This was me attempting to play back music by just clicking on a song with the ok button. Only if I clicked the play button, and went to play using and selected dvdplayer it did play the music most of the time. But if xbmc had just played a sound because of the theme, it did not play the song I had selected. This I think is alsa interfering in doing that.


- gbyte - 2008-11-29

pyrates Wrote:Ah that solved my problem with dvdplayer not able to play any of the music. Now it can play it sometimes but not all the time. I removed the /etc/asound.conf file and the /home/username/.asoundrc file as well. I have no pulseaudio process running here. I did sudo killall pulseaudio and it returned no such process to me. Here is my log of running xbmc:



This was me attempting to play back music by just clicking on a song with the ok button. Only if I clicked the play button, and went to play using and selected dvdplayer it did play the music most of the time. But if xbmc had just played a sound because of the theme, it did not play the song I had selected. This I think is alsa interfering in doing that.

I am Slackware user and had same issue myself in the past. What solved it to me was disabling XBMC menu sounds. And I really mean disable! To do so you need to edit /usr/bin/xbmc bash script and add the following on second line, before everything else: export SDL_AUDIODRIVER=null

OR start in console with:$ SDL_AUDIODRIVER=null xbmc


- austin - 2008-11-29

oh yes - I had to do SDL_AUDIODRIVER=null as well in order to get rid of "device busy" issues when using spdif output directly THANX


- pyrates - 2008-11-30

Yep this worked for me too. Here is my /usr/bin/xbmc:

Quote:#!/bin/sh

export SDL_AUDIODRIVER=null
export XBMC_PLATFORM_MODE=1
ID=`dbus-send --session --type=method_call --print-reply --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.Inhibit string:XBMC string:InternalHandle | grep uint32 | sed -e 's/.*uint32\ //'`
exec /usr/share/xbmc/xbmc.bin $*
exec dbus-send --session --type=method_call --print-reply --dest=org.gnome.ScreenSaver /org/gnome/ScreenSaver org.gnome.ScreenSaver.UnInhibit uint32:$ID

Now I can take out that changing of the default player for music and just clicking ok on a song and it will play. But now I don't have any navigation sounds. How can I get both working?