PDA

View Full Version : Announce: squeezeslave and SlimProtoLib



rtitmuss
2006-01-17, 14:04
OK so I've had enough complaints about Java, sync and cpu usage with Softsqueeze - time to bring on the changes :D.

Over the last few evenings I have started working on SlimProtoLib. This is a C library that includes the client functions to emulate the slim-protocol used by the Squeezebox, and also supports audio playback. With some luck this will remove some of the Java quirks that some people see, reduce playback latency for sync and improve cpu usage.

squeezeslave is a command line C program to play audio from the slimserver - no Java needed, but then of course no gui. All player control has to be from a webbrowser or another program like Moose.

This is very early release software, use at your peril! So far this release supports:
- mp3 playback
- sync with mp3 playback
- crashes and cpu spinning

It does not support:
- all status information needed by the slimserver (for example the playlist won't update correctly)
- flac, aac, wav, etc.
- replay gain
- high quality audio playback (output clips)
- direct streaming (e.g. internet radio)
- audio looping (e.g. for short clips)
- anything other than 44.1Hz streams
- built in ssh tunnelling
- cross fading
- password protected servers
- gain control
- multiple players on one slimserver (player mac address is fixed)
- and lots of other things I've not realised are missing yet

My idea is when this library is working then I will itegrate this with Softsqueeze to improve the audio playback performance.

If you would like to try this out and source (GPL) is available in slimdevices svn trunk, and binaries for windows can be downloaded from http://softsqueeze.sourceforge.net. To run squeezeslave use 'squeezeslave <slimserver ip>'.

The playback latency can be controlled - useful when trying sync out. This can set using 'set PA_MIN_LATENCY_MSEC=50' on the command line before you start squeezeslave. If you try sync I'd be interested to know what works, and doesn't.

And also some help needed ... the libraries used should all be cross platform, so with minimal tweaking it should be able to compile and run on osx, linux and solaris. If anyone is up for that tweaking please submit a patch. Thanks :).

Enjoy!
Richard

gorstk
2006-01-18, 09:53
rtitmuss wrote:
> OK so I've had enough complaints about Java, sync and cpu usage with
> Softsqueeze - time to bring on the changes :D.
>
> Over the last few evenings I have started working on SlimProtoLib. This
> is a C library that includes the client functions to emulate the
> slim-protocol used by the Squeezebox, and also supports audio playback.
> With some luck this will remove some of the Java quirks that some people
> see, reduce playback latency for sync and improve cpu usage.
>
> squeezeslave is a command line C program to play audio from the
> slimserver - no Java needed, but then of course no gui. All player
> control has to be from a webbrowser or another program like Moose.
>
> This is very early release software, use at your peril! So far this
> release supports:
> - mp3 playback
> - sync with mp3 playback
> - crashes and cpu spinning
>
> It does not support:
> - all status information needed by the slimserver (for example the
> playlist won't update correctly)
> - flac, aac, wav, etc.
> - replay gain
> - high quality audio playback (output clips)
> - direct streaming (e.g. internet radio)
> - audio looping (e.g. for short clips)
> - anything other than 44.1Hz streams
> - built in ssh tunnelling
> - cross fading
> - password protected servers
> - and lots of other things I've not realised are missing yet
>
> My idea is when this library is working then I will itegrate this with
> Softsqueeze to improve the audio playback performance.
>
> If you would like to try this out and source (GPL) is available in
> slimdevices svn trunk, and binaries for windows can be downloaded from
> http://softsqueeze.sourceforge.net. To run squeezeslave use
> 'squeezeslave <slimserver ip>'.
>
> The playback latency can be controlled - useful when trying sync out.
> This can set using 'set PA_MIN_LATENCY_MSEC=50' on the command line
> before you start squeezeslave. If you try sync I'd be interested to
> know what works, and doesn't.
>
> And also some help needed ... the libraries used should all be cross
> platform, so with minimal tweaking it should be able to compile and run
> on osx, linux and solaris. If anyone is up for that tweaking please
> submit a patch. Thanks :).
>
> Enjoy!
> Richard

Sounds like a cool project.

Tried to run it on XP with no success (exited after telling me I have
four sound devices). However not much time to play with it yet and you
probable know about the bug anyway.

Goof luck!

rtitmuss
2006-01-30, 14:00
John Gorst wrote:

> Tried to run it on XP with no success (exited after telling me I have
> four sound devices). However not much time to play with it yet and you
> probable know about the bug anyway.

I'd be interested if the new version works any better for you? If not
does it do anything other than exit? Display an "Windows has had to shut
this application down" dialog?

Richard

gerry_duprey
2006-04-02, 09:22
Howdy,

I just pulled a recent version (as of 4/02) of the slimprotolib (via SoftSqueeze) and tried to build it. A few comments:

1) You might want to mention in the readme that you need to have the FLAC source installed. I didn't have any FLAC installed and then I tried to install the packaged FLAC version which didn't include the header files. Once I downloaded the source, built and installed it, things were much happier.

2) When compiling under linux, all the gettimeofday() calls fail as linux (at least under RH 8.0) need to pass two params to gettimeofday (I altered them to pass NULL and things compiled).

Just FYI

Gerry

ralphy
2006-04-09, 05:28
I just built the current squeezeslave client on linux, after making the gettimeofday changes, thanks Gerry.

The latest version is chewing up 96% of the available CPU on my P4 2.4GHz box. My slimserver runs on a separate machine.

The older SVN version 6089 (aka version 0.4.1) I'd been using for the last couple months never spikes above 3%.

I was hoping to take advantage of the -o option to select a different output device. I also noticed that with the latest version, if I change the volume during a song, it resets itself to the previous level, with the next song change. Has anyone else noticed this?

Duane.

habazot
2008-12-01, 05:23
Hi,

Is there a simple way of getting the audio output from squeezeslave on stdout in wav format under linux? Would be very useful in integrating with other equipment..

Maybe this could be done through a software mixer (alsa/jack?) of sorts?

Any feedback/suggestions welcome.. :)

Regards

idowantapickle
2008-12-01, 05:58
You could maybe do something with pulseaudio - http://pulseaudio.org/ - if you're just looking to pipe the output someplace else.

There is a plugin module called module-pipe-sink

"Provides a simple test sink that writes the audio data to a FIFO special file in the file system. The sink name defaults to fifo_output."

Squeezeslave might need to be modified or configured to be a pulseaudio client though and i'm not exactly sure what that involves.

ralphy
2008-12-03, 04:45
You could maybe do something with pulseaudio - http://pulseaudio.org/ - if you're just looking to pipe the output someplace else.

There is a plugin module called module-pipe-sink

"Provides a simple test sink that writes the audio data to a FIFO special file in the file system. The sink name defaults to fifo_output."

Squeezeslave might need to be modified or configured to be a pulseaudio client though and i'm not exactly sure what that involves.

On the sourceforge squeezeslave site, there's a native alsa version, which you can point to any alsa device.

https://sourceforge.net/project/showfiles.php?group_id=105169&package_id=176494

Try the latest version squeezeslave-0.8-22-lnx26-alsa-i686.tar.gz

squeezeslave -h

gives you the available options.

Initially you'll need to look at -L -o and -r.