Skip to main content

Topic: Lame with libsndfile -- errorlevel (Read 3306 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • UNHchabo
  • [*][*]
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?

  • john33
  • [*][*][*][*][*]
  • Developer
Lame with libsndfile -- errorlevel
Reply #1
I'll take a look at it when I have a moment.
John
----------------------------------------------------------------
My compiles and utilities are at http://www.rarewares.org/

  • UNHchabo
  • [*][*]
Lame with libsndfile -- errorlevel
Reply #2
Cool, thanks!