Skip to content
Snippets Groups Projects
Commit 53be0832 authored by Stephen D's avatar Stephen D
Browse files

drop to 48khz

parent 8f5c1a71
Branches master
No related tags found
1 merge request!2integrate codec2 fsk demodulator.
...@@ -2,13 +2,16 @@ use std::collections::VecDeque; ...@@ -2,13 +2,16 @@ use std::collections::VecDeque;
const MODE_M_MAX: usize = 4; const MODE_M_MAX: usize = 4;
const M: i32 = 2; const M: i32 = 2;
const N_SYM: i32 = 50;
#[link(name = "fsk", kind = "static")] #[link(name = "fsk", kind = "static")]
extern "C" { extern "C" {
fn fsk_create( fn fsk_create_hbr(
Fs: libc::c_int, Fs: libc::c_int,
Rs: libc::c_int, Rs: libc::c_int,
M: libc::c_int, M: libc::c_int,
P: libc::c_int,
n_sym: libc::c_int,
f1_tx: libc::c_int, f1_tx: libc::c_int,
tone_spacing: libc::c_int, tone_spacing: libc::c_int,
) -> *mut InternalFsk; ) -> *mut InternalFsk;
...@@ -99,9 +102,9 @@ pub struct Fsk<I: Iterator<Item = Complex>> { ...@@ -99,9 +102,9 @@ pub struct Fsk<I: Iterator<Item = Complex>> {
impl<I: Iterator<Item = Complex>> Fsk<I> { impl<I: Iterator<Item = Complex>> Fsk<I> {
pub fn new(iq_iter: I) -> Self { pub fn new(iq_iter: I) -> Self {
const FS: i32 = 9600 * 8; const FS: i32 = 9600 * 5;
let internal = unsafe { fsk_create(FS, 9600, M, -1, 0) }; let internal = unsafe { fsk_create_hbr(FS, 9600, M, 5, N_SYM, -1, 0) };
let fsk_lower = -FS / 2; let fsk_lower = -FS / 2;
let fsk_upper = FS / 2; let fsk_upper = FS / 2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment