[android-developers] Re: Invalid Audio Buffer Size on Samsung Galaxy
Further analysis reveals it only supports an 8k sampling rate. This is obviously a bug. Where do I file a bug report against the Samsung phone? On Nov 14, 9:49 pm, joelt j...@harpsoft.com wrote: It is also spitting this out: WARN/AudioHardwareMSM72XX(1018): getInputBufferSize bad sampling rate: 44100 Is there an API that will tell me which rates it _does_ support? It doesn't look like it. On Nov 14, 8:57 pm, joelt j...@harpsoft.com wrote: 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. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Invalid Audio Buffer Size on Samsung Galaxy
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. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Invalid Audio Buffer Size on Samsung Galaxy
It is also spitting this out: WARN/AudioHardwareMSM72XX(1018): getInputBufferSize bad sampling rate: 44100 Is there an API that will tell me which rates it _does_ support? It doesn't look like it. On Nov 14, 8:57 pm, joelt j...@harpsoft.com wrote: 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. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Samsung Galaxy --- How to debug?
I have a user that says my application gives him an error on the Samsung Galaxy (it works fine one the G1). How can I debug this issue? Is there an accurate emulator/simulator? Can someone try it (Bendometer is the app)? Joel -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Floating Point Support -- Determine at runtime?
I have an algorithm that really runs too slow (on a G1) when in floating point mode, but using integers it runs fine, although the precision would be preferable from the float version, as it makes the UI look crisper. Joel On Oct 21, 1:23 pm, fadden fad...@android.com wrote: On Oct 21, 11:20 am, fadden fad...@android.com wrote: On Oct 20, 6:11 pm, joelt j...@harpsoft.com wrote: One approach is to read /proc/cpuinfo and look for vfp on the Features line. I should probably ask: what is it you're trying to accomplish? And should note: scanning for vfp will work for the current batch of ARM devices, but might get the wrong answer on future devices. You might be better off taking FP and non-FP implementations of an interesting algorithm, running them 10,000 times, and checking how long they take to execute. So long as you don't get unlucky interference from other processes, this should tell you what you really want to know: which approach is faster on the current device. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Floating Point Support -- Determine at runtime?
Is there a way to determine if the system supports floating point? That way, I could choose between two algorithms to use. Joel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Menu button goes to Preferences - Cool?
I'm thinking it would be handier if my in my app, a press on the menu button went straight to my preferences page. I currently have in my menu two choices: settings and about. About will almost never be used. I was thinking of putting it in preferences and simply have a menu button press go straight to preferences. Is that considered bad Android design? If not, how would I accomplish it? Joel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Audio Stream from currently playing song
I can capture an audio stream from the mic, but can I capture the currently playing audio stream? Thanks, Joel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Relaunching an Android App / Stability
I have an application that launches a thread for drawing a SurfaceView. If I leave the application using the home or back button, I get an onPause event where I put the thread in a wait state. In my onResume I wake the thread back up. However, if I relaunch the app, I never get an onResume event and the application freezes up (I have to do a Force Quit on the app). Its not clear to me whether I am starting a new instance of the activity or if it should be waking up the old app. If its launching a new App, I don't understand why it locks up, and if its waking up the old one, why isn't it calling onResume? I've tried changing the activity to be singleTask/singleInstance, but it seems to have no effect. Any ideas what might be happening? The activity life-cycle makes sense, but its not clear to me what effect relaunch has. Joel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Installing USB Driver for G1
I am having trouble getting the proper USB ADB driver for the G1 installed. Windows seems to have already decided which driver it should use. I've tried updating the driver, but the Windows wizard has decided that it knows better to use the existing driver. could not find a better match for your hardware that the software you currently have installed The driver points to files in the Windows directory: \windows\system32\DRIVERS\disk.sys \windows\system32\drivers\PartMgr.sys \windows\system32\drivers\Shockprf.sys I got to think these are the wrong files, they are the files that come with the USB driver as downloaded here. Is there anyway I can force it to use the proper files? I have tried uninstalling the current driver, but as soon as I plug in it goes back to the same driver... UGH!!! Help please, Joel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Scale font/typeface to fit
I have a box of known size and want to fill it with text (actually just one character. What's the proper code? I found this code for Swing, but haven't figured out the Android equivalent: http://www.java-forums.org/awt-swing/19053-draw-string-rectangle.html Joel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---