sysnetlab / SensorDataCollector

Android sensor data collector that collects sensor or pseudo-sensor data.
GNU General Public License v3.0
5 stars 2 forks source link

audo record parameters obtained from first pass not valid #111

Closed graychan closed 10 years ago

graychan commented 10 years ago

The app uses a trial-and-error approach to discover valid parameters to initialize AudioRecord. On some platforms, the parameters obtained from the first scan becomes strangely invalid in a later use, such as on a device below,

Perhaps, this could be solved by scanning a second time on the obtained parameters. The second scan would prune the parameters invalid in the second scan.

graychan commented 10 years ago

This baffles me greatly. At present, I do a second pass on the valid parameters obtained from previous probe and remove the failed ones. I got an impression that whether a parameter (e.g., source, format, channel, sample rate, or buffersize) is valid also depends on the parameter tried previously. I suspect that this is a result of some bugs in the AudioRecord object itself (most likely, the JNI implementation in Android or even the device driver).