OnionUI / Onion

OS overhaul for Miyoo Mini and Mini+
https://onionui.github.io
GNU General Public License v3.0
3.47k stars 219 forks source link

ScummVM Standalone doesn't support all CD audio formats #1519

Open bmn001 opened 8 months ago

bmn001 commented 8 months ago

Checklist

Onions OS Version

4.3.0

Miyoo Firmware Version

202306282128

Provide a clear and concise description of the issue

TLDR: .flac and .m4a audio doesn't currently work in standalone ScummVM.

Per the ScummVM documentation, any games that shipped with CD audio tracks need to have those tracks ripped into one of four supported file formats: .mp3, .flac, .m4a, or .ogg.

The current standalone version of ScummVM included with Onion (2.9.0git) seems to only support two of these file formats: .ogg and .mp3. When audio is encoded in either format, games work fine.

However, if you attempt to launch a game with .flac audio tracks, the game will launch but you'll see this error: "This game has audio tracks on its CD. These tracks need to be ripped from the CD using an appropriate CD audio extracting tool in order to listen to the game's music. See the documentation (CD audio) for details." The game will be playable, but with no CD audio.

If you attempt to launch a game with .m4a audio tracks, the game will launch and you won't receive the error, but it will also not contain CD audio.

Steps to Reproduce

With .flac, you'll get an error message and no CD audio playback. With .m4a you won't get an error message, but you also won't have CD audio playback.

Provide any additional context or information that may help us investigate your issue

The ScummVM libretro core (2.7.0git) works as expected and supports all four file formats. This bug report only impacts the standalone/expert version.

XK9274 commented 7 months ago

Hi,

Can you try this build please: https://www.dropbox.com/scl/fi/1wd9ygx5mmv6scv54f0ch/scummvm.7z?rlkey=kwlf5do1ou9rf4t91lcuc92d7&dl=0

If you have issues, remove your config file and let it regen (in Saves/CurrentProfile)

I've added:

FLAC FAAD A52

I see no options for m4a, though FAAD should do it no? If there's other options that need enabling please do comment and we'll see what we can do about expanding ScummVM

Just~ FYI - GIF is compiled but does not get picked up, i'll check this another day.

And compiled with --enable-mt32emu

This is a synced fork of scummvm so should be up to date with the master branch. If you find bugs please let us know - If not i'll move to PR.

As for your other issue here: https://github.com/OnionUI/Onion/issues/1510 - I'm not getting into the dependency hole that is FluidSynth and Glib2 atm

Other

@Leemann07 - Please can you check if the missing commits are in this build from our previous conversations?

Compile log

