Author Topic: OpenVIII - an open-source Final Fantasy VIII engine implementation  (Read 4308 times)

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
For some reason the loop is not working correctly at least not on all the files... I'm 99% sure my code is correct but on '512 The Loser.ogg' it's obvious that STARTLOOP is being ignored. So it is looping the whole sound effect. So I look forward to ffmpeg.

<

Are you sure?  LOOPSTART should be absent when you don't want a loop.  LOOPSTART=0 will loop from start.

I just found the reason OpenAL is ignoring LOOPSTART and LOOPLENGTH. Monogame has a variable to set for LOOPSTART but it just doesn't do anything. Though if I set LOOPLENGTH it throws an exception. heh.
https://github.com/MonoGame/MonoGame/issues/5186



--edit--
there was a commit to attempt to fix. now I'm wondering if it's using openal. or if the commit is live in the version i'm using.
https://github.com/MonoGame/MonoGame/commit/b749c4568edd73fde7e25a4c829d759a8ff5db9d

--edit--
I think all opengl projects default to using openal for audio via these functions. The function where I set the LOOPSTART -> http://www.monogame.net/documentation/?page=M_Microsoft_Xna_Framework_Audio_SoundEffect__ctor
I'm done messing with this for now.  :P

--
just going to fiddle. I was thinking I might be able to do the ingame menus just need to learn how more of the things these classes work.
« Last Edit: 2019-03-13 17:10:55 by Sebanisu »

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
I started messing with ffmpeg last night. I found some src for the goal i think in c++.
Mainly just was trying to add audio to the video player you made to see how good it would work.
I am stuck on one line of the c++ that I can't seem to find the correct cast for one of the variables.
I don't know if the lines below this will work till I get this line functional.
code i'm referencing.
https://github.com/gavv/snippets/blob/master/decode_play/ffmpeg_decode.cpp
line i'm having trouble with.
Code: [Select]
       // convert input frame to output buffer
        int got_samples = swr_convert(
            swr_ctx,
            &buffer, out_samples,
            (const uint8_t **)frame->data, frame->nb_samples);
frame->data is the issue. it's throwing an error cannot cast byte_ptrArray8 to byte **.
I'm using ffmpeg.autogen from the NuGet. And the newest ffmpeg 32bit dlls.

Gonna take a break and watch some anime.

--- edit
Code: [Select]
#define AV_NUM_DATA_POINTERS   8
uint8_t * data [AV_NUM_DATA_POINTERS]// pointer to the picture/channel planes.
https://www.ffmpeg.org/doxygen/2.6/structAVFrame.html
https://www.ffmpeg.org/doxygen/3.0/frame_8h.html
if i were to make it in c#, i think it would look like
Code: [Select]
byte*[] data = new byte*[8]; so I did make one of those and copied that data one byte at a time to it. But then I couldn't make byte*[] into byte**;
*shugs*
------
I might of got past this part.. there is a extended_data variable. Which I think is the same thing but it's a byte** instead of the other.

So now it's just getting all this data into a form i can play it back.
----
PROGRESS!! :D sound at last!

Sound is playing but it's not in the correct format so it's sounding like garbage :P. So I just need to get the code working that converts the sound to 16bit pcm.

i might be celebrating too early after converting and it still sound bad i'll know :P
====
well I think I was just getting random garbage to play.
swr_convert is returing a -22 didn't notice it at first. I found the errorcode function and turns out that is invalid argument. So I don't think it likes extended data.
I sware i tried using fixed before... It still isn't working but i am sending data.
Code: [Select]
byte*[] a = frame->data;
                int frame_count=0;
                fixed (byte** b = a)
                {
                    frame_count = ffmpeg.swr_convert(swr, (byte**)&buffer, frame->nb_samples, b, frame->nb_samples);
                    if (frame_count < 0)
                        throw new Exception($"{frame_count} - {averror(frame_count)}");
                }
