{"id":44,"date":"2006-07-13T21:18:14","date_gmt":"2006-07-13T21:18:14","guid":{"rendered":"https:\/\/www.bishnet.net\/tim\/blog\/2006\/07\/13\/slimp3slave-finally-working\/"},"modified":"2010-11-11T13:01:56","modified_gmt":"2010-11-11T13:01:56","slug":"slimp3slave-finally-working","status":"publish","type":"post","link":"https:\/\/www.bishnet.net\/tim\/blog\/2006\/07\/13\/slimp3slave-finally-working\/","title":{"rendered":"slimp3slave &#8211; finally working"},"content":{"rendered":"<p>In my last post about setting up a slimserver I said that I was having trouble getting <a href=\"http:\/\/www.ex-parrot.com\/%7Epdw\/slimp3slave\/\">slimp3slave<\/a> working:<\/p>\n<blockquote><p>Whilst it doesn\u00e2\u20ac\u2122t appear to have any problems, I didn\u00e2\u20ac\u2122t have much success with the players. mpg123 got confused by the stream, and madplay kept skipping the beginnings of tracks when I hit next on the server. This could be a problem with slimp3slave &#8211; I\u00e2\u20ac\u2122ll need to investigate.<\/p><\/blockquote>\n<p>The problem did turn out to be with slimp3slave. I discovered that when skipping a track the stream is restarted which caused slimp3slave to start up a new player. The problem was this is that it did it before the old one had exited, thus causing the new one to die because it couldn&#8217;t access the sound device. There&#8217;s another bug here &#8211; it didn&#8217;t notice the new player dying and tried to write to it, which resulted in lots of SIGPIPE messages.<\/p>\n<p>So I looked at the code for shutting down the player and noticed that it wasn&#8217;t using the right close function. This change fixed it:<\/p>\n<blockquote><p>RCS file: \/home\/pdw\/vcvs\/repos\/slimp3slave\/slimp3slave.c,v<br \/>\nretrieving revision 1.10<br \/>\ndiff -u -r1.10 slimp3slave.c<br \/>\n&#8212; slimp3slave.c       12 Apr 2004 08:04:52 -0000      1.10<br \/>\n+++ slimp3slave.c       22 Jun 2006 21:21:31 -0000<br \/>\n@@ -394,7 +394,7 @@<br \/>\n}<\/p>\n<p>void output_pipe_close(FILE * f) {<br \/>\n&#8211;    fclose(f);<br \/>\n+    pclose(f);<br \/>\n}<\/p>\n<p>unsigned long curses2ir(int key) {<\/p><\/blockquote>\n<p>I have sent this change to the author, so maybe it&#8217;ll get integrated.<\/p>\n<p>Now I have a working streaming system. The only remaining problem seems to be the wireless networking to the client dropping out from time to time &#8211; a wire would fix that one \ud83d\ude42<\/p>\n<p>And in the past couple of days I&#8217;ve even got a client (softsqueeze on Windows this time) running at work that&#8217;s streaming the music over my ADSL connection. Very handy!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In my last post about setting up a slimserver I said that I was having trouble getting slimp3slave working: Whilst it doesn\u00e2\u20ac\u2122t appear to have any problems, I didn\u00e2\u20ac\u2122t have much success with the players. mpg123 got confused by the stream, and madplay kept skipping the beginnings of tracks when I hit next on the server. This could be a &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-computing"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":1,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"predecessor-version":[{"id":369,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/posts\/44\/revisions\/369"}],"wp:attachment":[{"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bishnet.net\/tim\/blog\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}