gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

DS development > Streaming sound

#139692 - Takaishi_Takeru - Sat Sep 08, 2007 10:55 pm

Hi. I want to stream a RAW audio readed from FAT, i want to know how do it.

Thanks.

#139700 - kusma - Sun Sep 09, 2007 1:18 am

Thank you for your information.

Edit: Okay, I wasn't too clear here. Please reformulate this as a question, preferably giving some more context about what you wish to accomplish, and how you plan to do this.

#139702 - tepples - Sun Sep 09, 2007 2:12 am

As I read the question, there is an audio waveform stored as a raw PCM sample stream in a file that has been opened in libfat. Poster wants to know how to play this waveform on the DS sound hardware.

The way to do this needs the ARM9 and ARM7 CPUs to work together. The ARM9 loads a chunk at a time (such as 4096 bytes at a time) into a ring buffer, and the ARM7 sets the audio playback hardware to loop over the ring buffer. Examples of how to do this are in the source code of any DS based media player, such as DSOrganize and MoonShell.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.