Romhacking.net

Romhacking => Programming => Topic started by: Guadozoku on December 30, 2012, 12:29:08 am

Title: Playing sound in GBDK
Post by: Guadozoku on December 30, 2012, 12:29:08 am
I'm giving some Game Boy programming a go. My C knowledge is hardly what it should be, but I don't understand how to do sound on this thing. Is there any good help out there? The example file is out of my league, so is there any simpler way than all that code?
Title: Re: Playing sound in GBDK
Post by: tigrou on January 08, 2013, 05:36:25 pm
What do you mean by playing a sound ?

if it is a square wave (aka "biiip, twip, ...", something that sounds like traditional gb games) have a look at sound.c from gbdk example : http://gbdk.sourceforge.net/examples.html

if it is a sample (like a wav) : have a look at PlaySample() function : http://gbdk.sourceforge.net/doc/html/sample.h.html 

hope this help