(libnds) soundPlaySample limits sample lenght to 256KB max

Post Reply
sverx
Posts: 94
Joined: Wed Aug 12, 2009 2:56 pm
Location: github.com/sverx
Contact:

(libnds) soundPlaySample limits sample lenght to 256KB max

Post by sverx » Tue Apr 06, 2010 2:35 pm

Hi
as in the subject, soundPlaySample has a u32 dataSize param but then it does this:

Code: Select all

msg.SoundPlay.dataSize = dataSize >> 2;
with SoundPlay struct defined like that

Code: Select all

struct {
	u16 type; 	
	const void* data;
	u16 loopPoint;
	u16 dataSize;
	u16 freq;
	u8 volume;
	u8 pan;
	bool loop;
	u8 format;
} SoundPlay;
dataSize is u16 instead of u32 as it should be since SOUNDxLEN is a 32 bits register that uses 22 bits.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests