ME3Tweaks / LegendaryExplorer

Editor toolset for Mass Effect Trilogy and Mass Effect Legendary Edition
https://me3tweaks.com
GNU General Public License v3.0
125 stars 27 forks source link

Bug: Soundplorer WPF failing to correctly import specific .wav audio files. #95

Closed ghost closed 5 years ago

ghost commented 5 years ago

Whereas Soundplorer's code will support .wav files in almost all cases, there seem to be exceptions.

If a .wav file is exported through some other software (in my case Mac's Logic Pro) other then Audacity, the file won't be playable through Soundplorer, even if the file in question is once again exported through Audacity with settings that Soundplorer's code definitely supports.

The file in question will be imported and will take up space in the AFC, but you will not be able to play it either in Soundplorer or in-game. If you attempt to import audio the old-fashioned way by converting it to .ogg using Audiokinetic's Wwise, Soundplorer will repeatedly show errors of this type, asking users to delete a certain folder, even if the folder is already deleted.

mg_code

To reproduce the .wav error:

  1. Open up any BioD_LOC_INT file
  2. Attempt to replace any audio with one of the files from the attachement. -> Kwunu.zip

Version: 3.1.2.14

However, this was present in 3.1.2.13 too.

Other information:

This seems to be an issue with the format. Before Soundplorer WPF came, if you tried to convert such a .wav file (e.g. from Logic) in Audiokinetic's Wwise, you'd get an error. You first had to re-export it using Audacity's settings, after which you could proceed as normal. However, in Soundplorer WPF's code, this does not help.

Mgamerz commented 5 years ago

Please post the full stack trace, as text.

Mgamerz commented 5 years ago

Output when importing these files from Wwise CLI is as follows:

Wwise | v2010.3.3 | Build no.3773 | (C) Audiokinetic Inc. 2006-2011. All rights reserved.

*** Loading Project ***

Initializing...
Loading Project...
Loading Work Unit: \Conversion Settings\Default Work Unit.wwu
Updating Project...
Finalizing...

*** Bank Generation ***

[Converting external sources...] Reading external sources file
[Converting external sources...] 
Warning 0   No Conversion Settings found for 'Volus 1.wav (External Source)'.  Using the Project Default Conversion Settings 'Default Conversion Settings'. 
[Volus 1.wav] Applying conversion settings...
[Volus 1.wav] Encoding Vorbis...

Looking at your files they are 44100Hz 32-bit stereo WAV files. As far as I am aware the Wwise version we use for ME3 does not support these tracks properly, I ran into this issue when I was doing some other audio work.

I took your volus 1 track and cut off one of the stereo tracks in audacity (turning it mono), and it worked. When I was doing my tracks, I had to drop them to 16-bit wav files for them to work. I am not 100% sure, but I remember looking up supported file types, and I had to batch convert all my 32-bit samples down to 16-bit.

Unfortunately there is no way to tell easily from CLI output as it does not include failure information, it just seems to encode the audio wrong, or at least in a way that is not parseable by ogg2wav.

ghost commented 5 years ago

It does work when it's mono/16-bit....in this case, I must've changed the settings in Audacity at some point, because I recall having to re-export all audio through Audacity to make it work with Audiokinetic's Wwise, for the purpose of manual conversion (pre-Soundplorer WPF)

In this case, manual conversion isn't necessary anymore, but I can still post the full stack trace if you'd like to fix the "folder deleting" error.

Mgamerz commented 5 years ago

The folder deleting error should have already been fixed before you opened this issue. I assume you are using older builds still? I believe it is caused by Wwise staying open for some reason.

ghost commented 5 years ago

As stated in the OP, I tried it in both .14 and .13.

Regardless, there's no reason to keep this issue open since a solution has been a found.