reduced value buffer size to 2 seconds

just enough to decode scottie DX from sync to sync:

5x 345.6ms color scans =  1728.0ms
2x 9.0ms sync pulses = 18.0ms
4x 1.5ms porches = 6.0ms

1752.0ms total
This commit is contained in:
Ahmet Inan 2015-01-02 19:43:12 +01:00
parent 80eabf5acb
commit 7a7d535165

View file

@ -103,7 +103,7 @@ public class ImageView extends SurfaceView implements SurfaceHolder.Callback {
audio = new AudioRecord(audioSource, sampleRate, channelConfig, audioFormat, audioBuffer.length * 2);
audio.startRecording();
int minValueBufferLength = 3 * sampleRate;
int minValueBufferLength = 2 * sampleRate;
int valueBufferLength = Integer.highestOneBit(minValueBufferLength);
if (minValueBufferLength > valueBufferLength)
valueBufferLength <<= 1;