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,347
Trophies
3
XP
12,212
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,314
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,347
Trophies
3
XP
12,212
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,314
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,314
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
  • No one is chatting at the moment.
  • Psionic Roshambo @ Psionic Roshambo:
    My links could be wild life in nature or wild life in unnatural circumstances lol
    +1
  • K3Nv2 @ K3Nv2:
    Your links are the Ukraine Russia war
  • K3Nv2 @ K3Nv2:
    Biden signed a income contract just so you can keep sending me the mutated things that you do
  • K3Nv2 @ K3Nv2:
    That just look right with food coloring liquid running down it
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Muhahahaha
  • SylverReZ @ SylverReZ:
    @Psionic Roshambo, Blue omelette
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    Lol Ken will never eat an omelette again lol
  • K3Nv2 @ K3Nv2:
    Actually ihops omlettes still hit haven't had one in forever
  • Psionic Roshambo @ Psionic Roshambo:
    The steak one is amazing
    +1
  • K3Nv2 @ K3Nv2:
    Damn near $20 so fuck them
    +1
  • BigOnYa @ BigOnYa:
    I second that, they are good. I always get the steak and add mushrooms to it also. But yea been awhile since had myself. I used to go there every morn for coffee and breakfast, meet with my work crew, but we all stop going, too expensive.
    +1
  • HiradeGirl @ HiradeGirl:
    I'm scarred for life.
  • HiradeGirl @ HiradeGirl:
    See you guys, I'll get lost for another month. Maybe the rest of the year.
    +2
  • K3Nv2 @ K3Nv2:
    See you tomorrow
    +2
  • BigOnYa @ BigOnYa:
    Peace. Take care, no more searching tonight. You gonna have nightmares.
    +2
  • SylverReZ @ SylverReZ:
    See you tomorrow.
    +1
  • NinStar @ NinStar:
    did she just vomit on the chat before leaving
  • NinStar @ NinStar:
    why are girls doing this nowadays? is this some weird way of showing dominance?
  • BigOnYa @ BigOnYa:
    Yea, I put her outside though, then cleaned it up.
  • K3Nv2 @ K3Nv2:
    Ah yes the unique power of girls vomiting on you
  • PandaPandel @ PandaPandel:
    im gonna puke
    duskfall @ duskfall: :rofl2: +2