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,308
Trophies
3
XP
12,105
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,297
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,308
Trophies
3
XP
12,105
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,297
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,297
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
  • ZeroT21 @ ZeroT21:
    mine cant even get on a simple flat carpet, totally wasted my money
  • ZeroT21 @ ZeroT21:
    only helps the cat do spins around the room
  • ZeroT21 @ ZeroT21:
    i have a mind putting the cat on dinner duty
  • K3Nv2 @ K3Nv2:
    I recommend getting a treadmill for cats
  • ZeroT21 @ ZeroT21:
    me cat probably wont ever use it, furrball aint ever home, always somewhere down the street, looking for females, even named it ''Chad''
  • K3Nv2 @ K3Nv2:
    I'm shocked a usb A port
  • ZeroT21 @ ZeroT21:
    @K3Nv2 don't seem much different from last year'
  • K3Nv2 @ K3Nv2:
    3gb ram Mali-G31 MP2 could be decent for ps1
  • K3Nv2 @ K3Nv2:
    @Psionic Roshambo, that gave me a MMI error
  • ZeroT21 @ ZeroT21:
    I'm just tired of all the useless windows updates that keeps bogging my pc down whenever i wanna use it, useless AI crap
  • ZeroT21 @ ZeroT21:
    MS advertising win10 as the last OS we'll ever need ,such horseshit
  • SylverReZ @ SylverReZ:
    @ZeroT21, Windows 11 is just horseshit in general.
  • SylverReZ @ SylverReZ:
    CoPilot is the new Bonzi Buddy, 20 years later after it was shutdown by several lawsuits.
  • K3Nv2 @ K3Nv2:
    You're gonna love it when they stop supporting win10
  • SylverReZ @ SylverReZ:
    @K3Nv2, I saw the announcement.
  • ZeroT21 @ ZeroT21:
    it's all just junk to me, i just wanna use my pc in peace, not to be told shit by some AI
  • SylverReZ @ SylverReZ:
    They said that they will also discontinue support for Windows 7, of which I thought they'd already done so.
  • K3Nv2 @ K3Nv2:
    Get use to Linux then
  • SylverReZ @ SylverReZ:
    Go with Linux Mint.
  • K3Nv2 @ K3Nv2:
    wget "Microsoft edge.exe"
  • ZeroT21 @ ZeroT21:
    I'm using linux mint on my other machine, works decent
  • SylverReZ @ SylverReZ:
    deltree c:\windows\system32\*.* :tpi:
    SylverReZ @ SylverReZ: deltree c:\windows\system32\*.* :tpi: