Note that there are some explanatory texts on larger screens.

plurals
  1. PORecording Audio and Playing Audio at the same time
    primarykey
    data
    text
    <p>In my application i am recording input from the microphone and at a certain point i am playing a sound (while the recording is still going). Now the recorder "stops" to record (mrec.stop() may still be used), the LogCat entry for this seems to be:</p> <pre><code> 07-03 18:40:34.811: INFO/AudioHardwareALSA(2179): Output standby called!!. Turn off PCM device. </code></pre> <p>I am testing on two phones, one is a Samsung Galaxy S and one is a Samsung Galaxy 3. On the Galaxy S everything works as expected (which is that the recording still takes place). The difference between the two phones besides the specs is that the Galaxy S has 2.2.1 and the Galaxy 3 2.2 I figured, that a workaround would be to initialize the mediarecorder again, but this makes the application stutter, which is not wanted.</p> <p>Here is more information how the mediaplayer and the mediarecorder are set up:</p> <pre><code> void Init() { mp = MediaPlayer.create(getContext(), R.raw.pop); mrec = new MediaRecorder(); mrec.setAudioSource(MediaRecorder.AudioSource.MIC); mrec.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP); mrec.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); [..] mrec.setOutputFile(audiofile.getAbsolutePath()); mrec.prepare(); mrec.start(); } </code></pre> <hr> <pre><code> void Event() { mp.start(); } </code></pre> <p>Why does the recording "stop"? Is there a way to halt the stop? Is this the desired behaviour? How can i find out what's wrong?</p> <p>Any tips are appreciated.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload