Discussion:
Couldn't help myself
dean blackketter
2001-12-10 06:47:47 UTC
Permalink
Can you resend this as an attachment?

the funny wrapping is probably going to make the patching choke.

-dean
... I'm back with more patches I guess =)
This stuff is great.
cvs diff -upB > diffile
then email diffile as an attachment.
Keep up the good work!
-dean
Ok here is the cvs diff -upB it's got all the patches in it, the
volume patch, the scrolling title's, and the underscore fix
Index: slimp3/server/lib/SliMP3/Animation.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Animation.pm,v
retrieving revision 1.4
diff -u -p -B -r1.4 Animation.pm
--- slimp3/server/lib/SliMP3/Animation.pm 2001/12/01 20:30:12
1.4
+++ slimp3/server/lib/SliMP3/Animation.pm 2001/12/08 08:27:10
@@ -89,6 +89,46 @@ sub doEasterEgg {
}
+# FUNCTION: scrollText
+#
+# DESCRIPTION: Given 2 lines of text, the function will hold
+# the top line of text, and scroll the bottom line of text to
+# the left. It will pause for 3 seconds, Scroll 4 times, pause
for
+# 3 seconds.
+#
+# EXAMPLE OUTPUT: Now playing (2 of 3)
+# -- The Band - The Song
+# -- The Band - The Song
+# <---- text moving that way
+#
+# USEAGE: scrollText($client,$text1,$text2)
+sub scrollText {
+ my $client = shift;
+ my $text1 = shift || ' ' x 40;
+ my $text2 = shift || ' ' x 40;
+
+ my $now = time();
+
+ $text2 = $text2 . " -- ";
+
$text2 };
+ $now += 3;
+
+ for (my $j = 0; $j < 4; $j++) {
+ for (my $i = 0; $i < length($text2); $i++) {
+ my $t2 = substr($text2 . $text2, $i, 40);
$text1 , line2 => $t2 };
+ $now += 0.1;
+ }
+ }
+
$text2 };
+ $now +=3;
$text2 };
+}
+
# take the list of animation "frames" and queue them up
sub startAnimation {
my $client = shift;
Index: slimp3/server/lib/SliMP3/Display.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Display.pm,v
retrieving revision 1.12
diff -u -p -B -r1.12 Display.pm
--- slimp3/server/lib/SliMP3/Display.pm 2001/12/01 20:30:12 1.12
+++ slimp3/server/lib/SliMP3/Display.pm 2001/12/08 08:27:10
@@ -56,8 +56,19 @@ sub screenSaver {
SliMP3::VFD::vfdUpdate($client, $line1, '');
} elsif ($client->epochirtime < time() - $screenSaverTimeout)
{
+ my $text1 = "";
+ my $text2 = "";
+
# otherwise wait until we haven't hit a button for a
while, then show the current song.
- SliMP3::VFD::vfdUpdate($client,
SliMP3::Buttons::Playlist::currentSongLines($client));
+ ($text1, $text2) =
SliMP3::Buttons::Playlist::currentSongLines($client);
+ if(length($text2) > 40)
+ {
+ SliMP3::Animation::scrollText($client,
$text1, $text2);
+ }
+ else
+ {
+ SliMP3::VFD::vfdUpdate($client, $text1,
$text2);
+ }
} else {
SliMP3::VFD::refresh($client);
}
@@ -80,6 +91,25 @@ sub startScreenSaver {
# start it again immediately
screenSaver($client);
+}
+
+# FUNCTION: barDisplay
+#
+# DESCRIPTION: Used to display a heading followed by a
linear
+# meter ontop of the current song playing.
+#
+# EXAMPLE OUTPUT: Louder [############### ]
+# The Band - The Song
+#
+# USEAGE: barDisplay($client,$heading,$level)
+sub barDisplay {
+ my $client = shift;
+ my $heading = shift || "Undefined";
+ my $level = shift || 100;
+ my $line1=sprintf("%-17s [%-20s]",$heading,('#' x
($level/5)));
+ my $line2 = SliMP3::Buttons::Playlist::currentSongLines
($client);
+
+ SliMP3::Animation::showBriefly($client,$line1,$line2);
}
1;
Index: slimp3/server/lib/SliMP3/IR.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/IR.pm,v
retrieving revision 1.16
diff -u -p -B -r1.16 IR.pm
--- slimp3/server/lib/SliMP3/IR.pm 2001/11/30 03:54:01 1.16
+++ slimp3/server/lib/SliMP3/IR.pm 2001/12/08 08:27:11
@@ -169,8 +169,8 @@ right 00 00 f7 cb
down 00 00 f7 8b
menu 00 00 f7 83
ok 00 00 f7 2b
-volup 00 00 f7 78
-voldown 00 00 f7 f8
+volup 00 00 c5 78
+voldown 00 00 c5 f8
chup 00 00 f7 0d
chdown 00 00 f7 8d
muting XX XX XX XX
Index: slimp3/server/lib/SliMP3/Playlist.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Playlist.pm,v
retrieving revision 1.29
diff -u -p -B -r1.29 Playlist.pm
--- slimp3/server/lib/SliMP3/Playlist.pm 2001/12/01 20:30:12
1.29
+++ slimp3/server/lib/SliMP3/Playlist.pm 2001/12/08 08:27:12
@@ -21,6 +21,9 @@ sub openNext {
my $fullpath = '';
+ # We are starting a new song, lets kill any nimation
+ SliMP3::Animation::killAnimation($client);
+
# close the previous handle to prevent leakage.
if (defined $client->mp3filehandle()) {
$client->mp3filehandle->close();
Index: slimp3/server/lib/SliMP3/VFD.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/VFD.pm,v
retrieving revision 1.10
diff -u -p -B -r1.10 VFD.pm
--- slimp3/server/lib/SliMP3/VFD.pm 2001/11/30 03:54:01 1.10
+++ slimp3/server/lib/SliMP3/VFD.pm 2001/12/08 08:27:12
@@ -104,6 +104,10 @@ sub vfdUpdate {
my $line1 = shift || '';
my $line2 = shift || '';
+ # eliminate _'s in the text, since commands start with _
+ $line1 =~ s/_/\ /g;
+ $line2 =~ s/_/\ /g;
+
# translate iso8859-1 to vfd charset
$line1 =~tr/åäöÅÄÖüÜéÉáÁ/\x84\xe1\x87\x81\x80\x86\x8b\x8a\x65
\x54\x83\x41/;
$line2 =~tr/åäöÅÄÖüÜéÉáÁ/\x84\xe1\x87\x81\x80\x86\x8b\x8a\x65
\x54\x83\x41/;
Index: slimp3/server/lib/SliMP3/Buttons/Common.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Buttons/Common.pm,v
retrieving revision 1.7
diff -u -p -B -r1.7 Common.pm
--- slimp3/server/lib/SliMP3/Buttons/Common.pm 2001/12/01 20:30:12
1.7
+++ slimp3/server/lib/SliMP3/Buttons/Common.pm 2001/12/08 08:27:15
@@ -113,8 +113,10 @@ sub volup {
my $client = shift;
SliMP3::Playlist::executecommand
($client, "mixer", "volume", "+1");
+ SliMP3::Display::barDisplay($client,string
('VOLUME_LOUDER'),$client->volume);
}
+
sub voldown {
my $client = shift;
@@ -119,6 +121,7 @@ sub voldown {
my $client = shift;
SliMP3::Playlist::executecommand
($client, "mixer", "volume", "-1");
+ SliMP3::Display::barDisplay($client,string
('VOLUME_SOFTER'),$client->volume);
}
sub power {
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Promise to Quit
Nicotrol will help
http://us.click.yahoo.com/5vN8tD/AqSDAA/ySSFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
dean blackketter
2003-02-22 13:18:35 UTC
Permalink
<!doctype html public "-//W3C//DTD W3 HTML//EN">
<head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>[slimp3-dev] Re: Couldn't help
myself</title></head><body>
<div>Can you resend this as an attachment?&nbsp; </div>
<div><br></div>
<div>the funny wrapping is probably going to make the patching
choke.</div>
<div><br></div>
<div>-dean</div>
<div><br></div>
<blockquote type="cite" cite>--- In slimp3-dev-F5Bj5G+***@public.gmane.org, dean blackketter
&lt;dean-***@public.gmane.org&gt; wrote:<br>
&gt; &gt;... I'm back with more patches I guess =)<br>
&gt; <br>
&gt; This stuff is great.<br>
&gt; <br>
&gt; We've been taking patches using:<br>
&gt; <br>
&gt; cvs diff -upB &gt; diffile<br>
&gt; <br>
&gt; then email diffile as an attachment.<br>
&gt; <br>
&gt; Keep up the good work!<br>
&gt; <br>
&gt; -dean<br>
<br>
Ok here is the cvs diff -upB it's got all the patches in it, the <br>
volume patch, the scrolling title's, and the underscore fix<br>
<br>
<br>
</blockquote>
<blockquote type="cite" cite>Index:
slimp3/server/lib/SliMP3/Animation.pm<br>
===================================================================<br
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Animation.pm,v<br>
retrieving revision 1.4<br>
diff -u -p -B -r1.4 Animation.pm<br>
---
slimp3/server/lib/SliMP3/Animation.pm<x-tab
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>2001/12/01
20:30:12<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>1.4<br>
+++ slimp3/server/lib/SliMP3/Animation.pm<x-tab>&nbsp;&nbsp;&nbsp;
</x-tab>2001/12/08 08:27:10<br>
@@ -89,6 +89,46 @@ sub doEasterEgg {<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>startAnimation($client, \@newqueue);<br>
&nbsp;}<br>
&nbsp;<br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>FUNCTION:<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>scrollText<br>
+#<br>
+#<x-tab>&nbsp; </x-tab>DESCRIPTION:<x-tab>&nbsp;&nbsp;&nbsp;
</x-tab>Given 2 lines of text, the function will hold <br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>the top
line of text, and scroll the bottom line of text to<br>
+#<x-tab>&nbsp;&nbsp; </x-tab>the left. It will pause for 3 seconds,
Scroll 4 times, pause <br>
for<br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>3 seconds.<br>
+#<br>
+#<x-tab>&nbsp; </x-tab>EXAMPLE OUTPUT: Now playing (2 of 3)<br>
+#<x-tab>&nbsp; </x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>&nbsp;
--&nbsp; The Band - The Song<br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>--&nbsp;
The Band - The Song<br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>&lt;---- text moving that way<br>
+#<br>
+#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; USEAGE:<x-tab>&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>scrollText($client,$text1,$text2)<br>
+sub scrollText {<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my $client = shift;<br>
+<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>my $text1 = shift || ' ' x 40;<br>
+<x-tab> </x-tab>my $text2 = shift || ' ' x 40;<br>
+<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my $now =
time();<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my @newqueue = ();<br>
+<br>
+<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>$text2 = $text2 . &quot;&nbsp;&nbsp;
--&nbsp;&nbsp; &quot;;<br>
+<br>
+<x-tab> </x-tab>push @newqueue, { time =&gt; $now, line1 =&gt; $text1
, line2 =&gt; <br>
$text2 };<br>
+<x-tab>&nbsp;&nbsp; </x-tab>$now += 3;<br>
+<br>
+<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>for (my $j = 0; $j &lt; 4; $j++)
{<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>for
(my $i = 0; $i &lt; length($text2); $i++) {<br>
+<x-tab>&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my
$t2 = substr($text2 . $text2, $i, 40);<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>push
@newqueue, { time =&gt; $now, line1 =&gt; <br>
$text1 , line2 =&gt; $t2 };<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>$now
+= 0.1;<br>
+<x-tab>&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>}<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>}<br>
+<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>push @newqueue, { time =&gt;
$now, line1 =&gt; $text1 , line2 =&gt; <br>
$text2 };<br>
+<x-tab>&nbsp;&nbsp; </x-tab>$now +=3;<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>push @newqueue, { time
=&gt; $now, line1 =&gt; $text1 , line2 =&gt; <br>
$text2 };<br>
+<x-tab>&nbsp;&nbsp; </x-tab>startAnimation($client, \@newqueue);<br>
+}<br>
+<br>
&nbsp;# take the list of animation &quot;frames&quot; and queue them
up<br>
&nbsp;sub startAnimation {<br>
&nbsp;<x-tab>&nbsp;&nbsp; </x-tab>my $client = shift;<br>
Index: slimp3/server/lib/SliMP3/Display.pm<br>
===================================================================<br
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Display.pm,v<br>
retrieving revision 1.12<br>
diff -u -p -B -r1.12 Display.pm<br>
--- slimp3/server/lib/SliMP3/Display.pm<x-tab>&nbsp;&nbsp;
</x-tab>2001/12/01 20:30:12<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>1.12</blockquote>
<blockquote type="cite" cite>+++
slimp3/server/lib/SliMP3/Display.pm<x-tab> </x-tab>2001/12/08
08:27:10<br>
@@ -56,8 +56,19 @@ sub screenSaver {<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>&nbsp;&nbsp; <x-tab>&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>SliMP3::VFD::vfdUpdate($client, $line1, '');<br>
&nbsp;<x-tab>&nbsp;&nbsp; </x-tab>&nbsp;&nbsp;
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp; </x-tab><br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>} elsif
($client-&gt;epochirtime &lt; time() - $screenSaverTimeout) <br>
{<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my
$text1 = &quot;&quot;;<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my
$text2 = &quot;&quot;;<br>
+<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>#
otherwise wait until we haven't hit a button for a <br>
while, then show the current song.<br>
-<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>SliMP3::VFD::vfdUpdate($client, <br>
SliMP3::Buttons::Playlist::currentSongLines($client));<br>
+<x-tab> </x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>($text1, $text2) = <br>
SliMP3::Buttons::Playlist::currentSongLines($client);<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>if(length($text2) &gt; 40)<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>{<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>SliMP3::Animation::scrollText($client, <br>
$text1, $text2);<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>}<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>else<br>
+<x-tab>&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>{<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>SliMP3::VFD::vfdUpdate($client, $text1, <br>
$text2);<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>}<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>} else {<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>SliMP3::VFD::refresh($client);<br>
&nbsp;<x-tab> </x-tab>}<br>
@@ -80,6 +91,25 @@ sub startScreenSaver {<br>
&nbsp;<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp; </x-tab># start it again
immediately<br>
&nbsp;<x-tab>&nbsp;&nbsp; </x-tab>screenSaver($client);<br>
+}<br>
+<br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>FUNCTION:<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>barDisplay<br>
+#<br>
+#<x-tab>&nbsp; </x-tab>DESCRIPTION:<x-tab>&nbsp;&nbsp;&nbsp;
</x-tab>Used to display a heading followed by a <br>
linear <br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>meter ontop of
the current song playing.<br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab><br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>EXAMPLE OUTPUT:<x-tab>
</x-tab>Louder<x-tab>&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>[###############&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ]<br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>The
Band - The Song<br>
+#<x-tab>&nbsp;&nbsp; </x-tab><br>
+#<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>USEAGE:<x-tab>
</x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>barDisplay($client,$heading,$level)<br>
+sub barDisplay {<br>
+<x-tab>&nbsp;&nbsp; </x-tab>my $client = shift;<br>
+<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>my $heading = shift ||
&quot;Undefined&quot;;<br>
+<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>my $level = shift || 100;<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my
$line1=sprintf(&quot;%-17s [%-20s]&quot;,$heading,('#' x <br>
($level/5)));<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my $line2 =
SliMP3::Buttons::Playlist::currentSongLines<br>
($client);<br>
+<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>SliMP3::Animation::showBriefly($client,$line1,$line2);<br>
&nbsp;}<br>
&nbsp;<br>
&nbsp;1;<br>
Index: slimp3/server/lib/SliMP3/IR.pm<br>
===================================================================<br
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/IR.pm,v<br>
retrieving revision 1.16<br>
diff -u -p -B -r1.16 IR.pm<br>
--- slimp3/server/lib/SliMP3/IR.pm<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>2001/11/30 03:54:01<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>1.16<br>
+++ slimp3/server/lib/SliMP3/IR.pm<x-tab>&nbsp; </x-tab>2001/12/08
08:27:11<br>
@@ -169,8 +169,8 @@ right&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
cb<br>
&nbsp;down&nbsp;&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
8b<br>
&nbsp;menu&nbsp;&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
83<br>
&nbsp;ok&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
2b<br>
-volup&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
78<br>
-voldown 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
f7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f8<br>
+volup&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; c5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
78<br>
+voldown 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
c5&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f8<br>
&nbsp;chup&nbsp;&nbsp;&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
0d<br>
&nbsp;chdown&nbsp; 00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; f7&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
8d<br>
&nbsp;muting&nbsp; XX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
XX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; XX&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
XX<br>
Index: slimp3/server/lib/SliMP3/Playlist.pm<br>
===================================================================<br
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Playlist.pm,v<br>
retrieving revision 1.29<br>
diff -u -p -B -r1.29 Playlist.pm<br>
--- slimp3/server/lib/SliMP3/Playlist.pm<x-tab>&nbsp;&nbsp;
</x-tab>2001/12/01 20:30:12<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>1.29<br>
+++ slimp3/server/lib/SliMP3/Playlist.pm<x-tab>&nbsp;&nbsp;&nbsp;
</x-tab>2001/12/08 08:27:12<br>
@@ -21,6 +21,9 @@ sub openNext {<br>
&nbsp;<br>
&nbsp;<x-tab>&nbsp;&nbsp; </x-tab>my $fullpath = '';<br>
&nbsp;<br>
+<x-tab>&nbsp;&nbsp;&nbsp; </x-tab># We are starting a new song, lets
kill any nimation<br>
+<x-tab>&nbsp;&nbsp;
</x-tab>SliMP3::Animation::killAnimation($client);<br>
+<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp; </x-tab># close the previous handle to
prevent leakage.<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>if
(defined $client-&gt;mp3filehandle()) {<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab><x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>$client-&gt;mp3filehandle-&gt;close();<br>
Index: slimp3/server/lib/SliMP3/VFD.pm<br>
===================================================================<br
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/VFD.pm,v<br>
retrieving revision 1.10<br>
diff -u -p -B -r1.10 VFD.pm<br>
--- slimp3/server/lib/SliMP3/VFD.pm<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>2001/11/30 03:54:01<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;
</x-tab>1.10<br>
+++ slimp3/server/lib/SliMP3/VFD.pm<x-tab> </x-tab>2001/12/08
08:27:12<br>
@@ -104,6 +104,10 @@ sub vfdUpdate {<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my
$line1&nbsp; = shift || '';<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>my $line2&nbsp; =
shift || '';<br>
&nbsp;<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp; </x-tab># eliminate _'s in the text,
since commands start with _<br>
+<x-tab>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>$line1 =~ s/_/\
/g;<br>
+<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>$line2 =~ s/_/\ /g;<br>
+<br>
&nbsp;<x-tab>&nbsp;&nbsp; </x-tab># translate iso8859-1 to vfd
charset<br>
&nbsp;<x-tab>&nbsp;&nbsp; </x-tab>$line1
=~tr/ŒŠš€…Ÿ†Žƒ‡ç/\x84\xe1\x87\x81\x80\x86\x8b\x8a\x65<br>
\x54\x83\x41/;<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>$line2
=~tr/ŒŠš€…Ÿ†Žƒ‡ç/\x84\xe1\x87\x81\x80\x86\x8b\x8a\x65<br>
\x54\x83\x41/;<br>
Index: slimp3/server/lib/SliMP3/Buttons/Common.pm<br>
===================================================================<br
RCS file:
/cvsroot/slimp3/slimp3/server/lib/SliMP3/Buttons/Common.pm,v<br>
retrieving revision 1.7<br>
diff -u -p -B -r1.7 Common.pm<br>
--- slimp3/server/lib/SliMP3/Buttons/Common.pm<x-tab>
</x-tab>2001/12/01 20:30:12<br>
<x-tab>&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>1.7<br>
+++
slimp3/server/lib/SliMP3/Buttons/Common.pm<x-tab
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </x-tab>2001/12/08 08:27:15<br>
@@ -113,8 +113,10 @@ sub volup {<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>my $client = shift;<br>
&nbsp;<br>
&nbsp;<x-tab>&nbsp;&nbsp; </x-tab>SliMP3::Playlist::executecommand<br>
($client, &quot;mixer&quot;, &quot;volume&quot;, &quot;+1&quot;);<br>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SliMP3::Display::barDisplay($client,string<br>
('VOLUME_LOUDER'),$client-&gt;volume);<br>
&nbsp;}<br>
&nbsp;<br>
+<br>
&nbsp;sub voldown {<br>
&nbsp;<x-tab>&nbsp;&nbsp;&nbsp; </x-tab>my $client = shift;<br>
&nbsp;<br>
@@ -119,6 +121,7 @@ sub voldown {<br>
&nbsp;<x-tab>&nbsp; </x-tab>my $client = shift;<br>
&nbsp;<br>
&nbsp;<x-tab>&nbsp;&nbsp; </x-tab>SliMP3::Playlist::executecommand<br>
($client, &quot;mixer&quot;, &quot;volume&quot;, &quot;-1&quot;);<br>
+<x-tab>&nbsp;&nbsp;&nbsp;
</x-tab>SliMP3::Display::barDisplay($client,string<br>
('VOLUME_SOFTER'),$client-&gt;volume);<br>
&nbsp;}<br>
&nbsp;<br>
&nbsp;sub power {<br>
<br>
<br>
<br>
------------------------ Yahoo! Groups Sponsor
---------------------~--&gt;<br>
Promise to Quit<br>
Nicotrol will help<br>
http://us.click.yahoo.com/5vN8tD/AqSDAA/ySSFAA/rIp0lB/TM<br>
---------------------------------------------------------------------<span </span>~-&gt;<br>
<br>
To unsubscribe from this group, send an email to:<br>
slimp3-dev-unsubscribe-***@public.gmane.org<br>
<br>
&nbsp;<br>
<br>
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ </blockquote>
<div><br></div>
</body>
</html>
soopahphro
2001-12-08 08:34:35 UTC
Permalink
... I'm back with more patches I guess =)
This stuff is great.
cvs diff -upB > diffile
then email diffile as an attachment.
Keep up the good work!
-dean
Ok here is the cvs diff -upB it's got all the patches in it, the
volume patch, the scrolling title's, and the underscore fix



Index: slimp3/server/lib/SliMP3/Animation.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Animation.pm,v
retrieving revision 1.4
diff -u -p -B -r1.4 Animation.pm
--- slimp3/server/lib/SliMP3/Animation.pm 2001/12/01 20:30:12
1.4
+++ slimp3/server/lib/SliMP3/Animation.pm 2001/12/08 08:27:10
@@ -89,6 +89,46 @@ sub doEasterEgg {
startAnimation($client, \@newqueue);
}

+# FUNCTION: scrollText
+#
+# DESCRIPTION: Given 2 lines of text, the function will hold
+# the top line of text, and scroll the bottom line of text to
+# the left. It will pause for 3 seconds, Scroll 4 times, pause
for
+# 3 seconds.
+#
+# EXAMPLE OUTPUT: Now playing (2 of 3)
+# -- The Band - The Song
+# -- The Band - The Song
+# <---- text moving that way
+#
+# USEAGE: scrollText($client,$text1,$text2)
+sub scrollText {
+ my $client = shift;
+ my $text1 = shift || ' ' x 40;
+ my $text2 = shift || ' ' x 40;
+
+ my $now = time();
+ my @newqueue = ();
+
+ $text2 = $text2 . " -- ";
+
+ push @newqueue, { time => $now, line1 => $text1 , line2 =>
$text2 };
+ $now += 3;
+
+ for (my $j = 0; $j < 4; $j++) {
+ for (my $i = 0; $i < length($text2); $i++) {
+ my $t2 = substr($text2 . $text2, $i, 40);
+ push @newqueue, { time => $now, line1 =>
$text1 , line2 => $t2 };
+ $now += 0.1;
+ }
+ }
+
+ push @newqueue, { time => $now, line1 => $text1 , line2 =>
$text2 };
+ $now +=3;
+ push @newqueue, { time => $now, line1 => $text1 , line2 =>
$text2 };
+ startAnimation($client, \@newqueue);
+}
+
# take the list of animation "frames" and queue them up
sub startAnimation {
my $client = shift;
Index: slimp3/server/lib/SliMP3/Display.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Display.pm,v
retrieving revision 1.12
diff -u -p -B -r1.12 Display.pm
--- slimp3/server/lib/SliMP3/Display.pm 2001/12/01 20:30:12 1.12
+++ slimp3/server/lib/SliMP3/Display.pm 2001/12/08 08:27:10
@@ -56,8 +56,19 @@ sub screenSaver {
SliMP3::VFD::vfdUpdate($client, $line1, '');

} elsif ($client->epochirtime < time() - $screenSaverTimeout)
{
+ my $text1 = "";
+ my $text2 = "";
+
# otherwise wait until we haven't hit a button for a
while, then show the current song.
- SliMP3::VFD::vfdUpdate($client,
SliMP3::Buttons::Playlist::currentSongLines($client));
+ ($text1, $text2) =
SliMP3::Buttons::Playlist::currentSongLines($client);
+ if(length($text2) > 40)
+ {
+ SliMP3::Animation::scrollText($client,
$text1, $text2);
+ }
+ else
+ {
+ SliMP3::VFD::vfdUpdate($client, $text1,
$text2);
+ }
} else {
SliMP3::VFD::refresh($client);
}
@@ -80,6 +91,25 @@ sub startScreenSaver {

# start it again immediately
screenSaver($client);
+}
+
+# FUNCTION: barDisplay
+#
+# DESCRIPTION: Used to display a heading followed by a
linear
+# meter ontop of the current song playing.
+#
+# EXAMPLE OUTPUT: Louder [############### ]
+# The Band - The Song
+#
+# USEAGE: barDisplay($client,$heading,$level)
+sub barDisplay {
+ my $client = shift;
+ my $heading = shift || "Undefined";
+ my $level = shift || 100;
+ my $line1=sprintf("%-17s [%-20s]",$heading,('#' x
($level/5)));
+ my $line2 = SliMP3::Buttons::Playlist::currentSongLines
($client);
+
+ SliMP3::Animation::showBriefly($client,$line1,$line2);
}

1;
Index: slimp3/server/lib/SliMP3/IR.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/IR.pm,v
retrieving revision 1.16
diff -u -p -B -r1.16 IR.pm
--- slimp3/server/lib/SliMP3/IR.pm 2001/11/30 03:54:01 1.16
+++ slimp3/server/lib/SliMP3/IR.pm 2001/12/08 08:27:11
@@ -169,8 +169,8 @@ right 00 00 f7 cb
down 00 00 f7 8b
menu 00 00 f7 83
ok 00 00 f7 2b
-volup 00 00 f7 78
-voldown 00 00 f7 f8
+volup 00 00 c5 78
+voldown 00 00 c5 f8
chup 00 00 f7 0d
chdown 00 00 f7 8d
muting XX XX XX XX
Index: slimp3/server/lib/SliMP3/Playlist.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Playlist.pm,v
retrieving revision 1.29
diff -u -p -B -r1.29 Playlist.pm
--- slimp3/server/lib/SliMP3/Playlist.pm 2001/12/01 20:30:12
1.29
+++ slimp3/server/lib/SliMP3/Playlist.pm 2001/12/08 08:27:12
@@ -21,6 +21,9 @@ sub openNext {

my $fullpath = '';

+ # We are starting a new song, lets kill any nimation
+ SliMP3::Animation::killAnimation($client);
+
# close the previous handle to prevent leakage.
if (defined $client->mp3filehandle()) {
$client->mp3filehandle->close();
Index: slimp3/server/lib/SliMP3/VFD.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/VFD.pm,v
retrieving revision 1.10
diff -u -p -B -r1.10 VFD.pm
--- slimp3/server/lib/SliMP3/VFD.pm 2001/11/30 03:54:01 1.10
+++ slimp3/server/lib/SliMP3/VFD.pm 2001/12/08 08:27:12
@@ -104,6 +104,10 @@ sub vfdUpdate {
my $line1 = shift || '';
my $line2 = shift || '';

+ # eliminate _'s in the text, since commands start with _
+ $line1 =~ s/_/\ /g;
+ $line2 =~ s/_/\ /g;
+
# translate iso8859-1 to vfd charset
$line1 =~tr/åäöÅÄÖüÜéÉáÁ/\x84\xe1\x87\x81\x80\x86\x8b\x8a\x65
\x54\x83\x41/;
$line2 =~tr/åäöÅÄÖüÜéÉáÁ/\x84\xe1\x87\x81\x80\x86\x8b\x8a\x65
\x54\x83\x41/;
Index: slimp3/server/lib/SliMP3/Buttons/Common.pm
===================================================================
RCS file: /cvsroot/slimp3/slimp3/server/lib/SliMP3/Buttons/Common.pm,v
retrieving revision 1.7
diff -u -p -B -r1.7 Common.pm
--- slimp3/server/lib/SliMP3/Buttons/Common.pm 2001/12/01 20:30:12
1.7
+++ slimp3/server/lib/SliMP3/Buttons/Common.pm 2001/12/08 08:27:15
@@ -113,8 +113,10 @@ sub volup {
my $client = shift;

SliMP3::Playlist::executecommand
($client, "mixer", "volume", "+1");
+ SliMP3::Display::barDisplay($client,string
('VOLUME_LOUDER'),$client->volume);
}

+
sub voldown {
my $client = shift;

@@ -119,6 +121,7 @@ sub voldown {
my $client = shift;

SliMP3::Playlist::executecommand
($client, "mixer", "volume", "-1");
+ SliMP3::Display::barDisplay($client,string
('VOLUME_SOFTER'),$client->volume);
}

sub power {



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Promise to Quit
Nicotrol will help
http://us.click.yahoo.com/5vN8tD/AqSDAA/ySSFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
dean blackketter
2001-12-08 05:51:43 UTC
Permalink
... I'm back with more patches I guess =)
This stuff is great.

We've been taking patches using:

cvs diff -upB > diffile

then email diffile as an attachment.

Keep up the good work!

-dean
Ok this patch waits for the screensaver (the 15second thing), when
the screensaver comes up if the song's text is too large to fit in
the screen, it will do some fancy schmancy scroling so you can see
the whole song. Using some borrowed code from the EasterEgg
thingie. Works out good, i've been testing it for a few hours.
Here's the patch.
Patch 1
XXXXXXXXXXXXXXXXXXXXXXXX
diff -r server/lib/SliMP3/Playlist.pm myserver/lib/SliMP3/Playlist.pm
23a24,27
#if we are going to a new song, Animation should always stop
#And if there was animation the screen needs to be fixed
SliMP3::Animation::killAnimation($client);
Patch 2
XXXXXXXXXXXXXXXXXXXXXXXX
diff -r server/lib/SliMP3/Animation.pm
myserver/lib/SliMP3/Animation.pm
91a92,117
# This will Scroll the 2nd line, Takes args $text1, $text2
sub scrollText {
my $client = shift;
my $text1 = shift || ' ' x 40;
my $text2 = shift || ' ' x 40;
my $now = time();
$text2 = $text2 . " -- ";
$text2 };
$now += 4;
for (my $j = 0; $j < 4; $j++) {
for (my $i = 0; $i < length($text2); $i++) {
my $t2 = substr($text2 . $text2, $i, 40);
$text1 , line2 => $t2 };
$now += 0.1;
}
}
$text2 };
}
Patch 3
XXXXXXXXXXXXXXXXXXXXXXXXX
diff -r server/lib/SliMP3/Display.pm myserver/lib/SliMP3/Display.pm
58a59,60
my $text1 = "";
my $text2 = "";
60c62,70
< SliMP3::VFD::vfdUpdate($client,
SliMP3::Buttons::Playlist::currentSongLines($client));
---
($text1, $text2) =
SliMP3::Buttons::Playlist::currentSongLines($client);
if(length($text2) > 40)
{
SliMP3::Animation::scrollText($client,
$text1, $text2);
}
else
{
SliMP3::VFD::vfdUpdate($client, $text1,
$text2);
}
Ok after getting this patch done, I have appear to have songs that
have underscores in them ( '_' ) ... and well it appears if you use
vfdUpdate STARTING with a _ then you are trying to do a command.
Well now that the text is scrolling if it gets to the part that has
the underscore in it, its now in the beginning so I would get this
error each time it came on the underscore
Use of uninitialized value in concatenation (.) at lib/SliMP3/VFD.pm
line 177.
I looked and I didn't see any code using vfdUpdate to send codes,
they use vfdSend. So I wrote this patch that changes all the _'s to
spaces which makes the titles look better, it didn't seem to break
anything.
diff -r server/lib/SliMP3/VFD.pm myserver/lib/SliMP3/VFD.pm
106a107,110
# eliminate _'s in the text, since commands start with _
$line1 =~ s/_/\ /g;
$line2 =~ s/_/\ /g;
The text will only scroll on the songs that are too large to fit on
the screen, it works with either display method the filename's or the
mp3info's.... scrolls 4 times, then waits for 8 seconds, then scrolls
4 times again etc. Looks REALLY good in my opinion =)
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Stop Smoking Now
Nicotrol will help
http://us.click.yahoo.com/2vN8tD/_pSDAA/ySSFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
soopahphro
2001-12-08 05:42:14 UTC
Permalink
... I'm back with more patches I guess =)

Ok this patch waits for the screensaver (the 15second thing), when
the screensaver comes up if the song's text is too large to fit in
the screen, it will do some fancy schmancy scroling so you can see
the whole song. Using some borrowed code from the EasterEgg
thingie. Works out good, i've been testing it for a few hours.

Here's the patch.

Patch 1
XXXXXXXXXXXXXXXXXXXXXXXX
diff -r server/lib/SliMP3/Playlist.pm myserver/lib/SliMP3/Playlist.pm
23a24,27
#if we are going to a new song, Animation should always stop
#And if there was animation the screen needs to be fixed
SliMP3::Animation::killAnimation($client);
Patch 2
XXXXXXXXXXXXXXXXXXXXXXXX
diff -r server/lib/SliMP3/Animation.pm
myserver/lib/SliMP3/Animation.pm
91a92,117
# This will Scroll the 2nd line, Takes args $text1, $text2
sub scrollText {
my $client = shift;
my $text1 = shift || ' ' x 40;
my $text2 = shift || ' ' x 40;
my $now = time();
$text2 = $text2 . " -- ";
$text2 };
$now += 4;
for (my $j = 0; $j < 4; $j++) {
for (my $i = 0; $i < length($text2); $i++) {
my $t2 = substr($text2 . $text2, $i, 40);
$text1 , line2 => $t2 };
$now += 0.1;
}
}
$text2 };
}
Patch 3
XXXXXXXXXXXXXXXXXXXXXXXXX
diff -r server/lib/SliMP3/Display.pm myserver/lib/SliMP3/Display.pm
58a59,60
my $text1 = "";
my $text2 = "";
60c62,70
< SliMP3::VFD::vfdUpdate($client,
SliMP3::Buttons::Playlist::currentSongLines($client));
---
($text1, $text2) =
SliMP3::Buttons::Playlist::currentSongLines($client);
if(length($text2) > 40)
{
SliMP3::Animation::scrollText($client,
$text1, $text2);
}
else
{
SliMP3::VFD::vfdUpdate($client, $text1,
$text2);
}
Ok after getting this patch done, I have appear to have songs that
have underscores in them ( '_' ) ... and well it appears if you use
vfdUpdate STARTING with a _ then you are trying to do a command.
Well now that the text is scrolling if it gets to the part that has
the underscore in it, its now in the beginning so I would get this
error each time it came on the underscore

Use of uninitialized value in concatenation (.) at lib/SliMP3/VFD.pm
line 177.


I looked and I didn't see any code using vfdUpdate to send codes,
they use vfdSend. So I wrote this patch that changes all the _'s to
spaces which makes the titles look better, it didn't seem to break
anything.

diff -r server/lib/SliMP3/VFD.pm myserver/lib/SliMP3/VFD.pm
106a107,110
# eliminate _'s in the text, since commands start with _
$line1 =~ s/_/\ /g;
$line2 =~ s/_/\ /g;
The text will only scroll on the songs that are too large to fit on
the screen, it works with either display method the filename's or the
mp3info's.... scrolls 4 times, then waits for 8 seconds, then scrolls
4 times again etc. Looks REALLY good in my opinion =)




------------------------ Yahoo! Groups Sponsor ---------------------~-->
Stop Smoking Now
Nicotrol will help
http://us.click.yahoo.com/2vN8tD/_pSDAA/ySSFAA/rIp0lB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
slimp3-dev-unsubscribe-***@public.gmane.org



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
dean blackketter
2003-02-22 13:18:44 UTC
Permalink
<!doctype html public "-//W3C//DTD W3 HTML//EN">
<head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Re: [slimp3-dev] Couldn't help
myself</title></head><body>
<blockquote type="cite" cite>... I'm back with more patches I guess
=)</blockquote> <div><br></div> <div>This stuff is great.&nbsp; </div> <div><br></div> <div>We've been taking patches using:</div> <div><br></div> <div>cvs diff -upB &gt; diffile</div>
<div><br></div>
<div>then email diffile as an attachment.</div>
<div><br></div>
<div>Keep up the good work!</div>
<div><br></div>
<div>-dean</div>
<div><br></div>
<blockquote type="cite" cite>Ok this patch waits for the screensaver
(the 15second thing), when <br>
the screensaver comes up if the song's text is too large to fit in
<br>
the screen, it will do some fancy schmancy scroling so you can see
<br>
the whole song.&nbsp; Using some borrowed code from the EasterEgg <br>
thingie.&nbsp; Works out good, i've been testing it for a few
hours.<br>
<br>
Here's the patch.<br>
<br>
Patch 1<br>
XXXXXXXXXXXXXXXXXXXXXXXX<br>
diff -r server/lib/SliMP3/Playlist.pm
myserver/lib/SliMP3/Playlist.pm<br>
23a24,27<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #if we are going to a new
song, Animation should always stop<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #And if there was animation
the screen needs to be fixed<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SliMP3::Animation::killAnimation($client);<br>
&gt;<br>
<br>
<br>
Patch 2<br>
XXXXXXXXXXXXXXXXXXXXXXXX<br>
diff -r server/lib/SliMP3/Animation.pm <br>
myserver/lib/SliMP3/Animation.pm<br>
91a92,117<br>
&gt; # This will Scroll the 2nd line, Takes args $text1, $text2<br>
&gt; sub scrollText {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; my $client = shift;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; my $text1 = shift || ' ' x 40;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; my $text2 = shift || ' ' x 40;<br>
&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; my $now = time();<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; my @newqueue = ();<br>
&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; $text2 = $text2 . &quot;&nbsp;&nbsp;&nbsp;
--&nbsp;&nbsp;&nbsp; &quot;;<br>
&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; push @newqueue, { time =&gt; $now, line1
=&gt; $text1 , line2 =&gt; <br>
$text2 };<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; $now += 4;<br>
&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp; for (my $j = 0; $j &lt; 4; $j++) {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; for (my $i = 0; $i &lt;
length($text2); $i++) {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
my $t2 = substr($text2 . $text2, $i, 40);<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
push @newqueue, { time =&gt; $now, line1 =&gt; <br>
$text1 , line2 =&gt; $t2 };<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
$now += 0.1;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; push @newqueue, { time =&gt; $now,
line1 =&gt; $text1 , line2 =&gt; <br>
$text2 };<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; startAnimation($client,
\@newqueue);<br>
&gt; }<br>
&gt;<br>
<br>
Patch 3<br>
XXXXXXXXXXXXXXXXXXXXXXXXX<br>
diff -r server/lib/SliMP3/Display.pm
myserver/lib/SliMP3/Display.pm<br>
58a59,60<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; my $text1 = &quot;&quot;;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; my $text2 = &quot;&quot;;<br>
60c62,70<br>
&lt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; SliMP3::VFD::vfdUpdate($client, <br>
SliMP3::Buttons::Playlist::currentSongLines($client));<br>
---<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; ($text1, $text2) = <br>
SliMP3::Buttons::Playlist::currentSongLines($client);<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span </span>&nbsp;&nbsp;&nbsp;&nbsp; if(length($text2) &gt; 40)<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SliMP3::Animation::scrollText($client, <br>
$text1, $text2);<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; }<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; else<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
SliMP3::VFD::vfdUpdate($client, $text1, <br>
$text2);<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span
</span>&nbsp;&nbsp;&nbsp;&nbsp; }<br>
<br>
<br>
Ok after getting this patch done, I have appear to have songs that
</blockquote>
<blockquote type="cite" cite>have underscores in them ( '_' ) ... and
well it appears if you use </blockquote>
<blockquote type="cite" cite>vfdUpdate STARTING with a _ then you are
trying to do a command.&nbsp; </blockquote>
<blockquote type="cite" cite>Well now that the text is scrolling if it
gets to the part that has <br>
the underscore in it, its now in the beginning so I would get this
<br>
error each time it came on the underscore<br>
<br>
Use of uninitialized value in concatenation (.) at lib/SliMP3/VFD.pm
<br>
line 177.<br>
<br>
<br>
I looked and I didn't see any code using vfdUpdate to send codes, <br>
they use vfdSend.&nbsp; So I wrote this patch that changes all the _'s
to <br>
spaces which makes the titles look better, it didn't seem to break
<br>
anything.<br>
<br>
diff -r server/lib/SliMP3/VFD.pm myserver/lib/SliMP3/VFD.pm<br>
106a107,110<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # eliminate _'s in the text,
since commands start with _<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $line1 =~ s/_/\ /g;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $line2 =~ s/_/\ /g;<br>
&gt;<br>
<br>
<br>
The text will only scroll on the songs that are too large to fit on
<br>
the screen, it works with either display method the filename's or the
<br>
mp3info's.... scrolls 4 times, then waits for 8 seconds, then scrolls
<br>
4 times again etc.&nbsp; Looks REALLY good in my opinion =)<br>
<br>
<br>
<br>
<br>
------------------------ Yahoo! Groups Sponsor
---------------------~--&gt;<br>
Stop Smoking Now<br>
Nicotrol will help<br>
http://us.click.yahoo.com/2vN8tD/_pSDAA/ySSFAA/rIp0lB/TM<br>
---------------------------------------------------------------------<span </span>~-&gt;<br>
<br>
To unsubscribe from this group, send an email to:<br>
slimp3-dev-unsubscribe-***@public.gmane.org<br>
<br>
&nbsp;<br>
<br>
Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ </blockquote>
<div><br></div>
</body>
</html>

Loading...