kopia lustrzana https://github.com/sh123/codec2_talkie
Soundmodem optimizations
rodzic
3d7a186b79
commit
209e11406a
|
@ -177,7 +177,7 @@ public class Hdlc implements Protocol {
|
|||
ByteBuffer hdlcBitBuffer = ByteBuffer.allocate(dataBytesAsBits.length + 8*_prefixSymCount + 8*10);
|
||||
hdlcBitBuffer.put(genPreamble(_prefixSymCount));
|
||||
hdlcBitBuffer.put(dataBytesAsBits);
|
||||
hdlcBitBuffer.put(genPreamble(10));
|
||||
hdlcBitBuffer.put(genPreamble(1));
|
||||
|
||||
// return
|
||||
hdlcBitBuffer.flip();
|
||||
|
|
|
@ -59,8 +59,8 @@ public class SoundModem implements Transport, Runnable {
|
|||
|
||||
private final RigCtl _rigCtl;
|
||||
private Timer _pttOffTimer;
|
||||
private boolean _isPttOn = false;
|
||||
private int _pttOffDelayMs = 1000;
|
||||
private boolean _isPttOn;
|
||||
private int _pttOffDelayMs;
|
||||
|
||||
public SoundModem(Context context) {
|
||||
_context = context;
|
||||
|
@ -205,7 +205,7 @@ public class SoundModem implements Transport, Runnable {
|
|||
}
|
||||
}
|
||||
} else {
|
||||
_systemAudioPlayer.write(_playbackAudioBuffer, 0, bitBufferTail.length * _samplesPerSymbol);
|
||||
_systemAudioPlayer.write(_playbackAudioBuffer, 0, _playbackAudioBuffer.length);
|
||||
}
|
||||
pttOff();
|
||||
return 0;
|
||||
|
|
Ładowanie…
Reference in New Issue