``` > ./configure \ > --enable-ext-neon \ > --host=miyoomini \ > --build=$BUILD \ > --prefix=$FIN_BIN_DIR \ > --enable-all-engines \ > --enable-release \ > --enable-plugins \ > --with-ogg-prefix=/mnt/SDCARD/App/scummvm/ \ > --with-jpeg-prefix=/mnt/SDCARD/App/scummvm/ \ > --with-png-prefix=/mnt/SDCARD/App/scummvm/ \ > --with-theoradec-prefix=/mnt/SDCARD/App/scummvm/ \ -with-mpeg2-pref> --with-mpeg2-prefix=/mnt/SDCARD/App/scummvm/ \ > --with-vorbis-prefix=/mnt/SDCARD/App/scummvm \ > --with-mad-prefix=/mnt/SDCARD/App/scummvm/ \ -with-fr> --with-fribidi-prefix=/mnt/SDCARD/App/scummvm/ \ > --with-gif-prefix=/mnt/SDCARD/App/scummvm/ \ > --with-freetype2-prefix=/opt/miyoomini-toolchain/arm-linux-gnueabihf/libc/usr/bin/ \ > --with-flac-prefix=/mnt/SDCARD/App/scummvm/ \ ith-faad-prefix=> --with-faad-prefix=/mnt/SDCARD/App/scummvm/ \ > --with-a52-prefix=/mnt/SDCARD/App/scummvm/ \ > --enable-mt32emu \ > --disable-theoradec e -j$(( $(nproc) - 2 )) all sd-root sd-zip Running ScummVM configure... Looking for C++ compiler... arm-linux-gnueabihf-g++ Checking if compiler supports C++11... yes Checking for compiler version... GCC 8.3.0, ok Checking if C++11 initializer list is available... yes Checking if C++11 std::nullptr_t is available... yes Checking if C++11 alignas and alignof keywords are available... yes Using LLD linker... no Using Mold linker... no Checking for whether C++ compiler accepts -Wglobal-constructors... no Checking for whether C++ compiler accepts -Wno-undefined-var-template... no Checking for whether C++ compiler accepts -Wno-pragma-pack... no Checking for whether C++ compiler accepts -Wno-address-of-packed-member... no Checking endianness... little Checking 64-bitness... no Type with 1 byte... char Type with 2 bytes... short Type with 4 bytes... int Type with 8 bytes... long long Alignment required... yes Checking host CPU architecture... ARM Checking hosttype... linux Cross-compiling to miyoomini Checking for pkg-config... yes WARNING: When cross-compiling PKG_CONFIG_LIBDIR must be set to the location of the .pc files for the target Looking for sdl-config... /opt/miyoomini-toolchain/bin/../arm-linux-gnueabihf/libc/usr/bin/sdl-config Checking for SDL... yes Checking for SDL_Net... no Checks for ENet... Checking for sendmsg... yes Checking for recvmsg... yes Optional checks for ENet... Checking for getaddrinfo... yes Checking for getnameinfo... yes Checking for gethostbyaddr_r... yes Checking for gethostbyname_r... yes Checking for poll... yes Checking for fcntl... yes Checking for inet_pton... yes Checking for inet_ntop... yes Checking for msghdr.msg_flags... yes Checking for socklen_t... yes Checking if host is POSIX compliant... yes Checking if posix_spawn is supported... yes Checking if fseeko with 64-bit off_t is supported... yes (adding -D_FILE_OFFSET_BITS=64) Checking whether to have a verbose build... no Checking whether building plugins was requested... yes Checking whether building plugins is supported... yes Checking if detection features building statically... yes Checking if building detection features for all engines... yes Checking for Ogg... yes Checking for TTS libraries... no Checking for Vorbis... yes Checking for Tremor... no (Vorbis/Tremor support is mutually exclusive) Checking for OPL2LPT... no Checking for RetroWave OPL3... no Checking for FLAC >= 1.0.1... yes Checking for MAD... yes Checking for ALSA >= 0.9... no Checking for libjpeg >= v6b... yes Checking for PNG >= 1.2.8... yes Checking for GIF >= 5.0.0... no Checking for libtheoradec >= 1.0... no Checking for libvpx >= 1.6... no Checking for libfaad... yes Checking for SEQ MIDI... no Checking for sndio... no Checking for TiMidity... no Checking for zlib... yes Checking for libmpeg2 >= 0.4.0... yes Checking for liba52... yes Looking for curl-config... none found! Checking for libcurl... no Checking for libopenmpt... no Looking for mikmod-config... none found! Checking for libmikmod... no Cloud integration... no Checking for FluidSynth... no Checking for FluidLite... no Checking for Sonivox... no Checking for readline... skipping (text console disabled) Checking for libunity... no Checking for gtk... no Checking for FreeType2... yes Checking for OpenGL... no Checking for OpenGL for game... no Checking for Linux CD-ROM... yes Checking for FriBidi... no Test C++11 compatibility during compilation... no Checking for Discord RPC... no Checking for ImGui... no (requires OpenGL) Building translation support... yes (with runtime language detection) Building taskbar integration support... no Building system dialogs support... no Building text-to-speech support... no Building TinyGL support... yes Building Bink video support... yes Building updates support... no Enabling Address Sanitizer... no Enabling Thread Sanitizer... no Enabling Undefined Behavior Sanitizer... no Enabling x86/amd64 SSE2... no Enabling x86/amd64 AVX2... no Enabling ARM NEON... yes Backend... miyoo (SDL 1.2.15), 16bit color, high resolution, TinyGL, savegame timestamp, HQ and Edge scalers, aspect ratio correction, Lua, virtual keyboard, ENet WARNING: Disabling engine Hpl1 because the following dependencies are unmet: GIF OpenGL with shaders WARNING: Disabling engine Tetraedge because the following dependencies are unmet: libtheoradec WARNING: Disabling engine Thimbleweed Park because the following dependencies are unmet: OpenGL with shaders WARNING: Disabling engine The Watchmaker because the following dependencies are unmet: OpenGL (classic) Engines (builtin): SCUMM [all games] Access ADL AGI AGOS [all games] Adventure Game Studio Sanitarium Lord Avalot d'Argent Beavis and Butthead in Virtual Stupidity Blade Runner The Journeyman Project 2: Buried in Time CGE CGE2 Chamber Chewy: Esc from F5 Cinematique evo 1 Magic Composer Crab Cinematique evo 2 Lost Eden Cryo Omni3D games [all games] Macromedia Director Dungeon Master Dragon History Blazing Dragons Drascula: The Vampire Strikes Back Dreamweb Escape From Hell Freescape Glk Interactive Fiction games UFOs Gobli*ns The Griffon Legend Grim [all games] Groovie [all games] Hades Challenge Hyperspace Delivery Boy! Hopkins FBI Hugo Trilogy Hypnotix Inc. In Cold Blood Illusions Engine The Immortal Kingdom: The Far Reaches Kyra [all games] Labyrinth of Time The Last Express Lilliput Lure of the Temptress M4 MacVenture MADE MADS [all games] Might and Magic [all games] Mohawk [all games] Mortevielle mTropolis Mutation of JB Myst 3 Nancy Drew Neverhood Nikita Game Interface Parallaction The Journeyman Project: Pegasus Prime Red Comrades Pink Panther Playground 3d: the testing and playground environment for 3d renderers Plumbers Don't Wear Ties The Prince and The Coward Private Eye Flight of the Amazon Queen SAGA [all games] SAGA2 SCI [all games] The Lost Files of Sherlock Holmes Beneath a Steel Sky Sludge The Longest Journey Star Trek 25th Anniversary/Judgment Rites Mission Supernova Broken Sword Broken Sword II Broken Sword 2.5 Teen Agent TestBed: the Testing framework Tinsel Starship Titanic 3 Skulls of the Toltecs Tony Tough and the Night of Roasted Moths Toonstruck Touche: The Adventures of the Fifth Musketeer Trecision Adventure Module TsAGE Bud Tucker in Double Trouble Little Big Adventure Ultima [all games] V-Cruise Voyeur WAGE Wintermute [all games] Z-Vision Engines Skipped: Hpl1 Tetraedge Thimbleweed Park The Watchmaker WARNING: This ScummVM build contains the following UNSTABLE engines: Lord Avalot d'Argent Chamber Crab Lost Eden Dungeon Master Grim [Escape from Monkey Island] In Cold Blood The Immortal The Last Express Lilliput MacVenture MADS [MADS V2] Mohawk [Where in Time is Carmen Sandiego?] Mutation of JB Playground 3d: the testing and playground environment for 3d renderers Sludge Star Trek 25th Anniversary/Judgment Rites TestBed: the Testing framework Ultima [Ultima I - The First Age of Darkness] WAGE Wintermute [Wintermute3D] Creating engines/engines.mk Creating engines/detection_table.h Creating engines/plugins_table.h Creating config.h Creating config.mk ```
XK9274 commented 7 months ago

