Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Dec 1998 09:48:02 +0100 (MET)
From:      Luigi Rizzo <luigi@labinfo.iet.unipi.it>
To:        steve@FreeBSD.ORG (Steve Price)
Cc:        multimedia@FreeBSD.ORG
Subject:   Re: cvs commit: ports/audio/mp3encode - Imported sources
Message-ID:  <199812240848.JAA04897@labinfo.iet.unipi.it>
In-Reply-To: <199812240659.WAA08724@freefall.freebsd.org> from "Steve Price" at Dec 23, 98 10:59:25 pm

next in thread | previous in thread | raw e-mail | index | archive | help
[forwarded to -multimedia]

> steve       1998/12/23 22:59:44 PST
> 
>   ports/audio/mp3encode - Imported sources
>   Update of /home/ncvs/ports/audio/mp3encode
>   In directory freefall.freebsd.org:/d/users/steve/work/mp3encode
>   
>   Log Message:
>   Initial import of mp3encode version 1.10.
>   An MPEG layer I, II, and III audio file encoder.

this code has at least two problems.

The first one is that "ISO" (not sure these ones actually come from
ISO..) sources historically have had their own ideas about endiannes,
and on i386 they end up swapping samples in the wrong way. A quick
fix for the encoder is below, and suffices to encode audio tracks
coming from CDs.  I am not sure at all this is the only place with
endiannes problem.

The second problem is introduced by the patch which changes gets() into
fgets() not accounting for the final \n returned by fgets, which ends
up being part of the filename.

Of course if someone is going to look at this package, a look at
performance would not be a bad thing. E.g. just common I/O routines
(putbits and friend) could be made way faster, and i also suspect that
some pieces of core code would benefit from a programmer's look

	cheers
	luigi

prova# pwd
/usr/ports/audio/mp3encode/work/dist10/lsf/encoder
prova# diff -ubwr encode.c.orig encode.c
--- encode.c.orig       Wed Jan 22 10:43:14 1997
+++ encode.c    Thu Dec 24 11:33:52 1998
@@ -153,9 +153,10 @@
            exit( 1 );
          }
       }
+#if 0 /* XXX lr */
     if ( NativeByteOrder == order_littleEndian )
       SwapBytesInWords( sample_buffer, samples_read );
-
+#endif
     samples_to_read -= samples_read;
     if (samples_read < frame_size && samples_read > 0) {
         printf("Insufficient PCM input for one frame - fillout with zeros\n");


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199812240848.JAA04897>