[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnump3d-users] GNUMP3d 2.7-prerelease.
From: |
Mark Schouten |
Subject: |
Re: [Gnump3d-users] GNUMP3d 2.7-prerelease. |
Date: |
Wed, 24 Mar 2004 20:39:29 +0100 |
User-agent: |
Mutt/1.5.5.1+cvs20040105i |
On Tue, Mar 23, 2004 at 06:21:51PM +0000, Steve Kemp wrote:
>
> Hi,
>
> I've made an upload of GNUMP3d v2.7 to my website.
>
> This is a *prerelease* whilst I update the templates/themes.
>
> The code is good to go I think, and it should fix a lot of
> nagging issues with:
>
> * Downsampling inconsistencies.
You might want to add this too...
this goes into 'sub streamAudioFile' somewhere in the start.
+ # Only downsample if this IP is in the right range.
+ if ( &downsampleAddress( $connected_address ) )
+ {
+ print "Downsampling disabled for: $connected_address\n";
+ &serveFile($data, $file);
+ }
+
You can put this anywhere within gnump3d
+ sub downsampleAddress( $ )
+ {
+ my ($client) = (@_);
+
+ my $go = &getConfig( "downsample_clients", "none" );
+ my $nogo = &getConfig( "no_downsample_clients", "all" );
+
+ #
+ # Multiple entries may be seperated by ';' characters.
+ #
+ my @go_array = split( /;/, $go );
+ my @nogo_array = split( /;/, $nogo );
+
+ my $doit = 0;
+
+ #
+ # But then allow the 'denied' list to override any
+ # allowed client.
+ #
+ foreach my $test ( @nogo_array )
+ {
+ if ( &matchIPAddress( $test, $client ) )
+ {
+ $doit = 0;
+ }
+ }
+
+ #
+ # Test each allowed pattern first.
+ #
+ foreach my $test ( @go_array )
+ {
+ if ( &matchIPAddress( $test, $client ) )
+ {
+ $doit = 1;
+ }
+ }
+
+ return ( not $doit );
+ }
And, AFAICS this really works. :)
I only have to work on some code to clean the cache-dir..
address@hidden:/tmp/gnump3d-2.6/bin$ du -chs /var/tmp/gnump3d/
615M /var/tmp/gnump3d
That could become a problem..
> Thanks to all those who contributed, and to all those that
> seem happy enough to run the software silently; I'll just assume
> it's perfect for you ;)
Eh, yeah, well. It works, let's keep it that way. :P
Mark
--
Mark Schouten
Read my rules of email-engagement: http://prevented.net/email-rules.html