kopia lustrzana https://github.com/sh123/codec2_talkie
Tuning modulator
rodzic
dd9ec9a08f
commit
f6ccd3d0fb
|
@ -28,7 +28,7 @@ public class SoundModem implements Transport, Runnable {
|
|||
private static final String TAG = SoundModem.class.getSimpleName();
|
||||
|
||||
// NOTE, codec2 library requires that sample_rate % bit_rate == 0
|
||||
public static final int SAMPLE_RATE = 24000;
|
||||
public static final int SAMPLE_RATE = 19200;
|
||||
|
||||
private final String _name;
|
||||
|
||||
|
@ -212,7 +212,7 @@ public class SoundModem implements Transport, Runnable {
|
|||
if (_isLoopback) {
|
||||
synchronized (_sampleBuffer) {
|
||||
if (_sampleBuffer.position() / 2 >= nin) {
|
||||
Log.i(TAG, "nin: " + nin + ", pos: " + _sampleBuffer.position() / 2);
|
||||
//Log.i(TAG, "nin: " + nin + ", pos: " + _sampleBuffer.position() / 2);
|
||||
_sampleBuffer.flip();
|
||||
for (int i = 0; i < nin; i++) {
|
||||
_recordAudioBuffer[i] = _sampleBuffer.getShort();
|
||||
|
|
|
@ -60,7 +60,7 @@ namespace Java_com_ustadmobile_codec2_Codec2 {
|
|||
struct ContextFsk *conFsk;
|
||||
conFsk = (struct ContextFsk *) malloc(sizeof(struct ContextFsk));
|
||||
struct FSK *fsk;
|
||||
fsk = fsk_create_hbr(sampleFrequency, symbolRate, MODE_2FSK, 10, FSK_DEFAULT_NSYM, toneFreq, toneSpacing);
|
||||
fsk = fsk_create_hbr(sampleFrequency, symbolRate, MODE_2FSK, 8, FSK_DEFAULT_NSYM, toneFreq, toneSpacing);
|
||||
conFsk->fsk = fsk;
|
||||
|
||||
conFsk->Nbits = fsk->Nbits;
|
||||
|
|
Ładowanie…
Reference in New Issue