Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Lame with libsndfile -- errorlevel (Read 4424 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Lame with libsndfile -- errorlevel

When I run a copy of Lame I downloaded from Rarewares, and attempt to encode a file that's not supported, the program returns a non-zero value, showing that there was an error.

Code: [Select]
c:\Media\Flac>lame metaflac.exe
Warning: unsupported audio format

c:\Media\Flac>echo %errorlevel%
1

c:\Media\Flac>


Running the copy of Lame from that includes the libsndfile library, though, it will encode anything, and return 0, indicating success.

Code: [Select]
c:\Media\Flac>lame metaflac.exe
LAME 3.98.4 32bits (http://www.mp3dev.org/)
CPU features: MMX (ASM used), SSE (ASM used), SSE2
Using polyphase lowpass filter, transition band: 16538 Hz - 17071 Hz
Encoding metaflac.exe to metaflac.exe.mp3
Encoding as 44.1 kHz j-stereo MPEG-1 Layer III (11x) 128 kbps qval=3
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
    89/89    (100%)|    0:00/    0:00|    0:00/    0:00|   24.733x|    0:00
-------------------------------------------------------------------------------
   kbps        LR    MS  %     long switch short %
  128.0       12.4  87.6        76.4   9.0  14.6
Writing LAME Tag...done
ReplayGain: -11.8dB

c:\Media\Flac>echo %errorlevel%
0

c:\Media\Flac>


I'd really appreciate it if this copy of Lame threw an error, or at least returned a non-zero value, if it finds non-audio data. Is this feasible?

Lame with libsndfile -- errorlevel

Reply #1
I'll take a look at it when I have a moment.