ROM Hack Discussion Sakuna of Rice and Ruin - trying to make an audio patch for the highly compressed dialogue audio

whateverg1012

Well-Known Member
OP
Member
Joined
Sep 23, 2016
Messages
573
Trophies
0
XP
1,426
Country
United States
Anyone who has played Sakuna may have noticed the bad quality of the dialogue audio on the Switch version:

Code:
Switch (4:46):

https://youtu.be/n0dPzqYK3eY?t=286

PC (4:29):

https://youtu.be/gB0e0UB16rs?t=270

I am trying to make a layeredfs patch to fix the dialogue. The PC and Switch file directory seem interchangeable, with the PC files in dataWin/ and the Switch files in dataSwitch/.
The files of interest located in these folders seem to be AudioCommon.arc, AudioEventVoice_en.arc, AudioEventVoice_jp.arc, and AudioStream.arc.

However, when placing the PC audio files as a layeredfs patch into [titleid]/romfs/dataSwitch/, the Switch version ends up having no audio at all.

Any ideas?
 
Last edited by whateverg1012,

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,299
Trophies
3
XP
12,085
Country
Poland
Some audio middleware is using random filename patterns or they are using different codecs (on Switch to have 5.1 you need to use PCM compliant files like WAV). You need to open those arcs files and check filenames + codecs in PC and Switch.
 
  • Like
Reactions: whateverg1012

whateverg1012

Well-Known Member
OP
Member
Joined
Sep 23, 2016
Messages
573
Trophies
0
XP
1,426
Country
United States
Some audio middleware is using random filename patterns or they are using different codecs (on Switch to have 5.1 you need to use PCM compliant files like WAV). You need to open those arcs files and check filenames + codecs in PC and Switch.

That makes sense, any idea how to uncompress and recompress these .arc files? Unable to find tools online that work.

Was thinking this would be a simple job, but if it requires using a hexeditor it may be beyond my ability...
 
Last edited by whateverg1012,

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,291
Country
Chile
SakunaTool works for me in both (PC-Switch) AudioEventVoice_Jp.arc files but currently there's no way to pack them back, also the Switch version points to a .nsopus file while the PC version points to a .opus file.

This is what I got with the PC .arc file
upload_2020-11-23_14-3-12.png

Ogg encode 48 bitrate sound file.

On Switch side the header is garbled:
upload_2020-11-23_14-4-58.png


I tried to rename the .opus files from PC version to .nsopus but I got no voice audio, other audio plays fine though

Funny enough the PC version audio files are slightly smaller in size than Switch version, but they sound better :P, so it wasn't a problem with the overall size of the game to fit in a gamecard they just encoded it in lower bitrate for some reason.
 
Last edited by cucholix,
  • Like
Reactions: whateverg1012

masagrator

The patches guy
Developer
Joined
Oct 14, 2018
Messages
6,299
Trophies
3
XP
12,085
Country
Poland
@cucholix pulled me to check this and my theory is completely different:




So only way to get PC audio files running on Switch is to have SDK installed, use opus encoder included in SDK with much higher bitrate to convert PC audio files and replace data with hex editor in each one nsopus. On pc opus encoders limits max bitrate to 256 Kbps, so probably on switch you won't get higher.

PC and Switch versions may are using the same bitrate, just differences in page aligning (heavily used on Switch 0x80 vs non existent on PC) give slightly different filesizes.
 
Last edited by masagrator,
  • Like
Reactions: whateverg1012

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,291
Country
Chile
Almost 2 years later :P with masagrator help and his tools, I managed to convert PC audio files into high quality sound voice over files, the catch is that I need to test it in the final boss, I need to be sure if it works there as it has problems with one sequence in the game, the sequence is a clip that autoplays without pressing the A button, the final boss clip autoplays too, so there's a chance it doesn't work correctly thus would need make some other changes.
 

cucholix

00000780 00000438
Member
Joined
Jan 17, 2017
Messages
3,246
Trophies
1
Age
44
XP
6,291
Country
Chile
Ok, fixed the video skips manually editing the sound file headers, now no sequence should have problems, the whole japanese voice acting is high quality now :)
 
  • Like
Reactions: one-piece

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • BakerMan @ BakerMan:
    IT'S LIKE THAT ALMOST EVERY FUCKING METEOR SHOWER TOO
  • BigOnYa @ BigOnYa:
    You need to setup a time lapse camera, be neat
  • BigOnYa @ BigOnYa:
    I actually use a pic of it on my pc desktop cause its cool looking
  • Xdqwerty @ Xdqwerty:
    Apparently the pro versión of pizza boy is back aswell
  • Xdqwerty @ Xdqwerty:
    Gonna download the update
  • Xdqwerty @ Xdqwerty:
    Only 2 antiviruses detected the APK as a virus on virustotal so it Must be safe
  • Xdqwerty @ Xdqwerty:
    Cuz false positive
  • Xdqwerty @ Xdqwerty:
    Wait
  • Xdqwerty @ Xdqwerty:
    Eh nvm
  • BakerMan @ BakerMan:
    sadly, the clouds are setting in now

    hey BigOnYa the clouds are coming from the south, maybe check again
  • Xdqwerty @ Xdqwerty:
    Good night it's 11 pm
  • BakerMan @ BakerMan:
    night
  • BigOnYa @ BigOnYa:
    @BakerMan Nuh I'm in for the night playing Fallout 4, ill look tomorrow night
  • BigOnYa @ BigOnYa:
    Ok had let dog out, and yea still can't see it, oh well. Maybe tom night.
  • K3Nv2 @ K3Nv2:
    Ballocks these drives aren't allowing raid
  • BigOnYa @ BigOnYa:
    That sucks, well you will get double the space then atleast.
  • K3Nv2 @ K3Nv2:
    @Sicklyboy needs to come back
  • BigOnYa @ BigOnYa:
    Did you try Raid 10?
  • K3Nv2 @ K3Nv2:
    I did raid69
  • K3Nv2 @ K3Nv2:
    The physical disk keeps disabling in bios
  • BakerMan @ BakerMan:
    hey ken did you see the aurora tonight?
  • BakerMan @ BakerMan:
    also sorry it was too cloudy, that sucks
  • SylverReZ @ SylverReZ:
    @K3Nv2, This chat is sponsored by Raid Shadow Legends.
  • K3Nv2 @ K3Nv2:
    So I guess raid0 doesn't allow mismatched storage oh well
    K3Nv2 @ K3Nv2: So I guess raid0 doesn't allow mismatched storage oh well