Git Product home page Git Product logo

Comments (2)

pms967 avatar pms967 commented on July 17, 2024

That's normal. Pulseaudio takes over the audio device, nothing else can access it directly while pulseaudio is running (you have to go through pulseaudio instead).

Either tell squeezelite tu use pulseaudio (via ALSA), or uninstall pulseaudio...

from squeezelite.

mathojojo avatar mathojojo commented on July 17, 2024

I understand. But, when I finally do "sudo service squeezelite restart", the squeezelite daemon starts without problem while pulseaudio process was still running.

I think that pulseaudio is not making the device busy all the time. It probably release it after initializing, if no sound is played.

And using Pulseaudio (via Alsa) is not an option, I'm using squeezelite with High Fidelity in mind.
So I just found a workaround : I changed the squeezelite bash file in the /etc/init.d directory.

In the "do_start" section, I added : "sleep 10" just before the first start-stop-daemon --start command.

do_start()
{
	DAEMON_ARGS=""

	# add squeezelite name if set
	if [ -n "$SL_NAME" ]; then
		DAEMON_ARGS="${DAEMON_ARGS} -n ${SL_NAME}"
	fi

	# add souncard setting if set
	if [ -n "$SL_SOUNDCARD" ]; then
		DAEMON_ARGS="${DAEMON_ARGS} -o ${SL_SOUNDCARD}"
	fi

	# add squeezebox server ip address if set
	if [ -n "$SB_SERVER_IP" ]; then
		DAEMON_ARGS="${DAEMON_ARGS} -s ${SB_SERVER_IP}"
	fi

	# add any other options given by the user
	if [ -n "$SB_EXTRA_ARGS" ]; then
		DAEMON_ARGS="${DAEMON_ARGS} ${SB_EXTRA_ARGS}"
	fi

	# Return
	#   0 if daemon has been started
	#   1 if daemon was already running
	#   2 if daemon could not be started
	sleep 10
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
		--test > /dev/null || return 1
	start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON \
		--background --make-pidfile -- $DAEMON_ARGS || return 2
}

I think I'm lucky, because waiting 10 seconds made my squeezelite able to start at boot. (probably 10 seconds are enough for the pulseaudio server to release the audio device).

But, this is just a workaround. It would be great to find something else. Why not a new argument to force squeezelite to start even if the device is busy, or without testing its availability ?

thank you

from squeezelite.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.