.ogg soundtrack imports don't work when game is under an "irregular" folder path.

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
SGResponse
Posts: 3
Joined: Tue May 03, 2022 1:01 pm

.ogg soundtrack imports don't work when game is under an "irregular" folder path.

Post by SGResponse »

General issue:

When sound files are put into the ../StreamingAssets/Sound folder, the modding engine itself recognizes these alternate soundtrack files and attempts to play them. However there are cases when FMOD::Sound is not capable to generate a sound stream from the file - this occurs when some special characters (like "+" for example) are introduced into the path that contains the whole game.

Specs:
  • OS: Windows 7 Pro SP1
  • DFU: version 0.13.5 (release)
(Full log file which has full specs attached)

To reproduce:

Establishing a control sample:
  • Place Daggerfall Unity into a sensible path (example: E:\DFUTEST\v0.13.5 )
  • Create E:\DFUTEST\v0.13.5\DaggerfallUnity_Data\StreamingAssets\Sound\song_5strong.ogg as a legitimate Ogg Vorbis file.
  • Run Daggerfall Unity and get to the menu screen. Check if the ogg file plays properly instead of the midi. Control sample established.
Reproducing actual issue:
  • Rename the containing folder to E:\DFUTEST+\v0.13.5
  • Run Daggerfall Unity and get to the menu screen. Notice that the file does not play. In fact - there's no music at all.
The expected result was that the file would play just fine, as everything else SEEMS to be working, so the game and even the sound file discovery module work with the non-standard path just fine. But FMOD::Sound does not work with that path and produces the following log multiple times (at least 30 repeats):

Code: Select all

Error: Cannot create FMOD::Sound instance for clip "" (FMOD error: End of file unexpectedly reached while trying to read essential data (truncated data?). ) 
(Filename:  Line: 1202)
Additional fearmongering:

While trivial to fix, the issue itself is hard to detect and debug on the user's side:
  • There is no indication in the installation guide that special characters in the path might break some feature of the game. (at least to my limited knowledge)
  • The list of special fmod-breaking characters is not defined (I know that "+" breaks things and "." doesn't)
  • It is unknown if only the soundtrack stream creation is affected. Many other streaming assets might also be broken.
  • Path itself is valid and DFU is just fine using it and even discovering streaming assets within - thus there is no indication from the game itself that something is royally eff'd.
Attachments
Player.zip
(4.96 KiB) Downloaded 53 times

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: .ogg soundtrack imports don't work when game is under an "irregular" folder path.

Post by Interkarma »

This is happening inside Unity engine, not DFU. You would need to raise on Unity's tracker and hope they fix it in a future engine version. Looks to have been around for a while too - see last reply in below.

https://answers.unity.com/questions/129 ... -fmod.html

Until then, best use sensible path names in your environment.

User avatar
SGResponse
Posts: 3
Joined: Tue May 03, 2022 1:01 pm

Re: .ogg soundtrack imports don't work when game is under an "irregular" folder path.

Post by SGResponse »

Might want to point that one out in the installation guide then :)

User avatar
Interkarma
Posts: 7247
Joined: Sun Mar 22, 2015 1:51 am

Re: .ogg soundtrack imports don't work when game is under an "irregular" folder path.

Post by Interkarma »

No, I don't agree that is necessary. But I am happy you were able to solve this specific problem in your environment. If anyone else encounters this, we'll refer them to your info here. Cheers!

Post Reply