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.

Android :: Invalid audio buffer size on Samsung Galaxy


ADVERTISEMENT

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

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 :: System Log Buffer Size

Feb 11, 2009

I have the following problem: I'd like to see the system log of two days ago and I cannot. I see only 3 last hours. How can I configure the system log size, location, severity?

View 6 Replies View Related

Android :: Any Way To Change LogCat Buffer Size?

Jan 30, 2010

Is there a way to change how big the logcat buffer is? or how much is buffered back? Especially when using DDMS.

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 :: Buffered Input Stream Buffer Size

Jul 5, 2010

I use BufferedInputStream in my code: socket = new Socket(ip, Integer.parseInt(port)); socket.setReceiveBufferSize(64000); output = socket.getOutputStream(); input = new BufferedInputStream(socket.getInputStream(), 64000); I read incoming packets like this: if (input.available() != 0) { System.out.println("Get Packet: " + input.available() + " bytes"); byte[] b = new byte[input.available()]; input.read(b); incParser(b); }

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 :: 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 :: Dalvik Message - Default Buffer Size Used In BufferedInputStream Constructor

Aug 17, 2010

When I used BufferedInputStream and I specify a buffer size, Dalvik gives me this warning - Default buffer size used in BufferedInputStream constructor. It would be better to be explicit if an 8k buffer is required.
But right now, my buffer size is already at 8k. What am I doing wrong?

View 1 Replies View Related

Android :: Change Internal Buffer Size Of Data Input Stream

Apr 1, 2010

I'm using this kind of code for my TCP/IP connection:

sock = new Socket(host, port);
sock.setKeepAlive(true);
din = new DataInputStream(sock.getInputStream());
dout = new DataOutputStream(sock.getOutputStream());

Then, in separate thread I'm checking din.available() bytes to see if there are some incoming packets to read. The problem is, that if a packet bigger than 2048 bytes arrives, the din.available() returns 2048 anyway. Just like there was a 2048 internal buffer. I can't read those 2048 bytes when I know it's not the full packet my application is waiting for. If I don't read it however - it'll all stuck at 2048 bytes and never receive more. Can I enlarge the buffer size of DataInputStream somehow? Socket receive buffer is 16384 as returned by sock.getReceiveBufferSize() so it's not the socket limiting me to 2048 bytes. If there is no way to increase the DataInputStream buffer size - I guess the only way is to declare my own buffer and read everything from DataInputStream to that buffer?

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

Samsung Galaxy S :: Audio Codecs /can't Hear Any Audio

Jun 28, 2010

I have a 720p video that I am trying to play on GS. The image is amazing by the way. But I can't hear any audio (works fine on my PC). Anything wrong with the audio codec used?

View 7 Replies View Related

Android :: Uploading Apps To Market Invalid Icon Image Size

Mar 5, 2010

I'm trying to upload my first application, but when I select the apk file, I get the following message:

The icon for your application is not valid. Please use a 48x48 PNG.

The file was created in Fireworks, and is a 48x48 24 bit image named appicon.png.

Anyone know of any reason why I would still get this message?

View 1 Replies View Related

General :: Which Video Players Allow To Set Network Buffer Cache By Size And Time

Dec 26, 2012

The closest I know of are mxplayer and vplayer. Any xda alternatives people know of?

View 2 Replies View Related

Samsung Galaxy S :: Max SD Card Size On Galaxy?

Jul 17, 2010

All the specs posted on the blogs say the galaxy phones are "expandable to 32GB". Does this mean you can add 16GB card to get a total of 32GB, or that you can add 32GB for a total of 48GB? The way it's been worded on all the sites I get the impression that the max SD card you can put in is 16GB but that seems silly. Can anyone confirm? I'm looking at the US versions, most likely the AT&T Captivate.

View 2 Replies View Related

Android :: Unable To Set Camera Picture Size On Samsung Galaxy

Jan 25, 2010

As title - having tried everything I could find already suggested, I've completely run out of options. I'm unable to set the picture size taken by the camera on the Samsung Galaxy.

I don't set preview size anywhere and I've tried the ShutterCallback trick. On checking the camera parameters before and after attempting to change the size, I get the correct results - the camera *reports* that its size has now been changed... however, the size of the byte array I'm receiving in the onPictureTaken() callback is only consistent with the camera's default (enormous) image - and forces an OutOfMemoryError when I attempt to decode it into a bitmap!

It looks like I'm having a similar issue to this user: http://groups.google.com/group/android-developers/browse_thread/threa... - but unfortunately it looks like no solution was found then, either :

View 3 Replies View Related

Android :: Camera Picture Size On Samsung I7500 Galaxy

Oct 28, 2009

