Post edited 7:49 pm – March 11, 2010 by ThomasF Post edited 7:49 pm – March 11, 2010 by ThomasF
Hi,
when I discovered a Vortexbox Player is released, I already saw all my dreams come true.
Buy an VBA and that's it. So I thought.
But I wanted to try first.
So I installed VB 1.2 on some older PC (P4, 3GHz, 1GB) and found that even with Vortexbox 1.2, there is a short pause or overlap or whatever, when one track ends and another starts. At least when there is no gap between the tracks, like on live recordings.
Since I don't have any experience with music streaming I am asking myself:
Is that just a bug, which I consider quite normal in such a new piece of software…
Or, much worse, is this what Squeezeserver can deliver from Vortexbox and considered normal?
Or, third possibility, is my hardware too weak?
Any advice really appreciated! Should I buy an appliance anyway? No, not before I know for sure.
Softsqueeze is exactly like the hardware players. So you have tracks that join together to make one song like a concert? I don't think there are to many CDs like this.
But what your talking about is gapless playback and it should be supported by SqueezeBox Server.
Did you rip the CD with VortexBox or some other program? Your playing back FLAC files right?
I have a live album that was ripped to FLAC on a VortexBox Appliance. When I play this album on VortexBox Player, there is a very slight interruption in the sound between tracks — a fraction of a second. I would not call it distortion. I don't find it objectionable.
When I play the same album on my Squeezebox Duet, there is no interruption in sound between tracks — the transition is seamless.
So the VortexBox Player doesn't give perfect gapless playback, but it's very good. I wouldn't worry about it.
Same behaviour, but I noticed that the gap is sometimes more, sometimes less noticeable. I cannot live with the worst case, but there are cases when it really doesn't disturb at all.
Maybe a P4 is really just not enough.
All I want to run on this machine are Squeezebox server and the VortexBox player.
Does anyone know which services on the VB can be stopped without influencing these two programs? Oh, and how?
I suggest running the htop system monitor to see what's happening on your VB:
yum install htop
htop
You'll see that there is not much happening on the VB once everything has started up and reached a quiescent state. Unless SqueezeBox Server is rescanning your music library, you won't find much competition for CPU cycles for VortexBox Player and mpd.
There are some services you could stop — the AutoRipper for example:
service vortexbox stop
This will free up some memory, but won't gain you many extra CPU cycles.
I sent an email to Max Kellerman, author of VortexBox Player and lead developer of mpd, to ask about the possibility of implementing perfect gapless playback on VortexBox Player. I haven't heard back from him yet.
I sent an email to Max Kellerman, author of VortexBox Player and lead developer of mpd, to ask about the possibility of implementing perfect gapless playback on VortexBox Player. I haven't heard back from him yet.
Hi Ron,
With VBP, I do not know if you are following squeezeslave these days. The Logitech-supported players had a recent bug whereby they stopped functioning if the user changed sources from local to Internet radio or from one radio steam to another. Discussion is at https://bugs.slimdevices.com/show_bug.cgi?id=14740 Included there is a detailed discussion of where and when the problem arose, and proposed corrections for both the server and client. Below, I copied a couple of the comments from Adrian, who found the bug and solution, and Ralph, who has released squeezeslave Windows and Mac test builds that fix the problem.
Adrian’s post includes the code that fixes the player. Are you, Andrew, or anyone interested in implementing this test fix for Linux and the VortexBox? I am interested in that fix because I believe that the Logitech-supported player did sync with hardware players and I want to use a VortexBox hosted player. Unfortunately, I am incompetent to implement it.
Additionally, I wonder if the root cause of this bug may be related to why the VortexBox Player will not sync with hardware players and the hiccup between tracks. When you wrote Max about hiccup, did you ask regarding the possibility of VBP sync?
I appreciate the explanations you include with problem analysis and solutions on this forum. Even when I do not have a particular problem, I learn from what you write, and often try out the suggested commands so that I may remember them when a related issue comes up on my VortexBox.
Thanks, -mike
— Comment #23 from Adrian Smith <triode1@btinternet.com> 2010-03-14 16:40:38 PDT — Ralph, try something like the following – this seems to fix it on the player end for me. Just allow the http thread to keep spinning at a low rate if there is nothing received from the socket.
— src/slimaudio/slimaudio_http.c (revision 129)
+++ src/slimaudio/slimaudio_http.c (working copy)
@@ -293,7 +293,19 @@
static void http_recv(slimaudio_t *audio) {
char buf[AUDIO_CHUNK_SIZE];
+ struct timeval timeOut;
+ fd_set fdread;
+ timeOut.tv_sec = 0;
+ timeOut.tv_usec = 100*1000; /* wait for up to 100ms */
+
+ FD_ZERO(&fdread);
+ FD_SET(audio->streamfd, &fdread);
+
+ if (select(audio->streamfd + 1, &fdread, NULL, &fdread,
+ &timeOut) == 0)
{
+ return;
+ }
+
int n = recv(audio->streamfd, buf, AUDIO_CHUNK_SIZE, 0);
/* n == 0 http stream closed by server */
— Comment #25 from Ralph Irving <ralph_irving@hotmail.com> 2010-03-16 04:29:28 PDT — Adrian,
I tested your suggested server side change in comment 21 using 7.4r30377 against squeezeslave r95 and r116 mentioned in the bug and both work flawlessly. Hopefully the change eventually makes it into the code.
The non-blocking change you provided for squeezeslave fixes the problem as well. Revision 133 includes the fix and I've released test builds for Win32 and OSX. I listened to internet streams most of the day yesterday without issue and would consider the problem fixed.
You mentioned squeezeplay in a couple of your comments, not sure if that was a typo or if you've been seeing a similiar issue with squeezeplay as well.
When you wrote Max about hiccup, did you ask regarding the possibility of VBP sync?
I appreciate the explanations you include with problem analysis and solutions on this forum. Even when I do not have a particular problem, I learn from what you write, and often try out the suggested commands so that I may remember them when a related issue comes up on my VortexBox.
Thanks, -mike
Yes; I asked Max about syncing VortexBox Player with hardware Squeezebox players as well as about perfect gapless playback in VBP. I haven't heard back from him on either issue.
As Andrew mentioned, VBP is completely different code than squeezeslave, so squeezeslave fixes do not apply. VBP can handle switching between an Internet stream and the local music library without hanging, and does not have this squeezeslave bug.
As for syncing squeezeslave with hardware Squeezebox players: I'm not sure this works. I tried syncing squeezeslave with a Duet Receiver a while back, and couldn't get it to work. You might post on the Slim Devices forum to see if this can be done — ralphy should know the answer.
Andrew said:This is a fix for a bug in SqueezeSlave. We don't use squeezeSlave so this doesn't change anything.
Andrew:
1. Logitech-supported players on VortexBox sync with hardware players. Is that correct?
2. Logitech-supported players previously allowed switching sources from local to Internet radio without haulting playback. Is that correct?
3. Did you read and understand Ralph Irving's Comment 25 (above) to the end?
4. Did you read that Ralph tested the suggested server side change and the change worked flawlessly.
5. When you write that "this doesn't change anything" does that mean that there will be no support on VortexBox for synchronizing hardware and software players by any means?
6. Please report progress, if any, on VortexBox Player sync with hardware.
Post edited 5:27 pm – March 16, 2010 by Ron Olsen Post edited 5:50 pm – March 16, 2010 by Ron Olsen Post edited 6:10 pm – March 16, 2010 by Ron Olsen Post edited 6:13 pm – March 16, 2010 by Ron Olsen Post edited 6:23 pm – March 16, 2010 by Ron Olsen
HalfBit said:
1. Logitech-supported players on VortexBox sync with hardware players. Is that correct?
2. Logitech-supported players previously allowed switching sources from local to Internet radio without haulting playback. Is that correct?
3. Did you read and understand Ralph Irving's Comment 25 (above) to the end?
4. Did you read that Ralph tested the suggested server side change and the change worked flawlessly.
5. When you write that "this doesn't change anything" does that mean that there will be no support on VortexBox for synchronizing hardware and software players by any means?
6. Please report progress, if any, on VortexBox Player sync with hardware.
Let me try to answer some of these questions, Mike.
There are four software players I know about: VortexBox Player, Squeezeslave, Softsqueeze, and Squeezeplay. Only Squeezeplay is supported by Logitech; the others are third-party apps.
"To get the music to play from your computer you need to install player software such as SoftSqueeze, squeezeslave, or Squeezeplay. Even after you do that, however, perfect sync between a hardware player like the Boom and a software player is not guaranteed. It may work okay for you, or it may not. There are too many variables involved in the pc playback (eg, sound card driver latencies, etc) that the server cannot control. This may not be a problem for you if the pc and the Boom are far enough apart that you don't hear both at the same time."
"Trying to synchronize [a hardware player] with a software player (e.g. with Squeezeplay) may result in only a loose sync. This is due to the buffering and inaccuracy of position reporting by various subsystems between the software player and the sound-card output. You might be lucky."
But even the Softsqueeze author has found cases where sync doesn't work.
2. VBP can switch between Internet streams and local library without hanging. Squeezeslave could do it with SBS 7.3.4, and will be able to do it with SBS 7.4.2 if the fixes you mentioned are applied. Don't know about Softsqueeze or Squeezeplay.
3 & 4. Only apply to squeezeslave, not the other players.
5. and 6. Fixing SBS/VortexBox Player/mpd to sync with hardware players is something Max Kellerman is best able do, if it's even possible. Best course of action is to wait until I hear back from him.
If you want to experiment with Squeezeslave, Softsqueeze, or Squeezeplay, go ahead, and report back your results. I'm sure you can get help on the Slim Devices forum for any problems you run into.
Post edited 7:50 pm – March 16, 2010 by Ron Olsen Post edited 8:09 pm – March 16, 2010 by Ron Olsen
A followup:
I downloaded the latest version of Squeezeslave (0.9-133), built it on my VBA, and tried syncing it with my Squeezebox Duet. I was able to achieve near sync when playing flac and mp3 files from my music library. Sync was not perfect — a fraction of a second off.
Similar results with Radio Paradise, Sirius Radio, and last.fm internet streams — sync is a fraction of a second off.
This version of Squeezeslave also seems to have perfect gapless playback of FLAC files, and continues to work when switching between internet streams and my local music library.
If this is good enough for your purposes, I suggest trying Squeezeslave instead of VortexBox Player and see if it works in your setup.
Note: sync seems to work a bit better with the latest version of Squeezeslave (0.9-133) than with the version installed on VortexBox (0.9-129). Both versions seem to be able to do perfect gapless playback of FLAC files. Only the new version can switch between internet streams and the local music library without hanging.
I believe the slight sync mismatch you discribe will be acceptable. If it's fairly simple, I will download the latest version of Squeezeslave, build it on my VBA, and use it with my Squeezebox Duets. I will appreciate any DL, build, and install advice you may offer.
Regarding sync of audio in generall, I find that with time (several hours) sync drifts off so that it's noticable, and if I reset our Cisco SRW2024 switch, sync is restored. I understand that it is off topic, but do you understand why sync drifts and why reset restores it? I thought SBS and the Duet receivers were supposed to monitor network latency and correct as it changes. My goal in understanding is to somehow automate the restore-sync process. As it is, I power-cycle the SRW2024.
Given the success with SqueezeSlave I'm confident that in time, VBP will sync and play gapless files as well and probably sound better than SqueezeSlave.
Post edited 10:59 pm – March 16, 2010 by Ron Olsen Post edited 11:01 pm – March 16, 2010 by Ron Olsen Post edited 11:02 pm – March 16, 2010 by Ron Olsen Post edited 11:03 pm – March 16, 2010 by Ron Olsen Post edited 11:05 pm – March 16, 2010 by Ron Olsen Post edited 11:17 pm – March 16, 2010 by Ron Olsen Post edited 11:26 pm – March 16, 2010 by Ron Olsen
HalfBit said:
Ron,
I believe the slight sync mismatch you discribe will be acceptable. If it's fairly simple, I will download the latest version of Squeezeslave, build it on my VBA, and use it with my Squeezebox Duets. I will appreciate any DL, build, and install advice you may offer.
To build the latest version of Squeezeslave on your VB, you will have to install a number of packages needed to do the build.
1. Install development packages:
yum install subversion make gcc
There may be other devel packages needed as well, but I'm not sure what they are.
5. You'll get error messages from make if you're missing some devel packages. You'll have to install the missing packages and repeat until the make completes without errors. If you need help, post the error messages and I'll tell you which packages you need to install. If you get really stuck, I can email you the new squeezeslave binary.
6. Once the make completes without errors:
cd /usr/bin
cp squeezeslave squeezeslave.old
cd /root/build/squeezeslave/bin
cp squeezeslave /usr/bin/squeezeslave
This saves the old version (which is 0.9-65, not 0.9-129 as I reported previously) in /usr/bin/squeezeslave.old, and installs the new version in /usr/bin/squeezeslave.
7. Version check:
/usr/bin/squeezeslave –-version
The first line of output should be
squeezeslave-0.9-133
If Andrew makes this new version of squeezeslave available as an rpm in the VortexBox repository, then steps 1-7 will not be needed; all you'll have to do is upgrade your VB to pick it up.
8. Run squeezeslave:
service squeezeslave start
9. You should now see a Squeezeslave player in your SBS player list. You can select it to play and tell SBS to sync it with another player, like a Duet.
Good luck!
Regarding sync of audio in generall, I find that with time (several hours) sync drifts off so that it's noticable, and if I reset our Cisco SRW2024 switch, sync is restored. I understand that it is off topic, but do you understand why sync drifts and why reset restores it? I thought SBS and the Duet receivers were supposed to monitor network latency and correct as it changes. My goal in understanding is to somehow automate the restore-sync process. As it is, I power-cycle the SRW2024.
I think you can keep two hardware players in sync over time without drift, but syncing a hardware player and a software player will inevitably introduce drift unless you take action to try to reduce it. Don't know how you could automate this process.
Given the success with SqueezeSlave I'm confident that in time, VBP will sync and play gapless files as well and probably sound better than SqueezeSlave.
The software architecture of Squeezeslave and VBP is quite different: Squeezeslave talks directly to ALSA, the sound system on Linux. VBP talks to MPD (Music Player Daemon), which in turn talks to ALSA. Implementation of sync and gapless playback is likely to be very different in Squeezeslave and VBP. I hope Max Kellermann can figure it out.
I built a new rpm for squeezeslave using the 0.9-133 version. I submitted the rpm to Andrew. I hope he will make it available in the VortexBox repository soon.
When he does that, you will be able to pick up the new version of squeezeslave by a standard VB upgrade, without having to jump through all the hoops to build it yourself.