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
[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 - MediaRecorder.OnInfo() never being called?

MediaRecorder.OnInfo() never being called?

All your problems with Audio, Video and Images.

MediaRecorder.OnInfo() never being called?

Postby pnzrdrgoon » Tue Sep 07, 2010 5:45 pm

I'm trying to write an audio recorder and it's giving me problems. Here is a snippet of code I'm using:
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
  2. recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
  3. recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
  4. recorder.setOutputFile(path);
  5. recorder.setMaxDuration(10000);  //ten seconds
  6. recorder.setOnInfoListener(new OnInfoListener(){
  7.  
  8.                         @Override
  9.                         public void onInfo(MediaRecorder mr, int what, int extra) {
  10.                                 mr.stop();
  11.                                 mr.release();
  12.                         }});
  13.    
  14. recorder.prepare();
  15. recorder.start();
  16.  
Parsed in 0.010 seconds, using GeSHi 1.0.8.4


My problem is that at the end of the 10 seconds the OnInfoListener is never called even though it should be because the MaxDuration is supposed to call onInfo with a what of MEDIA_RECORDER_INFO_MAX_DURATION_REACHED as per http://developer.android.com/reference/ ... ration(int)

What am I doing wrong?
pnzrdrgoon
Once Poster
Once Poster
 
Posts: 1
Joined: Tue Sep 07, 2010 5:31 pm

Top

Return to Multimedia Problems

Who is online

Users browsing this forum: No registered users and 3 guests