Questions on sound for Dreamcast

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
User avatar
Protofall
DCEmu Freak
DCEmu Freak
Posts: 78
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Sun Jan 14, 2018 8:03 pm
Location: Emu land
Has thanked: 21 times
Been thanked: 18 times
Contact:

Questions on sound for Dreamcast

Post by Protofall »

I've played around with sound on the DC in the past, but its still very foreign to me. I've got some questions about some areas I'm not familiar with.
1. I know the snd_sfx library can only take 16-bit uncompressed or 4-bit compressed sound effects, but I can't remember what the max length for those files are. I just *know* I've seen a post somewhere on these forums that states exactly how many seconds they go for, but I have no idea which page said it and how to find it again
2. What native music formats can the Sound-cpu take? I know there's libraries for oog, mp3 (Which is licensed so I shouldn't use), s3m and then there's CDDA but I'm curious about the native format/s. Is it 32-bit sound or something else? I'm a complete sound noob so this might be a dumb question.
3. Is it possible to stream oog/mp3/s3m audio like you can with CDDA so you can play a long song without it all just sitting in RAM? I'm not sure if the libraries/ports allow for that.

Thanks in advance
Moving Day: A clone of Dr Mario with 8-player support <https://dcemulation.org/phpBB/viewtopic ... 4&t=105389>
A recreation of Minesweeper for the Dreamcast <viewtopic.php?f=34&t=104820>

Twitter <https://twitter.com/ProfessorToffal>
YouTube (Not much there, but there are a few things) <https://www.youtube.com/user/TrueMenfa>
Ayla
DC Developer
DC Developer
Posts: 142
Joined: Thu Apr 03, 2008 7:01 am
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Questions on sound for Dreamcast

Post by Ayla »

I'll answer what I can:

2. Either 16-bit raw PCM, or 4-bit raw ADPCM (the Yamaha variant).

3. CDDA has a direct path from the GD-ROM block to the sound hardware. For everything else, including WAV files on the disc, you need to copy them to RAM and steam them to the sound firmware.
User avatar
ThePerfectK
Insane DCEmu
Insane DCEmu
Posts: 147
Joined: Thu Apr 27, 2006 10:15 am
Has thanked: 27 times
Been thanked: 35 times

Re: Questions on sound for Dreamcast

Post by ThePerfectK »

Anyone got a cdda demo? How does one burn the disc for cdda audio tracks?
Still Thinking!~~
User avatar
Protofall
DCEmu Freak
DCEmu Freak
Posts: 78
Joined: Sun Jan 14, 2018 8:03 pm
Location: Emu land
Has thanked: 21 times
Been thanked: 18 times
Contact:

Re: Questions on sound for Dreamcast

Post by Protofall »

Ayla wrote: Thu Sep 26, 2019 6:15 am I'll answer what I can:

2. Either 16-bit raw PCM, or 4-bit raw ADPCM (the Yamaha variant).

3. CDDA has a direct path from the GD-ROM block to the sound hardware. For everything else, including WAV files on the disc, you need to copy them to RAM and steam them to the sound firmware.
Thanks for that info
ThePerfectK wrote: Fri Sep 27, 2019 9:01 am Anyone got a cdda demo? How does one burn the disc for cdda audio tracks?
KOS does come with a CDDA demo, but it isn't exactly complete. Once you build the elf and 1st_read.bin you need to make a special iso and then use a program like MDS4DC to make a Dreamcast image. I believe DEMUL can run .mds files and maybe some other emulators too. Right now cdi4dc doesn't have cdda support. You can find instruction on using MDS4DC with CDDA here https://github.com/Kazade/img4dc/tree/master/mds4dc/doc
These users thanked the author Protofall for the post:
ThePerfectK
Moving Day: A clone of Dr Mario with 8-player support <https://dcemulation.org/phpBB/viewtopic ... 4&t=105389>
A recreation of Minesweeper for the Dreamcast <viewtopic.php?f=34&t=104820>

Twitter <https://twitter.com/ProfessorToffal>
YouTube (Not much there, but there are a few things) <https://www.youtube.com/user/TrueMenfa>
mrneo240
DCEmu Freak
DCEmu Freak
Posts: 86
Joined: Wed Mar 14, 2018 12:22 am
Has thanked: 16 times
Been thanked: 19 times

Re: Questions on sound for Dreamcast

Post by mrneo240 »

Ya, I wrote the streaming sample for aldc which happily loops and streams a 60mb WAV file from disc forever.

I still haven't been able to find a way to nicely synthesize sound without Kos, most of my stuff is just screeteches
Post Reply