------
I got rid of that error finally. I guess I had a issue with my swr context. Or the channel_layout was 0. I changed both. :P
« Last Edit: 2019-03-15 02:26:30 by Sebanisu »

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
I guess we could ignore the last post now. I made a class to deal with ffmpeg stuff. It's using the newer API. I still need to finish audio. I redid the current video functionality that Aforge did, with color corrected I think. At least for me the video had Red and Blue switched. Some issues with linux that should be able to be worked out per the FFmpeg.Autogen github. So now I will go back to audio and try to get that going. After I look at some Java for a friend.

Audio should be a drop in the bucket now as the video code is known good. I just need to tell it give me the audio and tada, I hope.

I've committed everything locally. I think I need permission on Github to submit to you. It should probably go in it's own branch to prevent messing anything you are working on.

For fun: I added the squaresoft logo to the front of overture. The intro movie to new game.
« Last Edit: 2019-03-18 14:28:04 by Sebanisu »

Maki

  • Software hacker
  • Freak
  • *
  • Posts: 553
  • Karma: 110
  • Paranoid
    • View Profile
I've committed everything locally. I think I need permission on Github to submit to you. It should probably go in it's own branch to prevent messing anything you are working on.

You can fork the repository and create a pull request:
https://github.com/MaKiPL/OpenVIII/pulls

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
There a pull request :D

I just noticed there might a issue if RaW isn't installed. I forgot to check if the folder existed.
 I just did a commit to fix on my fork. Do I do another pull request or just wait till I've done more?

I'm gonna eat dinner. then mess with the ffmpeg audio some.

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
Okay Testing with eyes_on_me.wav is successful. Reads it without resample and with.

tested video.
So sound is working, as in is not distorted but it is ending prematurely

Maki

  • Software hacker
  • Freak
  • *
  • Posts: 553
  • Karma: 110
  • Paranoid
    • View Profile
Great job! I have merged the commits. Everything looks great. I'll make sure to add you as an collaborator soon

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
I feel like I'm missing something on this ffmpeg audio resampler. Decided to try posting to https://stackoverflow.com/questions/55250865/ffmpeg-swr-convert-audio-to-raw-16-bit-pcm-to-be-used-with-xna-soundeffect-au I haven't posted on stackoverflow since 2013. lol

I followed someone's code and made a audio converter but depending on what you asked it to make it would work or not. And I didn't know why. :P I was thinking if i could make it work it'd help with my issues over on this project. Like disc00_30h.avi to mp3 worked fine. But ogg skipped ahead every few seconds and wav does the same thing my code was doing-- plays 18 seconds and stops.

I'll keep fiddling. Maybe someone will have an answer on stackoverflow or I'll figure it out :P

Just fixed the code for the little audio converter so wav is working in that, after fixing that ogg is playing fine now too. I should be able to take parts of this and put them in my class and it work after that. Though this is setup to write the files to the drive and it uses the deprecated api.

I'm not sure I thought decoding and resampling would be good enough for playback. Maybe I do actually need to encode it.

I kinda wish we could do one frame of audio at a time like we do with video. I think it would work if we could queue up samples. Right now the approach I'm doing is process it all load it all into ram and play. This adds some lag to the start of video playback.
---
Did two tests with using the audio converter to take disc03_06h.avi to wav and s16le (signed 16 bit le pcm) both of those files played in sound effect. so I'll continue adding the encoder to the class.

---
update today. I got a partial success today. It's outputting wave files. But there's something wrong with them and sound effect will not load the files. I think it could be because I am mixing API's
per ffmpeg documentation the new api should not be used with old. So either I'm decoding the files incorrectly because this resample/encode code should be correct. Or it's not working because of the two apis conflicting. So i'm gonna do some more tests. using the code in a separate program that just only does this one thing update the code.

