[Flac-dev] FLAC->mpc transcoding

David Bassendine dbassendine at yahoo.com
Wed May 22 10:20:02 PDT 2002

Hi guys. First off, keep up the good work on FLAC: great now, and looks promising in the future :)

I wonder if anyone's aware of the issues with FLAC->mpc transcoding: it works under linux but not windows. Sorry if this has been bought up loads before - i couldn't see it here.

Here's the message mppenc 1.02 comes up with on trying to encode a .flac :

"MPC Encoder 1.02  --Beta--  (C) 1999-2002 Buschmann/Klemm/Piecha
FLAC does not work properly under Windows. They have forgotten to switch to binary mode if reading/writing from/to stdin/stdout, so the data I got is corrupted and unusable. The problem can be fixed by adding:

  _setmode ( _fileno (fp), _0_BINARY );

where fp is stdin or stdout if used as data source or destination. More sophisticated code you can find in the mppdec package in the file mppdec.h which is suitable for a larger list of Operating Systems/Cmpilers.

This problem has nothing to do with Windows, DOS or MacOS, it is a problem related with the inflexible way C/C++ handles text files, so a translation layer in the C runtime library is necessary to tranlsate the native text representation to the only text representation C knows (Unix). This translation which is done inside the program (inside the linked library) must be switched off."

Is a fix easy, possible, probable? Maybe it could be added to the [ever-growing] todo list: direct transcoding would save a lot of hassle.

Cheers, tonderai

Room 7014, Wilson House, 38-76 Sussex Gdns, LONDON W2 1UFdbassendine at yahoo.com or david.r.bassendine at ic.ac.ukmobile no. - 07780708357

Sign up to watch the FIFA World Cup video highlights from your desk!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20020522/5b188c25/attachment.html

More information about the Flac-dev mailing list