realnc / dosbox-core

A DOSBox core for use in RetroArch and other libretro frontends.
GNU General Public License v2.0
42 stars 16 forks source link

Compressed CD Audio Tracks MP3/OGG Support #29

Closed redmist77 closed 2 years ago

redmist77 commented 2 years ago

Standalone DOSBox supports using CUE files that list compressed audio for CD tracks. Is this something that can be added to DOSBox Core?

https://www.dosbox.com/wiki/Cuesheet#Compressed_audio_tracks

realnc commented 2 years ago

Maybe. If I can figure out how to convert an existing bin/cue to mp3 or ogg. How do I do that?

Edit: Never mind. Figured it out. Adding support for it is definitely not something that can be just toggled on and have it work. I will need to experiment around a bit.

redmist77 commented 2 years ago

I use bin2iso https://github.com/einsteinx2/bin2iso which extracts an iso + wav files from a cue/bin. Unfortunately, I still have to compress the wavs to mp3 or ogg manually and edit the cuesheet manually as mentioned on the DOSBox link above. (fixed) https://www.dosbox.com/wiki/Cuesheet#Compressed_audio_tracks I could probably whip up an automated converter without too much trouble. I'm surprised nobody has done it yet. It's been talked about for a while. Alternatively, I could post a sample cue/iso/ogg archive if needed.

realnc commented 2 years ago

I use bin2iso https://github.com/einsteinx2/bin2iso which extracts an iso + wav files from a cue/bin. Unfortunately, I still have to compress the wavs to mp3 or ogg manually and edit the cuesheet manually as mentioned on the DOSBox link above.

I used this, which does everything automatically. It was a bit glitchy because it took me a while to figure out you have to run it twice in a row for some reason (see my post in that thread):

https://www.vogons.org/viewtopic.php?f=31&t=77260

realnc commented 2 years ago

I added support for this now. It handles FLAC, WAV, MP3, Ogg Vorbis, but also Opus, which is the successor to Vorbis (higher quality/lower filesize.)

It's not on the RetroArch core updater yet, and for now it's enabled only for Windows and Linux. If you're on Windows or Linux, can you give this build a try and test:

https://github.com/realnc/dosbox-core/releases/tag/latest_build

redmist77 commented 2 years ago

Did a quick test with Descent II and CD tracks converted to OPUS and it appears to work well. I'll keep testing when I get time. Outstanding work!

realnc commented 2 years ago

It's now in the core updater and works on Windows, Linux and macOS as well.

realnc commented 2 years ago

@redmist77

Just wanted to mention that there is an issue when the game changes to another audio track and then back again. A tiny bit of the previous playback of that track will be audible. I'm aware of this audio glitch and a fix will be coming out shortly.

realnc commented 2 years ago

Everything should now be working correctly without any audio glitches.