kopia lustrzana https://github.com/sh123/codec2_talkie
Increase buffer size
rodzic
313ecc5e7b
commit
a6d4283622
|
@ -68,7 +68,7 @@ public class SoundModemBase implements Runnable {
|
||||||
Log.e(TAG, "Failed to initialize RigCtl");
|
Log.e(TAG, "Failed to initialize RigCtl");
|
||||||
}
|
}
|
||||||
|
|
||||||
_recordAudioSampleBuffer = ShortBuffer.allocate(_isLoopback ? 1024*100 : 1024*10);
|
_recordAudioSampleBuffer = ShortBuffer.allocate(1024*100);
|
||||||
|
|
||||||
if (!disableRx && !_isLoopback)
|
if (!disableRx && !_isLoopback)
|
||||||
new Thread(this).start();
|
new Thread(this).start();
|
||||||
|
@ -142,6 +142,7 @@ public class SoundModemBase implements Runnable {
|
||||||
_recordAudioSampleBuffer.put(sample);
|
_recordAudioSampleBuffer.put(sample);
|
||||||
} catch (BufferOverflowException e) {
|
} catch (BufferOverflowException e) {
|
||||||
// user is probably transmitting and cannot consume, just discard
|
// user is probably transmitting and cannot consume, just discard
|
||||||
|
e.printStackTrace();
|
||||||
_recordAudioSampleBuffer.clear();
|
_recordAudioSampleBuffer.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue