DOSBox ECE r4176: Neue Audioformate und bessere Unterstützung für CD-Images

Veröffentlicht von

Ich habe mal wieder neue Features in DOSBox ECE einfließen lassen. Diese stammen aus der fleißigen Feder hat des Vogons-Users “krcroft” und krempeln das Handling von CD-Images in DOSBox ganz gehörig um! Ich kopiere hier der Einfachheit halber mal die Featureliste direkt aus dem Originalbeitrag auf vogons.org:

7. What runtime improvements have been made?

  • Replaces the existing audio callback routine with an efficient chunked circular-buffer audio reader
  • Replaces assumptions that all audio tracks are 44.1 kHz & stereo. The mixer is now fed data at the actual compressed track’s rate and channel count
  • Eliminates all SDL locks in the audio code in favour of mixer state control
  • Fixes the CDROM double-load bug (https://sourceforge.net/p/dosbox/bugs/488/), now using ripsaw8080’s one-line preemptive fix
  • Queries the codec for track-length instead of using hundreds of iterative decimating seeks to determine track length (loading a 99-track CUE now takes 0.1 user-seconds versus 3+ seconds previously)
  • Adds handling for exact track positions via MSF values if specified in the cue file (https://sourceforge.net/p/dosbox/bugs/489/)
  • The Opus decoder seek within its buffer (if possible) before actually moving the file pointer and re-running the decode sequence to get a different chunk of data; an optimization not found in the other codecs
  • SDL_Sound’s buffer-size is now set once and never resized, which eliminates repeated re-malloc’ing in the library
  • Only one seek is performed per-playback sequence followed by sequential decodes, similar to a physical CDROM (current code reads 2352-byte chunks and includes seek calculations for every read)
  • The DOSBox mixer channel is now only active during playback sequences, and is no longer left active and fed with silence, which reduce call overhead and audio latency in the mixer
  • When using Opus audio tracks, and if your dosbox-SVN.conf [mixer] rate=48000, then you will (very likely) achieve sample-exact unadulterated pass-through along your entire audio chain from the decoder, to DOSBox, to your operating system’s software mixer, to your sound card driver, to your sound card, to your speakers, or to your digital receiver / USB speakers/headphones / or HDMI TV/screen. This is because almost all modern hardware DACs use a native sample rate of 48000

8. What source-level maintenance improvements have been made?

  • Eliminated external dependence on SDL_Sound and its mess of external library dependencies — thank you Dominus and DosFreak for recommending this approach.
  • SDL_Sound, Vorbis, FLAC, Opus, and Ogg libraries are not needed on your system nor do you need to build or provide pointers to these in CFLAGS/LIBS/etc..
  • All codec handling is 100% internal DOSBox’s to source and “always on”
  • It strips all references to SDL_Sound from configure.ac
  • It strips all pre-processor #ifdef branching for SDL_Sound from the code
  • For Vorbis decoding, we now use the single-header stb_vorbis.h instead of of libogg, libvorbis, and libvorbisfile
  • For MP3 decoding, we now use the single-header dr_mp3.h instead of libmp123
  • For FLAC decoding, we now use the single-header dr_flac.h instead of libogg and libFLAC
  • It adds src/libs/decoders, which holds the top-level opus, flac, vorbis, and wav decoders
  • It adds src/libs/decoders/internal, where the opus-dependencies are automatically fetched, built, and linked as part of DOSBox’s internal libraries
  • Fixes all codec compiler warnings; 100% clean builds now
  • Build-tested on Linux, MacOSX (xcode), and Windows (MinGW msys 1.0)

Beeindruckende Liste, oder? Ich fasse mal kurz ein paar Features zusammen: DOSBox ECE unterstützt nun stann nur OGG auch WAV, MP3, FLAC und OPUS als komprimierte Audiodateien statt CD-Audio. Gerade OPUS ist in dieser Hinsicht interessant, da es bereits ab 128 KBit/s kaum noch bis gar nicht mehr vom unkomprimierten CD-Audio zu unterscheiden ist und dabei nochmals deutlich kleinere Dateien erzeugt als OGG. Das ganze funktioniert jetzt auch losgelöst von SDL_Sound, was für Euch als Anwender aber weniger interessant sein dürfte. Was wiederum deutlich interessanter sein dürfte, ist die Unterstützung von Zeitangaben in CUE-Dateien auch mit komprimierten Audiodateien, einige Spiele, z.B. Destruction Derby, funktionierten bisher nämlich nicht mit OGG-Dateien, weil eventuelle Zeitangaben (MSF) in der CUE-Datei nicht ausgelesen wurden, das Spiel die aber als eine Art Kopierschutz benutzt. Übrigens werden nun auch CD-Images mit mehr als einer BIN-Datei, wie sie z.B. das ReDump-Projekt erstellt, unterstützt.

Ihr seht, krcroft hat sich da mächtig ins Zeug gelegt. Und weil es doch wirklich schade wäre, wenn diese tollen Verbesserungen nur einigen wenigen Selbstkompilierern zugänglich bleiben würden, habe ich seinen Riesen-Patch natürlich gerne in DOSBox ECE integriert, denn genau das ist ja mein Ziel damit: Spiele besser aussehen und klingen zu lassen, bzw. mehr Spiele zu unterstützen und sie besser zu unterstützen.

Die Downloads für Windows und Linux findet Ihr wie immer hier auf der Seite, wenn ihr Fragen oder einen Fehler gefunden habt, lasst es mich bitte hier oder in meinem Beitrag auf VOGONS wissen. Viel Spaß weiterhin mit DOSBox ECE!

Kommentar hinterlassen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert