Sound?

Understanding the language, error messages, etc.

Sound?

Postby yodasvideoarcade » Sun Aug 10, 2014 12:26 pm

If I do this:

Code: Select all
gb.sound.command(1,0,0); // select sound 0 for channel 0


I get this:

error: no matching function for call to 'Sound::command(int, int, int)'

What's wrong here?

(I defined an instrument and an instrument set before, no errors there)
User avatar
yodasvideoarcade
 
Posts: 102
Joined: Sat Apr 19, 2014 10:48 am
Location: Frankfurt/Germany

Re: Sound?

Postby Matrix828 » Sun Aug 10, 2014 2:54 pm

According to the library the function you're trying to call requires four parameters:

Code: Select all
Sound::command(uint8_t cmd, uint8_t X, int8_t Y, uint8_t i)

Also on the wiki: (http://gamebuino.com/wiki/index.php?title=Reference)
Code: Select all
gb.sound.command(command, X, Y, channel)



You're missing one of them. :D

EDIT: Is this what you're trying to execute?
Code: Select all
gb.sound.command(CMD_VOLUME, 0, 0, 1)
Matrix828
 
Posts: 43
Joined: Tue Jul 22, 2014 7:44 pm


Return to Programming Questions

Who is online

Users browsing this forum: No registered users and 6 guests