[AC-2268] Using Codeboxed module.. need Sampling Bitrate optimization
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Not Our Bug |
Resolution Date | 2013-04-01T21:17:56.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | Android,, Bitrate, codeboxed, recording |
Reporter | Prashant Sheth |
Assignee | Shak Hossain |
Created | 2012-10-11T18:06:27.000+0000 |
Updated | 2016-03-08T07:41:16.000+0000 |
Description
We are initiating a wav recording with the 8000Kpbs sampling rate. However the file size produced from this is too large (300KB) for the performance of the app. We need to be able to try 4000 and then 8000. But 4000 fails on some phones. In Native Android, there's a "minBufferSize" approach that provides the MinBufferSize, but this is not available to us in Titanium. How do we determine a device's minBuffersize that we can use?
This is the code we are using in Codeboxed that fails.
var recording = audioRecorder.createAudioRecord({
fileName : 'test1',
//sampleRate : _OBJ.SUPPORTED_SAMPLE_RATE[count],
sampleRate : 4000,
audioEncoding : 16,
audioChannel : 'STEREO',
audioSource : 'MIC',
audioFormat : 'WAV'
});
try {
recording.start();
startAnimation();
} catch(e) {
recording.sampleRate = 8000;
recording.start();
startAnimation();
}
This does't seem to catch the exception at 4000 and we get an "Exceeded Buffer Size" exception.
Please contact the module developer about issues and features with their module: https://marketplace.appcelerator.com/apps/1215?347726402#support