Mod Archive Forums Mod Archive Forums
Advanced search  

News:

Please note: Your main modarchive.org account will not work here, you must create a forum account to post on the forums.

Pages: 1 [2]   Go Down

Author Topic: Open Source!1!11!  (Read 17477 times)

0 Members and 1 Guest are viewing this topic.

Synthesis

  • New User
  • Offline Offline
  • Posts: 23
    • View Profile
Re: Open Source!1!11!
« Reply #10 on: April 17, 2009, 21:17:28 »

Nope. Maxmod is an external library (maybe based on libnds, dunno), and the simple sound engine functions (soundPlayNoise, soundPlaySample, etc.) are made to be called from the ARM9 code.

Also, these two APIs have only been included in version 1.3.1.

I'm pretty sure Tob didn't use any of these functions, but he used the ARM7 macros of the previous libnds versions (lower-level, probably faster).

A sample code looks like:
Code: [Select]
SCHANNEL_TIMER(0) = SOUND_FREQ(22050);
SCHANNEL_SOURCE(0) = (uint32)sample;
SCHANNEL_LENGTH(0) = ((int)sample_end - (int)sample) >> 2;
SCHANNEL_CR(0) = SCHANNEL_ENABLE | SOUND_ONE_SHOT | SOUND_8BIT | SOUND_VOL(0x3F);

Immediately after the values are changed in the registry of channel 0, the sound starts to be played.
Logged
Pages: 1 [2]   Go Up