android people..
I have already gone through answers of no. of question in stackoverflow , many of them are little bit similar to my problem. but i could not get solution of my problem.
problem is that . In my Application i want to Rotate an Image until noise is coming from the microphone of Device and i don't want to save the audio file.
so , How can i start or implement this if anyone know the link or hint that how to implement this thing.
T开发者_JS百科hanks..
You can use the AudioRecord
class to access the audio stream from the microphone. Than you can try to detect noise from that bitstream. After calling startRecord
on the AudioRecord
you have to use read
to read the bytes from the stream (and you have to do that fast enough such that the internal buffer is not overflowing). You'll get 16bit integers from that stream which you can use to analyze basically the noise level. However recognizing a specific sound is not as easy.
精彩评论