Alright the new link is above, sorry about that - had to recompile.

bmn001 commented 7 months ago

Thanks so much for taking the time to make this new build.

I just tested with all four audio formats, and all four are now working. flac, ogg, m4a, and mp3 all play CD audio with no error messages.

re: --enable-mt32, it didn't appear to change anything regarding #1510. But that's a separate issue.

As far as this issue is concerned, I'd consider it done and closeable. Thank you!

XK9274 commented 7 months ago

Thanks so much for taking the time to make this new build.

I just tested with all four audio formats, and all four are now working. flac, ogg, m4a, and mp3 all play CD audio with no error messages.

re: --enable-mt32, it didn't appear to change anything regarding #1510. But that's a separate issue.

As far as this issue is concerned, I'd consider it done and closeable. Thank you!

More than happy to recompile, though i've had a massive data loss just after this so my ability may now be restricted until i get my build scripts back in order. Yeah fluidsynth is a bit of a pain and i'm not sure i'll get it working anytime soon .

When you've ran with this for a week or two can you let me know if you have any issues please and if not i'll move to PR it for 4.4

E: Yep, this build script is gone.

XK9274 commented 6 months ago

@bmn001 Has there been any issues? I'll soon recompile with zlib support as I forgot in the previous build so no zip files are accessible.

If you don't mind testing this one too? Then we'll PR

bmn001 commented 6 months ago

No issues that I could see. The previous build you provided is still going strong.

Just a quick side note - the docs might need an update. They currently don't claim any kind of zip support for scummvm, and indicate that you need to create separate folders for each game. (https://onionui.github.io/docs/emulators/scummvm)

I'm happy to test whatever you've got!

XK9274 commented 6 months ago

Yeah, pretty sure at one point I added zlib support, then at another removed the zlib configure/compile and I don't remember why, was maybe it wasn't quite fully functional.

