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?

Android :: Continous Audio recording in memory using circular buffer / SDK?


Android :: How To Continuously Record In Memory Using A Circular Buffer

Dec 24, 2009

I'm trying to use the Media Recorder to have my application continuously record audio in memory (to a circular buffer of a known size). Indeed, I'd like to be able to play back the past 10 seconds of recorded based on a certain event in my program. Much of the Media API is designed to linearly record audio to a file. Has anyone an idea on how I could best do this with or without the default API?

View 2 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

Android :: How To Capture Audio Data From Mic Into A Buffer?

Sep 24, 2009

I am working on a packet switched network. I want to capture the audio data from mic into a buffer at a desired sample rate.How can I capture the audio data from mic into a buffer instead of a file? Also how can I control the audio capture rate as per the desired sample rate?

View 2 Replies View Related

Android :: Buffer Size For Audio Track

Jun 17, 2009

This may be impossible but is there any way that I can get a smaller buffer size for AudioTrack than what is provided by getMinBufferSize method?

This is how I am instantiating AudioTrack right now: SR = 44100; bufSize = AudioTrack.getMinBufferSize(SR, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT); audioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, SR, AudioFormat.CHANNEL_CONFIGURATION_MONO, AudioFormat.ENCODING_PCM_16BIT, bufSize, AudioTrack.MODE_STREAM);

With sample rate of 44100, getMinBufferSize always returns 4800. If I try to make the buffer size smaller than 4800 then I get the following error message: E/AudioTrack( 318): Invalid buffer size: minFrameCount 1200, frameCount 600 E/AudioTrack-JNI( 318): Error initializing AudioTrack E/AudioTrack-Java( 318): [ android.media.AudioTrack ] Error code -20 when initializing AudioTrack. D/AndroidRuntime( 318): Shutting down VM W/dalvikvm( 318): threadid=3: thread exiting with uncaught exception (group=0x4000fe70) E/AndroidRuntime( 318): Uncaught handler: thread main exiting due to uncaught exception I/CheckinService( 59): From server: Intent { action=android.server.checkin.FOTA_CANCEL } E/AndroidRuntime( 318): java.lang.RuntimeException: Unable to start activity Does anyone has any ideas how to over come this problem?

View 2 Replies View Related

Android :: Java.lang.OutOfMemoryError On Audio Buffer

Mar 4, 2010

I am currently trying to create an Android application that loops Audio from the mic to the earpiece, I can do that perfectly but when I do it over and over again in my application I eventually get an Out Of Memory Error.

Here is the code I use to create the Audio Loop:

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

And here is the error I get:

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

So the Error specifically focuses on this line in the code

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

And it happens after I try to do the Loop several times, so say I start the application and after 10 times starting the loop I get the error.

So I think the buffer is simply becomiing full or something?? Is that correct? If so how would I keep clearing out the buffer?

View 1 Replies View Related

Android :: Invalid Audio Buffer Size On Samsung Galaxy

Nov 14, 2009

The following works fine on a G1 but gives an error on the Samsung Galaxy. I was hoping cross-platform support would be better than this. See error below.

private final static int RATE = 44100; private final static int CHANNEL_MODE = AudioFormat.CHANNEL_CONFIGURATION_MONO; private final static int ENCODING = AudioFormat.ENCODING_PCM_16BIT; private AudioRecord recorder_; public boolean open() { int bufferSize = 4 * AudioRecord.getMinBufferSize(RATE, CHANNEL_MODE, ENCODING); recorder_ = new AudioRecord(AudioSource.MIC, RATE, CHANNEL_MODE, ENCODING, bufferSize);

last line gives the following on the Samsung Galaxy phone: 11-14 19:04:07.507: ERROR/AndroidRuntime(7617): java.lang.IllegalArgumentException: Invalid audio buffer size.

View 5 Replies View Related

Android :: How To Record Audio From Mic In Raw Pcm Format Into A Buffer Using Native Libraries Directly

Oct 9, 2009

My application cannot handle the JNIE overhead, as I need to make 2 JNIE calls to the native C/C++ code for every 20msec. So I am trying to use the native media libraries and the realted C/C++ files provided by Android in the folder "//external/srec/audio/test" of the donut build. Ex. AudioHardwareRecord, AudioInRecord etc.. I am implementing all the calls in the native layer.

I am using the sampling rate as 8000 and want to read 160 samples (320 bytes) at a time.

I used the following values to create the AudioRecord..

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

It says "success" after creating this interface but I am getting the error "Bad Value" if I am doing the InitCheck.

And it is crashing once I start reading the samples or if I try to retrieve the configured sampling rate.

Has anybody tried to access this native code?

View 4 Replies View Related

Android :: Bitmaps And Out Of Memory Error (Allocating Back Buffer)

Sep 2, 2010

We are also having occasional problems with OutOfMemory errors in createBitmap. It tends to happen after a few orientation changes when we are allocating the backbuffers. I have made it so that it calls recycle() on the old bitmaps (if any exist) and does a System.gc() before allocating the new backbuffers. What we are doing is allocating a backbuffer that is twice the width and height of the screen so that we can quickly zoom in and out.

With a 854x480 screen this would presumably be 6.25MB in size. The problem as I see it is the 16 or 24MB maximum heap size per process. This is unreasonably small, especially on devices that have 512MB of RAM. Ideally the max heap size should be something like 64MB, or perhaps allow apps to request a larger heap size from the user.

View 14 Replies View Related

Samsung Moment :: Custom Kernel - Partial Audio Buffer And Optimizations

Dec 29, 2009

Don't know if anyone over here cares, but zefie over on SamsungMomentForum.com released a custom kernel with a bunch of fixes. Including a partial audio buffer fix, and a bunch of tweaks and optimizations. Also, persistent root so you can run a bunch of those programs on the market that require it. No WiFi tethering yet, but it is being worked on. Not sure if this includes the battery notification fix because I had already installed CL14 the other day and it's been working for me ever since. This was not difficult to install, once you have the software and drivers required, the update takes less than 30 seconds.

Here's a link:
Time for the first custom "ROM" (well kernel)

View 19 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 :: 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 :: 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?

View 3 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

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

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 : 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

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

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

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

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 :: 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

Android :: Audio File Out Of Memory Exception On Sd Card

Jan 26, 2009

I am downloading a audio file from server on sd card. It is showing me OutOfMemoryException. This is my code.. --------------------------- package com.android;

import java.io.BufferedInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.net.URL; import java.net.URLConnection;.....................

View 4 Replies View Related

LG Ally :: Move Audio Files From SDcard To Internal Memory?

Sep 24, 2010

Is there any way that you can move files such as audio files to the internal memory without using a custom ROM? I'd like to transfer a notification alert sound from my SD card an put it on the phone itself.

View 11 Replies View Related







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