Share

TwoLAME

Tracker: Bugs

5 Testing my msys+mingw build: noise! - ID: 1903536
Last Update: Comment added ( nhumfrey )

I'm testing my fresh-built twolame 0.3.12 and i'm encoding some audio
content to hear the quality.
I'm running it under winxp sp2, i'm using msys-1.0.11, mingw 3.4.5,
binutils 2.18 and libsndfile-1.0.17 with flac-1.2.1.
With twolame frontend the encoded audio is noisy and full of sync errors,
at any bitrate. Decoding with madplay reveals many, many errors and the
audio is distorced so most of the decoded samples result clipped (the
original audio is not so loud).
With simple frontend stwolame.exe the encoding is good, so the library code
is compiled the right way: GREAT!
Ok, i thought it was a buggy libsndfile causing some audio corruption
before the compression. Converted some audio to raw format and encoded
again with -r option. Well, the mp2 file is still noisy, so the problem is
in twolame frontend.
Now, i'm not a guru about mpeg audio but i want to help you to fix this, so
i can provide samples for any case, both linear pcm wav and twolame encoded
mp2.

A note about four different encodings of the same audio file. The duration
is a single frame long, the encoding is at 160 kpbs.
Simple frontend (stwolame.exe) creates a file which is 522 bytes long
An old twolame (ICL compile) 522 bytes
My twolame.exe (wav input via libsndfile) 524 bytes (the report prints 522
bytes)
My twolame.exe (raw input) 524 (the report prints 522 bytes)


eblanca76 ( eblanca76 ) - 2008-02-27 23:40

5

Closed

Fixed

Nobody/Anonymous

None

None

Public


Comments ( 3 )

Date: 2008-03-03 22:04
Sender: nhumfreyProject Admin


Thanks for tracking down that problem. I have applied those two changes to
Subversion.

The package name and version number are stored in configure.ac. config.h
is generated automatically when running ./configure. I don't know much
about mingw, but I don't think you run configure under it? configwin.h is a
hand made version of config.h for Windows. And because it is hand made, it
doesn't have the version number in it.





Date: 2008-03-02 11:16
Sender: eblanca76


Fixed.
This bug was caused by wrong open mode for output file under Windows.
/frontend/frontend.c at line 566:
file = fopen(filename, "w");
should became:
file = fopen(filename, "wb");
to fix this. The behaviour is the same under *nix systems while in Windows
writing of corrupted data due to the adding of a 0x0D char before each 0x0A
is avoided.

BTW, i fixed a small typo in written bytes reporting, line 112:
snprintf(string, MAX_NAME_SIZE, "%2.2f MB", (float)filesize/constKB);
should be:
snprintf(string, MAX_NAME_SIZE, "%2.2f KB", (float)filesize/constKB);
And that's all about frontend.c.
A small issue still remains but i cannot fix it: reported library vesion
is "unknown" as defined in the macro PACKAGE_VERSION in win32/configwin.h
I'm quite sure configure script already defines something similar, so is
it really needed to redefine this macro into configwin.h too?


Date: 2008-02-28 00:07
Sender: eblanca76


Just tested twolame-0.3.12 under linux (xubuntu 7.04) and all went ok.
So, if the executable works well under linux and the windows binary is
good when compiled with ICL, maybe is this the case of a particular int
type managed the wrong way by mingw?


Attached File

No Files Currently Attached

Changes ( 3 )

Field Old Value Date By
status_id Open 2008-03-03 22:04 nhumfrey
resolution_id None 2008-03-03 22:04 nhumfrey
close_date - 2008-03-03 22:04 nhumfrey