in reply to RE(4): MP3 server with IO::Socket
in thread MP3 server with IO::Socket
fixes all. I also took out the forking-ness of the server, just to simplify the debug process, but I'm sure that's OK. With the fix in place, the code segment now looks like this:BINMODE(SONG);
I think this fix suggests that somewhere in the MP3's being streamed, read() was encountering what it thought was an EOF, where in fact it was misinterpreting the data. Am I right? (I guessed at binmode, read the cookbook, then understood)<text cut> ... #what song are we playing warn( "play song: $song\n"); #open the song, or continue to try another one open (SONG, $song) || next; #### NEW CODE #### binmode (SONG); #### END NEW CODE #### my $read_status = 1; my $print_status = 1; my $chunk; .... <end cut>
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: RE(4): MP3 server with IO::Socket
by perlmonkey (Hermit) on Feb 28, 2001 at 00:08 UTC | |
by brainiac (Initiate) on Mar 03, 2001 at 02:10 UTC | |
by perlmonkey (Hermit) on Mar 10, 2001 at 05:27 UTC |