reicast/reicast-emulator — pull request #109 by hooby3dfx (2014-01-18 23:34:41+00:00)
Title: Microphone support

This is it!
I am hoping to get an initial code review and some testing on this.
Please check the notes doc for more info.

Right now the way this works is:
-First controller gets vmu in port 1, mic in port 2 (hardcoded atm)
-Starts an AudioRecord instance and thread in java which starts buffering audio data in what I think is the default format and in 512 byte blocks (again guesswork but seems to be the right amt of data) (no error handling around this atm if device doesn't have a mic)
-When mic data requests start coming into the maple layer jni calls handle getting data from the buffer
-Its not perfect and there may be some latency (not sure) but initial results looks good
-Would be great if there were more games/apps to test this with. I thought Otoire would be best but it actually just uses the pitch from the mic to write out midi, doesn't store the digital audio (makes sense based on memory available). If someone (cough cough BlueCrab) could make a program to test various recording routines that would be killer.

...First emu support for mic device ever?!