Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Recording From Microphone

Recording From Microphone

All your problems with Audio, Video and Images.

Recording From Microphone

Postby leptictidium » Sun Jul 17, 2011 11:47 pm

I need to display the frequency of the microphone input in real time. From my research so far I know that you have to get the audio buffer data and perform and FFT on it. I have found a library to do FFT here:
https://sites.google.com/site/piotrwend ... transforms
Once you have the results of the FFT you take the absolute value of it and then do something else to get the frequency, but right now I'm mainly concerned with doing the FFT itself.

I am new to android development. Could anyone show me how to perform the FFT on the audio buffer? Thanks.

I think you get the buffer like this:
Code: Select all
int channel_config = AudioFormat.CHANNEL_CONFIGURATION_MONO;
                      int format = AudioFormat.ENCODING_PCM_16BIT;
                      int sampleSize = 8000;
                      int bufferSize = AudioRecord.getMinBufferSize(sampleSize, channel_config, format);
                      AudioRecord audioInput = new AudioRecord(AudioSource.MIC, sampleSize, channel_config, format, bufferSize);
                      short[] audioBuffer = new short[bufferSize];
                      
leptictidium
Freshman
Freshman
 
Posts: 2
Joined: Mon Jun 20, 2011 11:21 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: Google [Bot] and 2 guests