I'll do another full compile with all our previous mods here aswell as zlib support so hopefully the zip files will work again & I'll include changes to docs in the PR, if it turns out to not work at all we'll just go ahead with the last working build.

Thanks!

XK9274 commented 6 months ago

Hey hey,

So i've recompiled this evening. This is another clone from the master repo so it'll be as up to date as it gets but that may mean it brings some bugs up with it.

Notable in this build:

Unfortunately this doesn't fix the fluidsynth issue, just haven't had the time to get it compiling

The only testing i've done is adding a game (Beneath a Steel Sky) and running it to check vid/audio.,

Download: https://drive.google.com/file/d/1dRLwQVH_HjdHd2egq56v196amB1ccWMf/view?usp=sharing

If you're having no issues with the previous build then we'll probably use that one to update Onions and close this issue with the PR 👍

As always, here's the engine data:

``` Running ScummVM configure... Looking for C++ compiler... arm-linux-gnueabihf-g++ Checking if compiler supports C++11... yes Checking for compiler version... GCC 8.3.0, ok Checking if C++11 initializer list is available... yes Checking if C++11 std::nullptr_t is available... yes Checking if C++11 alignas and alignof keywords are available... yes Using LLD linker... no Using Mold linker... no Checking for whether C++ compiler accepts -Wglobal-constructors... no Checking for whether C++ compiler accepts -Wno-undefined-var-template... no Checking for whether C++ compiler accepts -Wno-pragma-pack... no Checking for whether C++ compiler accepts -Wno-address-of-packed-member... no Checking endianness... little Checking 64-bitness... no Type with 1 byte... char Type with 2 bytes... short Type with 4 bytes... int Type with 8 bytes... long long Alignment required... yes Checking host CPU architecture... ARM Checking hosttype... linux Cross-compiling to miyoomini Checking for pkg-config... yes WARNING: When cross-compiling PKG_CONFIG_LIBDIR must be set to the location of the .pc files for the target Looking for sdl-config... /opt/miyoomini-toolchain/bin/../arm-linux-gnueabihf/libc/usr/bin/sdl-config Checking for SDL... yes Checking for SDL_Net... no Checks for ENet... Checking for sendmsg... yes Checking for recvmsg... yes Optional checks for ENet... Checking for getaddrinfo... yes Checking for getnameinfo... yes Checking for gethostbyaddr_r... yes Checking for gethostbyname_r... yes Checking for poll... yes Checking for fcntl... yes Checking for inet_pton... yes Checking for inet_ntop... yes Checking for msghdr.msg_flags... yes Checking for socklen_t... yes Checking if host is POSIX compliant... yes Checking if posix_spawn is supported... yes Checking if fseeko with 64-bit off_t is supported... yes (adding -D_FILE_OFFSET_BITS=64) Checking whether to have a verbose build... no Checking whether building plugins was requested... yes Checking whether building plugins is supported... yes Checking if detection features building statically... yes Checking if building detection features for all engines... yes Checking for Ogg... yes Checking for TTS libraries... no Checking for Vorbis... yes Checking for Tremor... no (Vorbis/Tremor support is mutually exclusive) Checking for OPL2LPT... no Checking for RetroWave OPL3... no Checking for FLAC >= 1.0.1... yes Checking for MAD... yes Checking for ALSA >= 0.9... no Checking for libjpeg >= v6b... yes Checking for PNG >= 1.2.8... yes Checking for GIF >= 5.0.0... yes Checking for libtheoradec >= 1.0... no Checking for libvpx >= 1.6... no Checking for libfaad... yes Checking for SEQ MIDI... no Checking for sndio... no Checking for TiMidity... no Checking for zlib... yes Checking for libmpeg2 >= 0.4.0... yes Checking for liba52... yes Looking for curl-config... none found! Checking for libcurl... no Looking for mikmod-config... none found! Checking for libmikmod... no Cloud integration... no Checking for FluidSynth... no Checking for FluidLite... no Checking for Sonivox... no Checking for readline... skipping (text console disabled) Checking for libunity... no Checking for gtk... no Checking for FreeType2... yes Checking for OpenGL... no Checking for OpenGL for game... no Checking for Linux CD-ROM... yes Checking for FriBidi... no Test C++11 compatibility during compilation... no Checking for Discord RPC... no Building translation support... yes (with runtime language detection) Building taskbar integration support... no Building system dialogs support... no Building text-to-speech support... no Building TinyGL support... yes Building Bink video support... yes Building updates support... no Enabling Address Sanitizer... no Enabling Thread Sanitizer... no Enabling Undefined Behavior Sanitizer... no Enabling x86/amd64 SSE2... no Enabling x86/amd64 AVX2... no Enabling ARM NEON... yes Backend... miyoo (SDL 1.2.15), 16bit color, high resolution, TinyGL, savegame timestamp, HQ and Edge scalers, aspect ratio correction, Lua, virtual keyboard, ENet WARNING: Disabling engine Hpl1 because the following dependencies are unmet: OpenGL with shaders WARNING: Disabling engine Tetraedge because the following dependencies are unmet: libtheoradec WARNING: Disabling engine The Watchmaker because the following dependencies are unmet: OpenGL (classic) Engines (builtin): SCUMM [all games] Access ADL AGI AGOS [all games] Adventure Game Studio Sanitarium Lord Avalot d'Argent Beavis and Butthead in Virtual Stupidity Blade Runner The Journeyman Project 2: Buried in Time CGE CGE2 Chamber Chewy: Esc from F5 Cinematique evo 1 Magic Composer Crab Cinematique evo 2 Lost Eden Cryo Omni3D games [all games] Macromedia Director Dungeon Master Dragon History Blazing Dragons Drascula: The Vampire Strikes Back Dreamweb Escape From Hell Freescape Glk Interactive Fiction games UFOs Gobli*ns The Griffon Legend Grim [all games] Groovie [all games] Hades Challenge Hyperspace Delivery Boy! Hopkins FBI Hugo Trilogy Hypnotix Inc. In Cold Blood Illusions Engine The Immortal Kingdom: The Far Reaches Kyra [all games] Labyrinth of Time The Last Express Lilliput Lure of the Temptress MacVenture MADE MADS [all games] Might and Magic [all games] Mohawk [all games] Mortevielle mTropolis Mutation of JB Myst 3 Nancy Drew Neverhood Nikita Game Interface Parallaction The Journeyman Project: Pegasus Prime Red Comrades Pink Panther Playground 3d: the testing and playground environment for 3d renderers Plumbers Don't Wear Ties The Prince and The Coward Private Eye Flight of the Amazon Queen SAGA [all games] SAGA2 SCI [all games] The Lost Files of Sherlock Holmes Beneath a Steel Sky Sludge The Longest Journey Star Trek 25th Anniversary/Judgment Rites Mission Supernova Broken Sword Broken Sword II Broken Sword 2.5 Teen Agent TestBed: the Testing framework Tinsel Starship Titanic 3 Skulls of the Toltecs Tony Tough and the Night of Roasted Moths Toonstruck Touche: The Adventures of the Fifth Musketeer Trecision Adventure Module TsAGE Bud Tucker in Double Trouble Little Big Adventure Ultima [all games] V-Cruise Voyeur WAGE Wintermute [all games] Z-Vision Engines Skipped: Hpl1 Tetraedge The Watchmaker WARNING: This ScummVM build contains the following UNSTABLE engines: Lord Avalot d'Argent Chamber Crab Lost Eden Dungeon Master Grim [Escape from Monkey Island] In Cold Blood The Immortal The Last Express Lilliput MacVenture MADS [MADS V2] Might and Magic Mohawk [Where in Time is Carmen Sandiego?] Mutation of JB Playground 3d: the testing and playground environment for 3d renderers Sludge Star Trek 25th Anniversary/Judgment Rites TestBed: the Testing framework Ultima [Ultima I - The First Age of Darkness] WAGE Wintermute [Wintermute3D] ```
bmn001 commented 6 months ago

One week in on this new build and things seem be to running well!

There is only one display issue that I can see, and I think it might be more on the Onion side than the ScummVM side:

In some Scumm games (Secret of Monkey Island CD DOS is one, Police Quest II DOS is another), Onion's volume bar doesn't appear as a solid green line. It's a green vertical line, but every other row of pixels in that line is black, and the whole bar flickers.

In these cases, a volume bar that shows "full" is actually only about 50% volume. You can continue to press the volume up button and the volume will increase, but it won't be reflected in the on-screen bar.

bmn001 commented 6 months ago

A bit more info - this latest build fixes previously-unwatchable video playback in games like Myst, The 7th Guest, and Blade Runner!

I looked into zlib - ScummVM uses it to decompress .dxa videos in some games and to compress/decompress save game data, but not to decompress the games themselves. They've said they will never support zipped games due to anti-piracy concerns.

breacher18 commented 2 months ago

I’m still having issues with broken sword 2.5 audio. Then in the stand alone audio is fine but cursor movement is so slow.