Page 1 of 1

(libnds) soundPlaySample limits sample lenght to 256KB max

Posted: Tue Apr 06, 2010 2:35 pm
by sverx
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.