Thealexbarney / VGAudio

A library for encoding, decoding, and manipulating audio files from video games.
MIT License
219 stars 37 forks source link

Something's wrong with the "batch" option... #94

Closed RetingencyPlan closed 6 years ago

RetingencyPlan commented 6 years ago

so, just for kicks i decided to encode some uncompressed PCM files into HCA with your tool using the --batch option. these are the parameters i used for this thing: VGAudioCli.exe --batch -i "E:\SONY\PS2\DARK_CHRONICLE\sound_jpn" -o "E:\SONY\PS2\DARK_CHRONICLE\[hca]sound_jpn" --out-format hca --bitrate 128000

however, for some insane reason the tool just crashes the moment it even does that. this is how it occurs: (as a net451-dependant app)

Unhandled Exception: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: MaxDegreeOfParallelism at System.Threading.Tasks.ParallelOptions.set_MaxDegreeOfParallelism(Int32 value) at VGAudio.Cli.Batch.BatchConvert(Options options) in D:/VGAudio/VGAudio.Cli/Batch.cs:line 24 at VGAudio.Cli.Converter.RunConverterCli(String[] args) in D:/VGAudio/VGAudio.Cli/Converter.cs:line 47 at VGAudio.Cli.VGAudioCli.Main(String[] args) in D:/VGAudio/VGAudio.Cli/VGAudioCli.cs:line 7

(as a standalone app)

Unhandled Exception: System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values. Parameter name: MaxDegreeOfParallelism at System.Threading.Tasks.ParallelOptions.set_MaxDegreeOfParallelism(Int32 value) at VGAudio.Cli.Batch.BatchConvert(Options options) at VGAudio.Cli.Converter.RunConverterCli(String[] args) at VGAudio.Cli.VGAudioCli.Main(String[] args)

below all that is a "progress bar" that's been left hanging only to disappear when the tool's been done crashing. the same thing even happens in reverse, such as when i wanted to "decode" some HCA files into WAV through this option alone.

this error might be just me at this point, but if anything it just made me wonder how the hell does this option even work at all? does it simply scan through all the input files so they can be encoded/decoded into these output files the user has set the folder into through said option, assuming all parameters necessary for encoding/decoded all of these files into the final result are all set by the user itself? or does it do anything more complex than that?

Thealexbarney commented 6 years ago

This is a bit of a wild guess, but how many cores are on the machine you're running this on?

The batch option is basically the same as the normal option, except it runs the operation on multiple files instead of one. It scans through the input folder and converts any files it finds.

Thealexbarney commented 6 years ago

Try this one. It'll work if you're on a single core machine. VGAudioCli.zip

RetingencyPlan commented 6 years ago

This is a bit of a wild guess, but how many cores are on the machine you're running this on?

i possess a single core at the moment. also, that build is apparently a "virus or potentially unwanted software" on my PC(FYI, the error code is 0x800700E1). which means i'm also unable to execute it. i wish i was joking.

Thealexbarney commented 6 years ago

This should make it through the virus scanner. VGAudioCli.zip

RetingencyPlan commented 6 years ago

okay, it's 100% functional now. at least during execution anyway. thanks.

Thealexbarney commented 6 years ago

Thanks for letting me know about the bug