[android-developers] Re: Invalid Audio Buffer Size on Samsung Galaxy

2009-11-16 Thread TonyDoc
Add you bug to the list over at androidforums.com, samsung seem to
have a dreadful android/galaxy support team.

On Nov 15, 4:55 pm, joelt j...@harpsoft.com wrote:
 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] Re: Invalid Audio Buffer Size on Samsung Galaxy

2009-11-16 Thread niko20
I hope you are bothering to check for ERROR_BAD_VALUE from the
getMinBufferSize, you can use this to determine if the hardware
supports the settings you want or not.

As far as cross-platform, this is still one of the valid reasons to
check the error codes, I don't think it's possible for us to say all
devices should support all formats, it just common sense.

-niko

On Nov 16, 3:31 pm, TonyDoc tony...@gmail.com wrote:
 Add you bug to the list over at androidforums.com, samsung seem to
 have a dreadful android/galaxy support team.

 On Nov 15, 4:55 pm, joelt j...@harpsoft.com wrote:



  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] Re: Invalid Audio Buffer Size on Samsung Galaxy

2009-11-15 Thread joelt
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] Re: Invalid Audio Buffer Size on Samsung Galaxy

2009-11-14 Thread joelt
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