Android :: Audio Playback Error While Recording

Oct 16, 2009

I have a Java application where in I am trying to read Audio samples from the mic into a buffer and then write the samples back to speaker from a buffer for playing. I have used AudioRecord and AudioTrack interfaces. Below are my configurations for the Record and Track object creation. AudioTrack(0, 8000, 2, 2, playBufSize, 1); AudioRecord(1, 8000, 2, 2, recBufSize); Using AudioRecord interface I am able to read the samples from mic continiously (8000 sampling rate and 640 samples per read). In the similar way I am also able to write some pcm samples to the speaker from a buffer and play it continuously using the AudioTrack interface (without record). But when I try to do both record and play simultaneously I am able to only record audio from mic but I am not able to play any samples to speaker. I am getting this error " ------- attemp playback while recording, cheat it! ----- " in the log cat.

I have given the following permissions "android.permission.RECORD_AUDIO" and "android.permission.MODIFY_AUDIO_SETTINGS" in the Manifest file. I didn't find any special permission to play the audio. Is there anything else that I need to enable?

Android :: Audio Playback error while Recording


Error Recording Audio Using Native AudioRecord Interface

May 25, 2009

Record audio using the native AudioRecord interface? I'm trying to do this on my Neo Freerunner but all I get in logcat is:

I/AudioHardwareALSA( 787): Initialized ALSA CAPTURE device AndroidRecord_Microphone
D/AudioHardwareALSA( 787): Set CAPTURE PCM format to S16_LE (Signed 16 bit Little Endian)
D/AudioHardwareALSA( 787): Using 1 channel for CAPTURE.
D/AudioHardwareALSA( 787): Set CAPTURE sample rate to 8000 HZ
E/AudioFlinger( 787): Error reading audio input
W/AudioRecord( 947): obtainBuffer timed out (is the CPU pegged?) user=00000000, server=00000000

The android::AudioRecord::read() function returns the number of bytes I'm trying to read, but the resulting buffer is filled with zeroes.

View 1 Replies View Related

Android :: Recording Audio With 1.5 SDK

Apr 16, 2009

One known limitation of SDK 1.1 was that audio can be recorded only to a File and not to a network stream. Is this still an issue with 1.5 SDK?

View 4 Replies View Related

Android :: Continuous Raw Audio Playback Using AudioTrack

Dec 29, 2009

I am trying to play raw audio samples ( 16 bit, stereo, @ 32000KHz) using AudioTrack, in "MODE_STREAM" mode. I could play the first video buffer successfully but, After having received "onMarkerReached" for that raw audio buffer, I wonder how to push more audio data in AudioTrack ? without closing/stopping it. Writing more data to AudioTrack in "onMarkerReached" callback does not help. I am using the same thread to construct the AudioTrack and pump in audio - buffers and receive callbacks.

View 2 Replies View Related

Android :: Variable Rate Audio Playback

Mar 14, 2010

I'm new to development on Android and thought maybe you could shed some light on my problem. I'm trying to code up a little object to take care of playing a list of songs at a constantly varying playback rate. I just spent a god chunk of time getting it going with SoundPool only to find out about the undocumented 1 mb file limit. Do you guys have any ideas? Should I be using AudioTrack? I was going to try that next. Any tips or code samples for doing this kind of thing? It's such a shame that neither JetPlayer nor MediaPlayer support rate changes.

View 2 Replies View Related

Android :: Create Audio Recording?

Feb 24, 2009

I'd like to create an audio recording in Android. (Actually, I just want access to the mic without recording it, but it seems that's not supported so I'll have to create a recording and tail the file). I'm having a very hard time getting started. Mostly I'm just hoping that someone from Google reads this and will update the documentation because the example won't compile - it looks like it's from some previous version of the SDK because there's an error in every other line. I made my best guess as to what the usage should be, but I keep getting a number of different exceptions. One question I had is whether I can just specify an arbitrary path to the MediaRecorder to start recording or whether I have to create an entry in the content database. The JavaDoc for MediaRecorder.setOutputFile isn't clear on what it's expecting.

View 19 Replies View Related

Android :: What Video / Audio Codec Settings For Playback IOS

Aug 11, 2010

What codec settings will produce valid videos for playback on Android (videoView) and iOS UIWebView)?

View 1 Replies View Related

Android :: Audio Recording From Bluetooth Headset?

Apr 9, 2009

I am developing a recorder application It works fine with Microphone. I want to record from Bluetooth headset. I set it like

my_Aud_Mgr.setMicrophoneMute(true);
//AudioManager my_Aud_Mgr;
my_Aud_Mgr.setBluetoothScoOn(true);

But it cant record from Bluetooth device. How to record from Bluetooth device.

View 2 Replies View Related

Android :: Audio Recording With High Volume

Sep 7, 2009

I will describe briefly my trouble with audio recording.

So, I am doing audio recording using MediaRecorder, but unfortunately when I playback the recorded audio, I have media with a very low volume. I don't here anything (almost anything).

Is there any possibility to setup recording volume?

View 4 Replies View Related

Android :: Recording Direct System Audio?