---
update
so I updated the audio converter app to the new api. I think the issue is my decoder code is faulty. I kinda rewrote that in the audio converter app when i updated the api. so back to porting code over. to the project. and hopefully the bugs go away. :P
« Last Edit: 2019-03-20 23:04:09 by Sebanisu »

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
Sounds kinda. Currently the code is messy. It writes a <filename>.pcm to your %temp% folder. Then reads it into MemoryStream->SoundEffect. And it plays. I did notice our fps counter might need tweaked. The intro movie video was about 10 or so seconds behind the audio. Now that I have code that works I can tweak it to remove the need for a file. I am thinking for the fps I can maybe store the current framenumber and total frames. Using that I can see if we are behind or ahead and adjust via some math.

---
Update sound is work 100% reads the raw audio right into the memory and plays it.
Fixed the sync issue. I made a function that starts a StopWatch right before playing the audio. Then before it draws the frame it checks for Correct frame or Ahead a frame. And added a frame skip bool that checks if the player is Behind. The stopwatch is reset when stopaudio is called.

Though somewhere in this unsafe code is memory leak(s). I been trying to track some of them down. I added right and left to the movie player in debug mode. So while a movie is playing I can switch to the next or prev movie. And I noticed the memory usage go up as I was holding down the arrow. to the point it would throw an exception around 1gb.
« Last Edit: 2019-03-21 16:47:17 by Sebanisu »

Yagami Light

  • Crazy poster
  • *
  • Posts: 102
  • Karma: 16
    • View Profile
I'd recommend increasing the movement speed on the world map segment, takes too long to explore.

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
I'd recommend increasing the movement speed on the world map segment, takes too long to explore.
Maybe I could add the plus and minus keys as a throttle.

Sent from my Pixel XL using Tapatalk


Maki

  • Software hacker
  • Freak
  • *
  • Posts: 553
  • Karma: 110
  • Paranoid
    • View Profile

Good news. We got the monsters more-or-less working:

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
I updated my fork to be current and saw monsters on the battle screen lol

I just did a small update to add speed controls per Yagami Light's request. For the FPS camera in worldmap and battlemap.

+,-,*

Yagami Light

  • Crazy poster
  • *
  • Posts: 102
  • Karma: 16
    • View Profile
Monsters looks so cool, I downloaded the new version but I get exception skipping to main menu

System.BadImageFormatException: 'Could not load file or assembly 'DirectMidiNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.'

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
Monsters looks so cool, I downloaded the new version but I get exception skipping to main menu

System.BadImageFormatException: 'Could not load file or assembly 'DirectMidiNet, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. An attempt was made to load a program with an incorrect format.'
Make sure you are on 32 bit. Midi doesn't work on 64 bit
----------
I just updated, to add a flag for 64 bit so we can quarantine the code that doesn't work in 64bit. So shouldn't get the exception anymore, just won't have midi if not on 32 bit.
« Last Edit: 2019-04-01 16:09:04 by Sebanisu »

Yagami Light

  • Crazy poster
  • *
  • Posts: 102
  • Karma: 16
    • View Profile
Ok now I get exception error when I try enter any of the battle encounters

System.UnauthorizedAccessException: 'Access to the path 'D:\out.dat' is denied.'

Maki

  • Software hacker
  • Freak
  • *
  • Posts: 553
  • Karma: 110
  • Paranoid
    • View Profile
Ok now I get exception error when I try enter any of the battle encounters

System.UnauthorizedAccessException: 'Access to the path 'D:\out.dat' is denied.'

in debug_battleDat.cs delete line starting at 607:
Code: [Select]
#if _WINDOWS
            MakiExtended.DumpBuffer(buffer, "D:/out.dat");
#endif


though if you want to only play and watch the monsters I recommend grabbing this commit:
https://github.com/MaKiPL/OpenVIII/commit/c346872fa630d29a1c17a2af5ecb8be5616c3a41
as it's the one from GIF
« Last Edit: 2019-04-03 19:49:06 by Maki »

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
one thing you could do with that D:/out.dat is change it to use
Code: [Select]
Path.Combine(Path.GetTempPath(), "out.dat")
then your dat file would be at %temp%\out.dat and it wouldn't error if someone didn't have a D:
« Last Edit: 2019-04-03 23:45:19 by Sebanisu »

