Skip to main content
Topic: Monkey's Audio component fails to decode some 24 bit / 96 kHz files (Read 901 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Monkey's Audio component fails to decode some 24 bit / 96 kHz files

I have some 24 bit / 96 kHz 2 channel files compressed with Monkey's Audio v. 5.11 and later. Monkey's Audio decodes those files without errors.  foobar2000 hits unrecoverable error when playing or verifying those files.

I suspect the fb2k component needs to be rebuilt with updated Monkey's Audio SDK.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #1
can confirm, this is the error from the console. I used the latest v5.20 x64 of monkey's audio encoder and foobar plugin.

Code: [Select]
1 out of 1 tracks converted with major problems.

Source: "C:\Users\xxxxxx\Music\TEST.ape"
  Error decoding source file at 0:00.000 : Unsupported format or corrupted file

Code: [Select]
foo_input_monkey.dll (2019-11-20 11:13:18 UTC)
    Monkey's Audio Decoder 2.3.1

Code: [Select]
File name : TEST.ape
Folder name : C:\Users\xxxxxx\Music
File path : C:\Users\xxxxxx\Music\TEST.ape
Subsong index : 0
File size : 78 MB (81 853 164 bytes)
Last modified : 2020-03-10 15:13:30
Duration : 3:16.523 (18 866 232 samples)
Sample rate : 96000 Hz
Channels : 2
Bits per sample : 24
Bitrate : 3332 kbps
Codec : Monkey's Audio
Codec profile : Monkey's Audio Insane
Encoding : lossless
Embedded cuesheet : no
Audio MD5 : 9CB7CECA370C9EC050516447FD0162DD
<FLAGS> : 0
<VERSION> : 3.99
Who are you and how did you get in here ?
I'm a locksmith, I'm a locksmith.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #2
I'm afraid that current Monkey's Audio library is some 2 times slower than the old one if compiled for 32-bit.

I recommend getting rid of Monkey's Audio component and using foo_input_exe with mac.exe instead, if you need to decode these files, this way you can run 64-bit code and not suffer from performance issues.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #3
Indeed, there is 32-bit version of Monkey's Audio too. I don't observe any performance difference between 32- and 64-bit versions.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #4
It's a performance difference you have to run a benchmark to notice. It isn't something that would cause the files to decode too slowly for real-time playback.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #5
If 32-bit version were 2 times slower than 64-bit one, I would definitely notice it while processing a few hundred GB of files.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #6
The currently available component does not use the newest library.

For example, the newest component decodes these ancient maximum compressed APE files I have at 82x realtime on a single core, which is ~1.2% of a single core for real time playback, or 0.0762% of my entire CPU.

Going by Peter's description, that would mean that an updated Monkey's Audio decoder would only run at approximately 41x realtime on a single core, for my file.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #7
Measured with official MAC.exe from the website:
D:\fooSPEC>timethis mac-32.exe fear.ape auto -d

TimeThis :  Command Line :  mac-32.exe fear.ape auto -d
TimeThis :    Start Time :  Thu Mar 12 11:58:29 2020

--- Monkey's Audio Console Front End (v 5.22) (c) Matthew T. Ashland ---
Decompressing...
Progress: 100.0% (0.0 seconds remaining, 5.6 seconds total)
Success...

TimeThis :  Command Line :  mac-32.exe fear.ape auto -d
TimeThis :    Start Time :  Thu Mar 12 11:58:29 2020
TimeThis :      End Time :  Thu Mar 12 11:58:35 2020
TimeThis :  Elapsed Time :  00:00:05.643

D:\fooSPEC>timethis mac-64.exe fear.ape auto -d

TimeThis :  Command Line :  mac-64.exe fear.ape auto -d
TimeThis :    Start Time :  Thu Mar 12 11:58:40 2020

--- Monkey's Audio Console Front End (v 5.22) (c) Matthew T. Ashland ---
Decompressing...
Progress: 100.0% (0.0 seconds remaining, 3.1 seconds total)
Success...

TimeThis :  Command Line :  mac-64.exe fear.ape auto -d
TimeThis :    Start Time :  Thu Mar 12 11:58:40 2020
TimeThis :      End Time :  Thu Mar 12 11:58:44 2020
TimeThis :  Elapsed Time :  00:00:03.155



Conclusion: Current Monkey's Audio decoder heavily underperforms when compiled for 32-bit.
This will be apparent when converting Monkey's Audio files to another format, scanning ReplayGain information, etc.
Older versions perform better.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #8
Even taking as read the performance hit of later versions of MA, isn't the ability to decode files without error more important than speed?

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #9
If I switch to latest Monkey library, some people with large libraries of old files will stick with old version of the component and not install new updates. If there are security issues again, those people will not get security updates.

I'm hoping this can be resolved peacefully without performance hits.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #10
Maybe there should be a note on the plugin page mentioning this problem and the work around to use foo_input and the 64bit version of MAC?
Who are you and how did you get in here ?
I'm a locksmith, I'm a locksmith.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #11
Z:\Test>timer mac32 "01 - Section 1.ape" "01 - Section 1.wav" -d
Timer 1 on: 20:32:34
--- Monkey's Audio Console Front End (v 5.24) (c) Matthew T. Ashland ---
Decompressing...
Progress: 100.0% (0.0 seconds remaining, 69.6 seconds total)
Success...
Timer 1 off: 20:33:43  Elapsed: 0:01:09.62

Z:\Test>timer mac64 "01 - Section 1.ape" "01 - Section 1.wav" -d
Timer 1 on: 20:33:58
--- Monkey's Audio Console Front End (v 5.24) (c) Matthew T. Ashland ---
Decompressing...
Progress: 100.0% (0.0 seconds remaining, 60.2 seconds total)
Success...
Timer 1 off: 20:34:59  Elapsed: 0:01:00.21

Z:\Test>dir

 Volume in drive Z is unlabeled      Serial number is 1bff:096c
 Directory of  Z:\Test\*

 3/21/2020  20:27         <DIR>    .
 3/21/2020  20:27         <DIR>    ..
 3/10/2014   1:12      82,674,556  01 - Section 1.ape
 3/21/2020  20:36     348,430,028  01 - Section 1.wav
 3/21/2020  18:51         419,328  MAC32.exe
 3/21/2020  18:52         540,672  MAC64.exe

Conclusion:  performance difference is around 13%. I would not call it huge. Win 7 64-bit, all files are at RAM drive, 24-bit wav file is compressed at "insane" level.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #12
With the compiler used to build foobar2000 and its components, apparently it's a difference of 50%.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #13
https://foobar2000.org/components/view/foo_input_monkey/release/2.4

I'm not pushing this via auto update to everyone yet. You can update manually.

I am unable to recreate your benchmarks. I redid the tests with official Monkey's Audio mac.exe binaries (not my own compile), 32bit exe decoding is consistently almost 2x slower than 64bit exe - or older 32bit exe.

Re: Monkey's Audio component fails to decode some 24 bit / 96 kHz files

Reply #14
Verified on Ryzen 7 2700, although my test results on the same file are approximately twice as fast as yours, per core. Still, half the performance of the previous release.

In case it matters, this is a maximum compression, 16 bit stereo file. I haven't tested the performance differences of 24 bit files, or 32 bit files, both of which will have to be compared with the two official 32 and 64 bit executables.

 
SimplePortal 1.0.0 RC1 © 2008-2020