Nov 9, 2009

Im trying to record audio directly from the system. Using the standard API, you can only record from the MIC or phonecalls, ala: MediaRecorder.Some ways I've tried is to read from /dev/audio and /dev/eac from my app, but I think the sandbox of the app is preventing this.Im thinking about using the NDK, but Im not sure if that would overcome the sandbox aspect ? Ideally, there is some solution outthere to access the audio sub- system directly. Whether it be directly to alsa, to the AudioFlinger, to /dev/eac

View 16 Replies View Related

Android :: Write App To Continuous Audio Recording In Memory

Jan 6, 2010

I'm trying to write an App that continuously record audio in memory (in a circular buffer).

Could anyone point me towards a piece of code (perhaps in the kernel) that shows how to best to this?

View 3 Replies View Related

General :: Extracting Audio From Android Game Or Recording It Somehow Possible?

Jul 7, 2013

I just finished Final fantasy 4 (android), and I wanted to have the remastered soundtracks from it. But on the internet the remastered version is not available yet, I could only find the old soundtracks.

I tried screencast recorder, z screen recorder etc(to record video+audio then extract audio), but they all record audio from the microphone, so that didn't work out. is there a way to extract the audio from the game somehow, or some on screen audio recorder for android devices?

View 4 Replies View Related

HTC Incredible :: Beep During Audio Playback

Jun 28, 2010

Started this morning out of the clear blue. During audio playback (music, internet streaming, etc.) faint beeping sound only in the right headphone. Tried multiple headphones and it is there. EXTREMELY ANNOYING..

Looks like it pops up when the unit is accessing data. WFT?

View 4 Replies View Related

Media :: No Audio On Video Playback

Nov 5, 2010

Just got a Droid Incredible and love the phone so far. I have a problem however playing back video that I recorded. The video comes out fine but there is no audio track. Same happens when I play back on my PC. I have read some forum posts that were similar but none of the solutions offered have worked for me. I have done the following: Played back on phone, WMP, VLC and Quicktime.

View 7 Replies View Related

Android :: Microphone Access / Audio Processing And Recording Simultaneously

Mar 8, 2010

Is it only possible for one object to access the microphone at a time? That is, could I simultaneously use an AudioRecord to do some audio processing and use a MediaRecorder to record the incoming audio?

View 2 Replies View Related

Android :: Bad Sound Quality When Recording / Playing Audio Files

Oct 16, 2010

Hey, I have a problem with android programing when I try to record and then play the file that was just recored. I can both record and play the sound but the quality stinks. Its not just bad is really hard to listen to and sound abit like its a computer generated voice. I use the andriod SDK-emulator. The code that sets up the recording looks like this;

MediaRecorder recorder = new MediaRecorder();
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setOutputFormat(MediaRecorder.OutputFormat.RAW_AMR);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB);
recorder.setOutputFile(path);
recorder.prepare();
recorder.start();

And the code playing the file later looks like this;
MediaPlayer mp = new MediaPlayer(); mp.reset();
mp.setDataSource(path); mp.prepare(); mp.start();
I don't know what part that makes the audio file sound really bad or if its just the emulator that makes it bad and that it would work on a real phone.

View 2 Replies View Related

Android :: Tying To Develop An App For Audio Video Recording On Phone

Dec 21, 2009

I am trying to develop an app which streams live audio/video. I have the mediarecorder to record both audio, video frames , and it does so. But the thing is it records a chunk of audio and then records a chunk of video frames and then records a chunk of audio frames to the file. How do I determine where my audio frames start and where the video frames start?. Also is there any way to figure out the Video frame length ?. Iam really stuck at this point and any help will be greatly appreciated. This is how I initialize the mediarecorder in my app, Code...

View 2 Replies View Related

Android :: Recording Amr Audio And Streaming To HTTP Server In Realtime

Jul 6, 2009

AudioRecord can record audio data in pcm format in realtime, but there is no audio-encoder who can encode pcm data to amr format. may be third-party java code can do this, but the performance may be very low.MediaRecorder just record audio data to disk. not realtime.It seems that this is a real miss-impossible?

View 2 Replies View Related

Android :: Continous Audio Recording In Memory Using Circular Buffer / SDK?

Jan 16, 2010

I'm writing an App that needs to continuously record audio in memory and email the last 30 seconds of audio when required. Much of the mediarecorder API is designed to store linear audio in files. Could anybody point me towards a way to continuously record audio in memory, using a circular buffer using the SDK?

View 2 Replies View Related

Android : Need To Record Audio - Video Recording Files In 3gp / Mp4 Format

Jul 19, 2010

I need to record audio and video files in 3gp/mp4 format at the same file and same time.

When i run my application file is created with videofile.3gp but video does not record in sd card on the emulator.please let me clear one thing does video records on the emulator? if i run this code on android supported device do these error clear.
Please help me. I am new to this topic.please find the code and errors below.

package com.video;