No matter what I do I cannot make the final camera image be smaller than the gigantic 5MP which effectively crashes the poor old BitmapFactory.

The ShutterCallback trick is in use. Does somebody have some other ideas?

Boy, it feels like going all the way back to J2ME.

View 3 Replies View Related

Samsung Galaxy S :: RAM Size After FROYO Update

Nov 29, 2010

Recently i have updated my galaxy S to Froyo, but after update the RAM size shown as 304 MB only, something fishy..http://www.androidforums.com/images/smilies/confused.gif

View 1 Replies View Related

Samsung Galaxy S :: How To Enlarge Size Of Pics?

Sep 9, 2010

I got problem after transfer some pics from PC to Galaxy S, pics size less than 1.2 mb approximately can be displayed in the gallery but more than that size appear as a small black spot.

View 2 Replies View Related

Samsung Galaxy S :: Wallpaper Size In Phone?

Sep 1, 2010

I want to download an image onto my Samsung Galaxy S to display as a wallpaper. What are the dimensions for my image that would properly show on the screen.

View 1 Replies View Related

Samsung Galaxy S :: Audio Out Of Sync / Fix It?

Nov 29, 2010

Has anyone else noticed that audio and video aren't in sync? Or is it just my phone?! Literally, in every video i play audio is a fraction of a second out of sync when compared to video. Tried with 720p, brrips 720p, dvdrips, and even ordinary hdtvrips, and it happens in every single one of them. Also happens when playing some games, or even when i'm playing 720p video that i recorded minutes ago. I'm currently using Doc's XWJPA, and previously have been using stock XWJPA. Same thing happened on both.
Has anybody else experienced something like that, and how to fix it?

View 2 Replies View Related

Samsung Galaxy S :: Take Wallpaper Back To Full Size?

Sep 15, 2010

I am new to the android phone and have a Galaxy. For some reason my live wallpaper has reduced from the full size to a fraction on my screen. Does anyone know how I can take it back to the full size please?

View 2 Replies View Related

Samsung Galaxy S :: Restrict Size Of Email In Phone?

Aug 28, 2010

Restrict size of email in Samsung Galaxy S. It's night mare to download 1 MB of emails in Delhi where there is no 3G yet.

View 2 Replies View Related

Samsung Galaxy S :: Audio Versus IPod

Jul 24, 2010

How the Samsung Galaxy S (UK version) compares to the iPod (or iPhone of course) in terms of music playback (through headphones)?

I listen to a lot of music, and just had a really bad experience with the HTC Desire (lots of hiss and network interference).

The Samsung S looks the business, but poor audio will be a deal breaker when it comes to moving from my iPhone 3G.

View 22 Replies View Related

Samsung Galaxy S :: Audio In Video Is Not Working

Nov 22, 2010

This video is working perfectly on my Samsung Galaxy S Vibrant stock video player, however the audio is not working at all, can somebody please point out why? im a noob with all these codecs and stuff and dont know what the SGS can play and cant

View 3 Replies View Related

Samsung Galaxy S :: Audio Mono Setting

Aug 19, 2010

I am looking for a software solution to get mono sound into my earphone. (I am deaf in one ear and thus missing one channel) I could buy a stereo->mono plug or I could buy this 'Super BT Mono Pro' app for $ 6,-. But shouldn't this be a normal setting in such a hightech Android phone? Or an app setting like the VLC desktop player has a mono option. The Super BT Mono Pro app shows it is possible, but I wan't to do it myself. Is it a setting in de Service Mode Menu or will it be an new option in Android 3.0?

View 2 Replies View Related

General :: Samsung Galaxy Fit S5670 - Changing Size Of Icons?

Jan 4, 2013

I wanted to change the size of my icons, so that more of them could fit on the screen. So I download LCD Density Modder and Increased the amount to 160. After I booted my phone, my screen got zoomed in instead of decreasing. Now I cant even type up my password cause the numbers can't fit in the screen. I have no access to my phone because my phone is locked. Btw, I have a Samsung Galaxy Fit S5670 (rooted) .

View 4 Replies View Related

General :: Samsung Galaxy S3 ICS - How To Change Font / Text Size

Jul 3, 2012

Just moved from iPhone to Galaxy S3 ICS. The Email app has no place to change the font/text size and it is HUGE. Like so huge I can read the text 6 feet away, that is not an exageration. I need to shirink this by at least 50%,

View 2 Replies View Related

Samsung Galaxy S :: Audio Output Could Be Louder - Any Way To Increase Max

Sep 1, 2010

Fine for using headphones but I plug mine into aux on my car radio. Could be louder to be honest. Just wondered if there was any way to increase the max volume output?

View 3 Replies View Related







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