Closed GoogleCodeExporter closed 9 years ago
If you "power off" the player in LMS then it will release the audio device.
Otherwise it keeps it open.
If you use an audio device which uses a software mixer then it can share with
other applications.
Original comment by trio...@btinternet.com
on 1 Jan 2015 at 10:40
Thank you for you reply, Triode!
Can you help me understand, what are the benefits of keeping device open when
not playing?
And what would be the downside of releasing the device?
BTW, "power off" requires manual intervention, just as stopping squeezelite
does - and it has more or less same effect.
Using software mixer device is not an option for audiophile quality playback,
unfortunately.
Thank you for your advice,
Andrej
Original comment by and...@falout.org
on 2 Jan 2015 at 12:27
The LMS protocol does not differentiate between pause and stop. For audiophile
purposes squeezelite keeps sending digital 0 at the previous track sample rate
when not playing - this means that if you pause and restart you don't get
clicks on dacs which make noises when the clock is dropped. This is a design
feature of squeezelite.
The turn off output when "off" was added for your case - all you need do is
logically turn the player off from LMS/iPeng or other LMS control application.
Original comment by trio...@btinternet.com
on 2 Jan 2015 at 11:07
Thanks for that clarification.
I must say, I did not see this behaviour with any of the players that do
release the device, with any of that DACs I had (with exception of some DSD
DACs). Would it be fair to say that this is therefore a "design feature"
intended to work around a fault in some DACs?
Would you accept a patch, that adds a command line option to release device
when not playing?
Thanks,
Andrej
Original comment by and...@falout.org
on 3 Jan 2015 at 12:45
This is the long term behavior of squeezebox hardware players - due to the
impact on some spdif dacs of disabling the output.
How do you define not playing - do you so it when you pause, or when there's a
drop in audio meaning that you need to make up samples or underrun?
Original comment by trio...@btinternet.com
on 3 Jan 2015 at 11:53
Hi again, and thank you very much for your advice and help.
Ah yes, some old SPDIF DACs had this issue. It was probably 10 years now that I
did not see one with it.
Pause=not playing.
Play=playing
Playing silence due to under-run or source being silent is still playing in my
book.
So simply following SBS pause/play commands should be perfectly OK I would say.
Probably not a bad idea is what XBMC guys did, they have a configurable delay
after they stop playback and before they release card. I think it is 3 or 4
seconds by default in XMBC. Even 10 seconds should work for most people, and
catch all probable intervals between two tracks in the playlist.
Original comment by and...@falout.org
on 4 Jan 2015 at 4:39
Please try latest git - I have added a -C "close" option for this.
Original comment by trio...@btinternet.com
on 11 Jan 2015 at 8:20
I am humbled by your kind consideration!
I have started the new instance:
root 4550 1 0 18:50 ? 00:00:00
/storage/usr-src/squeezelite/squeezelite/squeezelite -s localhost -o
plughw:CARD=Intel,DEV=0 -d all info -f /var/log/squeezelite-1.log -C 5 -m 00 04
21 F2 00 01 -n Dev IHD (Int) A -z -P /tmp/startSqueezelite.pid
/storage/usr-src/squeezelite/squeezelite/squeezelite --version
Option error: --version
Squeezelite v1.8-dev
I did not even attempt to play anything, then:
speaker-test --device=plughw:CARD=Intel,DEV=0 -c 2
speaker-test 1.0.27.2
Playback device is plughw:CARD=Intel,DEV=0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
If I try to play something via SBS on that instance, then pause it and wait 5
seconds, then repeat test, it works as expected:
speaker-test --device=plughw:CARD=Intel,DEV=0 -c 2
speaker-test 1.0.27.2
Playback device is plughw:CARD=Intel,DEV=0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 64 to 1048576
Period size range from 32 to 524288
Using max buffer size 1048576
Periods = 4
was set period_size = 262144
was set buffer_size = 1048576
0 - Front Left
...
So apparently SL starts and opens audio device? Would it be possible to have it
not do that, when -C is used?
Thanks!
Original comment by and...@falout.org
on 12 Jan 2015 at 7:31
Please try the latest git - I've updated to hopefully allow this.
You will need to use the -r option to set the maximum sample rate supported as
otherwise this requires the device to be opened to establish it.
Original comment by trio...@btinternet.com
on 12 Jan 2015 at 7:30
Original issue reported on code.google.com by
and...@falout.org
on 1 Jan 2015 at 4:48