* @copy Rights
* audio.java
* sample code for Eminosoft Developerworks Article
* Android development Team
* www.eminosoft.cm

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import android.app.Activity;
import android.content.ContentResolver;
import android.content.ContentValues;
import android.content.Context;
import android.content.Intent;
import android.media.MediaPlayer;
import android.media.MediaRecorder;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.provider.Settings;
import android.util.Log;
import android.view.View;
import android.widget.Button;

public class video extends Activity {

public MediaRecorder mrec = null;
private Button startRecording = null;
private Button stopRecording = null;
private static final String TAG = "SoundRecordingDemo";
File audiofile;
File video;
private MediaPlayer mMediaPlayer;}

View 2 Replies View Related

Motorola Droid :: Way To Improve Audio Playback?

Jun 17, 2010

Is horrible audio playback just part of the 2.2 leak or is it just me? Kangerade, BB, and the stock 2.2 all have very tinny sounding audio quality regardless of the player used. Anyone else noticed this? Better yet, anyone have a fix?

View 13 Replies View Related

KitKat 4.4 :: Notifications Interrupting Audio Playback?

Apr 3, 2014

On Android 4.3, and playing any type of media such as MP3 or movies, and a text message, e-mail, or any other type of messages is received, unless the phone is actually muted the audio playback is interrupted with a notification. Has that been addressed in KitKat?

I'd like the option to dis-able audio notifications (blinking LED or vibrate is preferred) so the audio experience isn't interrupted.

View 5 Replies View Related

HTC Incredible :: Audio Recording Quality Very Low

May 14, 2010

Voice recorder and all other 3rd party apps record audio like absolute garbage. I am very disappointed. Such an awesome camera and camcorder but it sounds like I am speaking through a damn kazoo. I am dying to know if it's firmware or just cheap hardware, not to sound bitter but the iphone has a SUPER high quality mic being that Incredible just came out I was very surprised at the low quality of the audio recording

View 12 Replies View Related

HTC EVO 4G :: Video Recording In Concerts / Audio Awful?

Sep 20, 2010

I have no problems with the video recording on my Evo it looks amazing but I go to a ton of concerts and such and I love recording them with my Evo but it just sounds Awful, I was wondering if there was any setting to make or change to make the aduio recording sound much better?

View 5 Replies View Related

Motorola Droid :: Audio Playback Using Headphones With Inline Remote

Jun 24, 2010

I have had my Droid since release day, and I am still carrying an iPod Touch as well. My problem is that I keep getting problems with audio playback using headphones with an inline remote. For me, it is absolutely essential to be able to pause/play audio when out and about. People talk to me, I get up to the checkout stand, etc. And, the process of pulling the phone out, swiping it on, getting to the app and pressing pause just won't work. Headphones with inline remotes are the only thing that really work for me.

The problem is that the Droid can't seem to play nicely with these remotes. The volume controls never work at all, and sometimes the pause/play works, sometimes it acts like a skip to the next track. Sometimes it just freaks out and starts cycling through my various audio apps (Listen, Pandora, the stock music app) and then eventually freezes. Has anyone found a workable way to do what I want? I need to be able to pause and play audio while the phone is entirely stashed away.

View 5 Replies View Related

General :: Video Recording Low Audio In Super Jelly Bean

Oct 1, 2013

i've installed super jelly bean its awsome but video recording volume is very very low.

View 2 Replies View Related

Android :: PV MediaRecorder Native Video Recording Error

Aug 7, 2010

Dear PV engineer: I have try several days for this. We want to add video conference function in PV opencore, so we need to create video capture node in native mode, I try the following code to capture video, My code is like this:

CODE:......................

View 2 Replies View Related

Samsung Moment :: Recording Videos Can't Get Audio To Work / When Saving Video On Computer

Sep 3, 2010

The audio/video works perfectly if I watch the recording on my phone, but when I email the video to my gmail account and save it to my computer, it opens in Media Player and there's no sound. Does anyone know how to fix this?

View 1 Replies View Related

Android :: Video Recording / Source And Encoder Giving Error

Nov 18, 2009

When I add video source and video encoder, it gives error in recoreder.prepare() (prepare failed) while the same code is working only for audio. I am not finding what I am doing wrong.

setContentView(R.layout.camera);
preview=(SurfaceView)findViewById(R.id.surface);
previewHolder=preview.getHolder(); previewHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
recorder = new MediaRecorder();
String url = "/sdcard/dcim/test.3gp";
camera = Camera.open();
Camera.Parameters parameters = camera.getParameters();
parameters.setPreviewSize(352, 288);
parameters.set("orientation", "portrait");
camera.setParameters(parameters);
recorder.setAudioSource(MediaRecorder.AudioSource.MIC); recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setOutputFile(url);
recorder.setVideoFrameRate(15);
recorder.setVideoSize(480, 320);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_NB); recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
recorder.prepare(); recorder.start(); Thread.sleep(100000);
recorder.stop(); recorder.release();
} catch (Exception e) { e.getMessage(); }

View 3 Replies View Related

Android :: How To Improve Android Audio Recording Quality?

Sep 17, 2009

Is there any possibility to make audio recording with higher quality? And how can I read information that User is saying something? In Audio Recording application you can see such indicator (I don't know the right name for it.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved