Jo Engine Forum

Sega Saturn Development => General Jo Engine Help => Topic started by: ponut64 on June 19, 2018, 07:42:07 pm

Title: CD-DA Audio in Jo is broken...?
Post by: ponut64 on June 19, 2018, 07:42:07 pm
I'll just ask anyone here to check the "Audio" demo included in Jo engine. ATM it doesn't work.

Further, Bizhawk and Yabause refuse to load CD files that include mp3 or WAV files. Only SSF loads it, and even then it does not play the music file.
Trying to include the audio files the way Rockin' B says to also doesn't make them 'happy'.
There's got to be some way to get "CD-DA" included in an iso file, right?

I could fathom a workaround to that if we had SGL CD functions, but we don't. And given Jo Engines handling of the CD audio files is very low-level, it seems fool-proof to me.
I'm also not sure how SBL expects you to playback CD-DA.(/e: Oh, CD-XA / ADPCM .. which doesn't really help me!)
I just wonder if it is like this for anyone else.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: XL2 on June 19, 2018, 08:15:17 pm
It's using SBL in fact, which has the source code.
It works fine for me, but I haven't tried it on the latest Jo Engine version.
Check my old fps demo for cd audio examples.
I will try to share my own take on audio (using tones for sfx and SBL CDDA audio functions ) in a couple of weeks.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: ponut64 on June 19, 2018, 09:23:28 pm
Now I'm wondering how strict the documentation is on "ADPCM".

Like, for example, will VOX work...
I don't really think I need to wonder since converters from AIFF to Sega ADPCM exist (in Mac..) but maybe I can try and feed it to the system and see what it thinks?
(Given the complete and total lack of header data, ... nah, setting up Basilisk 2 wasn't that hard)
Not anytime soon, though.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: SaturnTeam on June 19, 2018, 10:12:14 pm
I just tried it, yesterday. I am using the newest engine version. I couldn't get it to work with any of the emulators by clicking on included launch files in the demo. What I ended up doing was opening Yabause and manually opening the sl_coff ISO. This will successfully get the file open. However, only the sound effect will play. The CD audio is unresponsive. I have read somewhere that it should work normally when burned to a CD and used with Pseudo Saturn Kai, which is what I use on my Saturn.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: ponut64 on June 19, 2018, 11:06:14 pm
Yes, that should work. If you burn from the CUE file which will include the music file (included from the CUE file) into the CD.
The problem is I can't debug anything without it being able to load properly in an emulator (*without burning a disc). So with that I am going to switch to 22 (maybe even 11) KHz ADPCM sound instead. The features for ADPCM are probably better suited to what I want to do, anyway.

Thanks for the confirmation.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: LackofTrack on June 21, 2018, 06:49:12 am
Have you guys tried the emulator Mednafen? I just downloaded the latest release of Jo engine and used mednafen and the audio demo worked perfectly for me.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: ponut64 on June 21, 2018, 07:05:13 am
No, I hadn't. That is good to hear for those who need to test CDDA though.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: SaturnTeam on June 21, 2018, 08:58:53 pm
Thanks for the tip. Maybe I'll check out that emulator.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: SaturnTeam on June 25, 2018, 10:51:16 pm
So I tried Mednafen, but couldn't get it to work under Windows 7. I tried the MedGui Reborn and MedLaunch front-end GUIs, but neither one could open the Jo Engine bins or cues. I just kept getting "File type not recognized."
Title: Re: CD-DA Audio in Jo is broken...?
Post by: LackofTrack on June 26, 2018, 12:10:47 am
That's weird. Mednafen should work with Windows 7. Did you download it from the official site?
Also I recommend you use the Mednaffe GUI. It's what I personally use and it works great for me.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: SaturnTeam on June 26, 2018, 01:05:21 am
Yeah, I downloaded it from the official site. I'll worry about it another day. I wasted hours on trying to get it to work.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: 20EnderDude20 on August 04, 2018, 05:43:44 pm
Run it on the physical console. It might give you less headaches with audio.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: Miracoli on January 15, 2019, 03:32:27 pm
I know this topic is a little older, but i just wanted to share a way I managed to get it to work with yabause.

1. Let make build the iso and cue like before
2. Convert the audio to binary format with:
Quote
ffmpeg -i track1.wav -f s16le -ar 44100 -acodec pcm_s16le - >> track1.bin
(repeat for every track. works as well for flac and mp3, just replace the filename)

3. In sl_coff.cue replace
Quote
FILE "track1.wav" WAVE
with
Quote
FILE "track1.bin" BINARY
for every track.

4. Use binmerge python script from https://github.com/putnam/binmerge (https://github.com/putnam/binmerge) to merge everything to a new .bin and .cue file
Quote
python3 binmerge sl_coff.cue new

It would be nice if anyone could confirm it works for him as well.
Title: Re: CD-DA Audio in Jo is broken...?
Post by: mindslight on January 15, 2019, 05:51:13 pm
If it works, I will update the JoCueMaker to handle BIN file :)