Maki

  • Software hacker
  • Freak
  • *
  • Posts: 553
  • Karma: 110
  • Paranoid
    • View Profile
finally!


and once again- big shoutout to amazing people contributing to project. You're doing extremely good job, I'm impressed!

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
Nice :D

hay

  • Crazy poster
  • *
  • Posts: 208
  • Karma: 1
  • If I had a buggy, I'd cross the southern desert
    • View Profile
    • The Gold Saucer Maintenance Crew
Cool idea.

LordUrQuan

  • Crazy poster
  • *
  • Posts: 140
  • Karma: 2
    • View Profile
Would love to toss in my hat as a test/build helper with the original CD release, just need a little hand getting started since it's been 20 years since I did any real programming (and back then, it was with ladder logic-driven SLC5 and Micrologix PLC devices), and since then I've only toyed around a little with Eclipse+Java and NiagaraAX.  The readme is pretty straight-forward, but I'm getting errors on my first build attempt.  Pointers obviously appreciated.

FF8DIR - I actually found this on line 141 of Memory.cs.  Hopefully
Code: [Select]
public static string FF8DIR => @"C:\Games\FF8\Data\"; is the correct path for a disk release that was installed to C:\Games\FF8?

In Ffcc.cs, I get "CS0211 Cannot take the address of the given expression" at line 1054, and "CS0459 Cannot take the address of a read-only local variable" at line 1232.

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
GameLocation class detects the location of the steam version of game. You are probably right to override it for disc version. maybe there is a registry entry we could use to detect the disc version as well.
Though line memory 141 should be:
public static string FF8DIR => @"C:\Games\FF8\Data\lang-en";

Everything goes from the lang-en directory when it's looking for stuff.
That is odd. the ffcc line 1232 is related to sound file and ogg music play. I'm surprised it got this far with the files missing. :P


Instead of touching memory.cs 141. goto WindowsGameLocationProvider.cs line 36. Add the disc version install directory to the list. it checks there before checking the registry for the steam version.

I updated the readme on the github to refer to new location of the game file arrays.
« Last Edit: 2019-05-01 18:45:21 by Sebanisu »

LordUrQuan

  • Crazy poster
  • *
  • Posts: 140
  • Karma: 2
    • View Profile
maybe there is a registry entry we could use to detect the disc version as well.
These keys were created during install on Win7 Pro x64:
Code: [Select]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Square Soft, Inc\FINAL FANTASY VIII\1.00]
"MidiOptions"=dword:00000000
"InstallOptions"=dword:000000ff
"SoundOptions"=dword:00000000
"DataDrive"="c:"
"MIDIGUID"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"SoundGUID"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"GraphicsGUID"=hex:00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"AppPath"="C:\\Games\\FF8"
"Graphics"=dword:00000000


[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\FF8.exe]
"Path"="C:\\Games\\FF8"
@="C:\\Games\\FF8\\FF8.exe"

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\App Paths\FF8.exe]
"Path"="C:\\Games\\FF8"
@="C:\\Games\\FF8\\FF8.exe"

Though line memory 141 should be:
public static string FF8DIR => @"C:\Games\FF8\Data\lang-en";

Everything goes from the lang-en directory when it's looking for stuff.
..\Data\lang-en doesn't exist on a CD install.  There's \Data\Music, \Data\Sound, and \Data\a_bunch_of_FI_FL_and_FS_files

That is odd. the ffcc line 1232 is related to sound file and ogg music play. I'm surprised it got this far with the files missing. :P
Well, I sussed from Kaldarasha that PC'00 and Steam were pretty different from each other, that's why I'm here :D

Instead of touching memory.cs 141. goto WindowsGameLocationProvider.cs line 36. Add the disc version install directory to the list. it checks there before checking the registry for the steam version.
Did that... new build errors, both in Module_main_menu_Loading.cs, "The parameter modifier 'ref' cannot be used with 'this'" at lines 16 and 22.

