So far, stdin/stdout with LAME in OS/2 doesn't work. I spent a few minutes
and fixed it.
Using EMX+GCC to compile LAME in IBM OS/2, stdin/stdout default is text. So
obviously this screws up LAME. To fix this, I use an EMX function which
sets the stdin/stdout to binary before we use it.
I'm working on LAME 3.29beta source, so hopefully the line numbers are
close enough for your latest in-progress sources.
In common.c around line 435, change:
if (!strcmp(bs_filenam, "-")) {
/* Write to standard output. */
bs->pt = stdout;
} else {
to:
if (!strcmp(bs_filenam, "-")) {
/* Write to standard output. */
#ifdef __EMX__
_fsetmode(stdout,"b");
#endif
bs->pt = stdout;
} else {
Similarly, in get_audio.c around line 280, change:
if (!strcmp(inPath, "-")) {
/* Read from standard input. */
musicin = stdin;
} else {
to:
if (!strcmp(inPath, "-")) {
/* Read from standard input. */
#ifdef __EMX__
_fsetmode(stdin,"b");
#endif
musicin = stdin;
} else {
Now LAME can successfully encode from/to stdout/stdin in OS/2. Yay :)
regards,
paul
--
Please note:
my email address has changed from [EMAIL PROTECTED] to [EMAIL PROTECTED]
--
MP3 ENCODER mailing list ( http://geek.rcc.se/mp3encoder/ )