Page 1 of 1

NDS microphone input

Posted: Wed Mar 10, 2010 4:25 am
by snesy
Hello,
Recently I started programming for the DS again and I would like to use the microphone as an input method. I found this kind of usage in some other games where you can blow into it and get a response. Has anyone here tried it already or has an idea of what I have to do?

Best regards

Re: NDS microphone input

Posted: Wed Apr 07, 2010 8:14 pm
by Spoon
I'm currently working on something similar. I found this sample program on the online Libnds Documentation. This should be all you need to get started :)

Re: NDS microphone input

Posted: Thu Jun 03, 2010 6:17 pm
by GSGeek
Hello,

The voice recorder demo provided with libnds was my starting point. Two bits of knowledge I'd like to share about it:

1- Buffer size parameters are expressed in bytes,
2- The microphone handling callback function is called 30 times per second and the time interval between two calls is constant (1/30th sec).

Interesting fact: the required analog-to-digital conversion is performed in hardware by the touch screen controller. The controller also provides X, Y, Z(!) touch coordinates, and DS' battery voltage, although the latter value is not available through libnds.

have fun, and happy coding!