Edit:  Should probably make sure I'm using the right settings... target framework .NET 4.6, platform target x86, language version C#7.0
« Last Edit: 2019-05-02 02:26:52 by LordUrQuan »

Sebanisu

  • Cool newbie
  • *
  • Posts: 99
  • Karma: 5
    • View Profile
Edit:  Should probably make sure I'm using the right settings... target framework .NET 4.6, platform target x86, language version C#7.0
Looks correct. x86 is only required for the midi library though maki is working on replacing that and then it should run on both just fine. I usually test on x64 and the code for midi is just disabled.

Registry bits look easy to add. I went ahead and did it. Though I can't test it on here.

I think if there is no lang-en directory might need to compare steam version paths to your paths. On steam version all the FI FL and FS files are in the lang-en. Everything else is in data and the ff8 folder. Maybe we should be changing default path to data and check for lang-en if exists instead of what we are doing now. :P

if you want you could post a dir tree of your ff8 directory and we can compare :)

here is mine: in powershell/cmd i typed in tree /f > foo.txt
Code: [Select]
C:\Program Files (x86)\Steam\steamapps\common\FINAL FANTASY VIII
│   AF3DN.P
│   AF4DN.P
│   avcodec-53.dll
│   avformat-53.dll
│   avutil-51.dll
│   bass.dll
│   binkw32.dll
│   Chocobo_EN.exe
│   Chocobo_EN.exe.manifest
│   ddraw.dll
│   eax.dll
│   FF8.ico
│   FF8_EN.exe
│   FF8_EN.exe.manifest
│   FF8_Launcher.exe
│   firewall_entry.vdf
│   lang.dat
│   libeay32.dll
│   libssl32.dll
│   manual.pdf
│   phonon4.dll
│   QtCore4.dll
│   QtGui4.dll
│   QtNetwork4.dll
│   QtWebKit4.dll
│   QtXml4.dll
│   QtXmlPatterns4.dll
│   ssleay32.dll
│   steam_api.dll
│   strings.dat
│   
├───Data
│   │   res.dat
│   │   
│   ├───disk
│   │       Disk1
│   │       Disk2
│   │       Disk3
│   │       Disk4
│   │       
│   ├───lang-en
│   │   │   battle.fi
│   │   │   battle.fl
│   │   │   battle.fs
│   │   │   field.fi
│   │   │   field.fl
│   │   │   field.fs
│   │   │   magic.fi
│   │   │   magic.fl
│   │   │   magic.fs
│   │   │   main.fi
│   │   │   main.fl
│   │   │   main.fs
│   │   │   menu.fi
│   │   │   menu.fl
│   │   │   menu.fs
│   │   │   world.fi
│   │   │   world.fl
│   │   │   world.fs
│   │   │   
│   │   └───movies
│   │           disc03_05h.avi
│   │           
│   ├───movies
│   │       disc00_00.cam
│   │       disc00_00h.avi
│   │       disc00_01.cam
│   │       disc00_01h.avi
│   │       disc00_02.cam
│   │       disc00_02h.avi
│   │       disc00_03.cam
│   │       disc00_03h.avi
│   │       disc00_04.cam
│   │       disc00_04h.avi
│   │       disc00_05.cam
│   │       disc00_05h.avi
│   │       disc00_06.cam
│   │       disc00_06h.avi
│   │       disc00_07.cam
│   │       disc00_07h.avi
│   │       disc00_08.cam
│   │       disc00_08h.avi
│   │       disc00_09.cam
│   │       disc00_09h.avi
│   │       disc00_10.cam
│   │       disc00_10h.avi
│   │       disc00_11.cam
│   │       disc00_11h.avi
│   │       disc00_12.cam
│   │       disc00_12h.avi
│   │       disc00_13.cam
│   │       disc00_13h.avi
│   │       disc00_14.cam
│   │       disc00_14h.avi
│   │       disc00_15.cam
│   │       disc00_15h.avi
│   │       disc00_16.cam
│   │       disc00_16h.avi
│   │       disc00_17.cam
│   │       disc00_17h.avi
│   │       disc00_18.cam
│   │       disc00_18h.avi
│   │       disc00_19.cam
│   │       disc00_19h.avi
│   │       disc00_20.cam
│   │       disc00_20h.avi
│   │       disc00_21.cam
│   │       disc00_21h.avi
│   │       disc00_22.cam
│   │       disc00_22h.avi
│   │       disc00_23.cam
│   │       disc00_23h.avi
│   │       disc00_24.cam
│   │       disc00_24h.avi
│   │       disc00_25.cam
│   │       disc00_25h.avi
│   │       disc00_26.cam
│   │       disc00_26h.avi
│   │       disc00_27.cam
│   │       disc00_27h.avi
│   │       disc00_28.cam
│   │       disc00_28h.avi
│   │       disc00_29.cam
│   │       disc00_29h.avi
│   │       disc00_30.cam
│   │       disc00_30h.avi
│   │       disc01_00.cam
│   │       disc01_00h.avi
│   │       disc01_01.cam
│   │       disc01_01h.avi
│   │       disc01_02.cam
│   │       disc01_02h.avi
│   │       disc01_03.cam
│   │       disc01_03h.avi
│   │       disc01_04.cam
│   │       disc01_04h.avi
│   │       disc01_05.cam
│   │       disc01_05h.avi
│   │       disc01_06.cam
│   │       disc01_06h.avi
│   │       disc01_07.cam
│   │       disc01_07h.avi
│   │       disc01_08.cam
│   │       disc01_08h.avi
│   │       disc01_09.cam
│   │       disc01_09h.avi
│   │       disc01_10.cam
│   │       disc01_10h.avi
│   │       disc01_11.cam
│   │       disc01_11h.avi
│   │       disc01_12.cam
│   │       disc01_12h.avi
│   │       disc01_13.cam
│   │       disc01_13h.avi
│   │       disc01_14.cam
│   │       disc01_14h.avi
│   │       disc01_15.cam
│   │       disc01_15h.avi
│   │       disc01_16.cam
│   │       disc01_16h.avi
│   │       disc01_17.cam
│   │       disc01_17h.avi
│   │       disc01_18.cam
│   │       disc01_18h.avi
│   │       disc01_19.cam
│   │       disc01_19h.avi
│   │       disc01_20.cam
│   │       disc01_20h.avi
│   │       disc01_21.cam
│   │       disc01_21h.avi
│   │       disc01_22.cam
│   │       disc01_22h.avi
│   │       disc01_23.cam
│   │       disc01_23h.avi
│   │       disc01_24.cam
│   │       disc01_24h.avi
│   │       disc01_25.cam
│   │       disc01_25h.avi
│   │       disc01_26.cam
│   │       disc01_26h.avi
│   │       disc01_27.cam
│   │       disc01_27h.avi
│   │       disc01_28.cam
│   │       disc01_28h.avi
│   │       disc01_29.cam
│   │       disc01_29h.avi
│   │       disc01_30.cam
│   │       disc01_30h.avi
│   │       disc01_31.cam
│   │       disc01_31h.avi
│   │       disc01_32.cam
│   │       disc01_32h.avi
│   │       disc01_33.cam
│   │       disc01_33h.avi
│   │       disc02_00.cam
│   │       disc02_00h.avi
│   │       disc02_01.cam
│   │       disc02_01h.avi
│   │       disc02_02.cam
│   │       disc02_02h.avi
│   │       disc02_03.cam
│   │       disc02_03h.avi
│   │       disc02_04.cam
│   │       disc02_04h.avi
│   │       disc02_05.cam
│   │       disc02_05h.avi
│   │       disc02_06.cam
│   │       disc02_06h.avi
│   │       disc02_07.cam
│   │       disc02_07h.avi
│   │       disc02_08.cam
│   │       disc02_08h.avi
│   │       disc02_09.cam
│   │       disc02_09h.avi
│   │       disc02_10.cam
│   │       disc02_10h.avi
│   │       disc02_11.cam
│   │       disc02_11h.avi
│   │       disc02_12.cam
│   │       disc02_12h.avi
│   │       disc02_13.cam
│   │       disc02_13h.avi
│   │       disc02_14.cam
│   │       disc02_14h.avi
│   │       disc02_15.cam
│   │       disc02_15h.avi
│   │       disc02_16.cam
│   │       disc02_16h.avi
│   │       disc02_17.cam
│   │       disc02_17h.avi
│   │       disc02_18.cam
│   │       disc02_18h.avi
│   │       disc02_19.cam
│   │       disc02_19h.avi
│   │       disc02_20.cam
│   │       disc02_20h.avi
│   │       disc02_21.cam
│   │       disc02_21h.avi
│   │       disc02_22.cam
│   │       disc02_22h.avi
│   │       disc02_23.cam
│   │       disc02_23h.avi
│   │       disc02_24.cam
│   │       disc02_24h.avi
│   │       disc02_25.cam
│   │       disc02_25h.avi
│   │       disc02_26.cam
│   │       disc02_26h.avi
│   │       disc02_27.cam
│   │       disc02_27h.avi
│   │       disc02_28.cam
│   │       disc02_28h.avi
│   │       disc02_29.cam
│   │       disc02_29h.avi
│   │       disc02_30.cam
│   │       disc02_30h.avi
│   │       disc02_31.cam
│   │       disc02_31h.avi
│   │       disc03_00.cam
│   │       disc03_00h.avi
│   │       disc03_01.cam
│   │       disc03_01h.avi
│   │       disc03_02.cam
│   │       disc03_02h.avi
│   │       disc03_03.cam
│   │       disc03_03h.avi
│   │       disc03_04.cam
│   │       disc03_04h.avi
│   │       disc03_05.cam
│   │       disc03_06.cam
│   │       disc03_06h.avi
│   │       disc04_00h.avi
│   │       
│   ├───Music
│   │   │   eyes_on_me.wav
│   │   │   eyes_on_me_BACKUP.wav
│   │   │   
│   │   ├───dmusic
│   │   │       000s-lose.sgt
│   │   │       001s-win.sgt
│   │   │       001xg-win.sgt
│   │   │       004s-run.sgt
│   │   │       005s-battle.sgt
│   │   │       005xg-Battle.sgt
│   │   │       007s-end.sgt
│   │   │       008s-antena.sgt
│   │   │       009s-waiting.sgt
│   │   │       012s-kani.sgt
│   │   │       013s-battle2.sgt
│   │   │       013xg-Battle2.sgt
│   │   │       014s-Parade2.sgt
│   │   │       015s-fuan2.sgt
│   │   │       016s-march2.sgt
│   │   │       017s-joriku.sgt
│   │   │       018s-julia.sgt
│   │   │       019s-waltz.sgt
│   │   │       020s-friend.sgt
│   │   │       021s-dangeon.sgt
│   │   │       022s-pianosol.sgt
│   │   │       023s-Parade.sgt
│   │   │       024s-march1.sgt
│   │   │       025s-himitsu.sgt
│   │   │       026s-garden.sgt
│   │   │       027s-fuan.sgt
│   │   │       028s-polka2.sgt
│   │   │       029s-anthem.sgt
│   │   │       035s-m7f5.sgt
│   │   │       036s-majo.sgt
│   │   │       041s-field.sgt
│   │   │       042s-guitar.sgt
│   │   │       043a-concert-tap.sgt
│   │   │       043b-concert-flute.sgt
│   │   │       043c-concert-fiddle.sgt
│   │   │       043d-concert-aguitar.sgt
│   │   │       043e-concert-sax.sgt
│   │   │       043f-concert-piano.sgt
│   │   │       043g-concert-eguitar.sgt
│   │   │       043h-concert-ebass.sgt
│   │   │       046s-resistan.sgt
│   │   │       047s-kaiso.sgt
│   │   │       047xg-Kaiso.sgt
│   │   │       048s-horizon.sgt
│   │   │       049s-master.sgt
│   │   │       051s-rinoa.sgt
│   │   │       052s-travia.sgt
│   │   │       053s-antena2.sgt
│   │   │       054s-truth.sgt
│   │   │       055s-jail.sgt
│   │   │       056s-gargarde.sgt
│   │   │       057s-timber.sgt
│   │   │       058s-garbadia.sgt
│   │   │       059s-pinch.sgt
│   │   │       060s-scene1.sgt
│   │   │       061s-pub.sgt
│   │   │       062s-bat3.sgt
│   │   │       063s-stage.sgt
│   │   │       064s-choco.sgt
│   │   │       065s-white.sgt
│   │   │       066s-majomv.sgt
│   │   │       067s-musho.sgt
│   │   │       068s-missile.sgt
│   │   │       069s-enzetu.sgt
│   │   │       070s-card.sgt
│   │   │       071s-gomon.sgt
│   │   │       072s-soto.sgt
│   │   │       073s-majobat.sgt
│   │   │       075s-Gar3.sgt
│   │   │       076s-Bossbat2.sgt
│   │   │       077s-lasdun.sgt
│   │   │       078s-gafly.sgt
│   │   │       079s-demo.sgt
│   │   │       080s-spy.sgt
│   │   │       081s-mods.sgt
│   │   │       082s-salt.sgt
│   │   │       083s-alien.sgt
│   │   │       084s-sekichu.sgt
│   │   │       085s-esta.sgt
│   │   │       086s-moonmv.sgt
│   │   │       089s-hikutei.sgt
│   │   │       090s-bossbat1.sgt
│   │   │       091s-rag1.sgt
│   │   │       092s-rag2.sgt
│   │   │       093s-lasboss.sgt
│   │   │       096s-keisho.sgt
│   │   │       097s-ashuku.sgt
│   │   │       099-joriku2.sgt
│   │   │       chocoworld.sgt
│   │   │       FF8.dls
│   │   │       XGdefault.sgt
│   │   │       Xgon.sgt
│   │   │       
│   │   │       
│   │   └───stream
│   │           003-combat.wav
│   │           006-funsui.wav
│   │           010-ante.wav
│   │           011-wind.wav
│   │           030-Flangchorus.wav
│   │           031-dubchorus.wav
│   │           032-Solochorus.wav
│   │           033-Femalechorus.wav
│   │           034-chorus.wav
│   │           037-reet.wav
│   │           038-soyo.wav
│   │           039-rouka.wav
│   │           040-night.wav
│   │           044-sea.wav
│   │           074-train.wav
│   │           086-mdmotor.wav
│   │           087-mdmotor.wav
│   │           094-laswhite.wav
│   │           095-lasbl.wav
│   │           
│   └───Sound
│           audio.dat
│           audio.fmt
│           
├───licenses
│       ffmpeg_license_LGPLv2.1.txt
│       libogg_license_BSD.txt
│       libvorbis_license_BSD.txt
│       libvpx_license_BSD.txt
│       Qt_license_LGPLv2.1.txt
│       
├───plugins
│   ├───designer
│   │       qwebview.dll
│   │       
│   └───imageformats
│           qgif4.dll
│           qico4.dll
│           qjpeg4.dll
│           qmng4.dll
│           qsvg4.dll
│           qtiff4.dll
│           
└───shaders
        pixel.hlsl
        vert.hlsl

I think first step is making sure it's finding all the required files. Might need to debug line by line in ffcc as i couldn't cause the error to happen over here. Or can just comment out the sound playback parts till we figure out the issue.