Fixed module loading (again), only audio tx works for now

This commit is contained in:
furrtek
2016-04-28 14:59:14 +02:00
parent 2fcfdba9ea
commit d55a420dfd
64 changed files with 1400 additions and 879 deletions
+29 -24
View File
@@ -29,39 +29,44 @@ namespace demodulate {
class AM {
public:
buffer_s16_t execute(
buffer_c16_t src,
buffer_s16_t dst
buffer_f32_t execute(
const buffer_c16_t& src,
const buffer_f32_t& dst
);
private:
static constexpr float k = 1.0f / 32768.0f;
};
class SSB {
public:
buffer_f32_t execute(
const buffer_c16_t& src,
const buffer_f32_t& dst
);
private:
static constexpr float k = 1.0f / 32768.0f;
};
class FM {
public:
/*
* angle: -pi to pi. output range: -32768 to 32767.
* Maximum delta-theta (output of atan2) at maximum deviation frequency:
* delta_theta_max = 2 * pi * deviation / sampling_rate
*/
constexpr FM(
const float sampling_rate,
const float deviation_hz
) : z_ { 0 },
k { static_cast<float>(32767.0f / (2.0 * pi * deviation_hz / sampling_rate)) }
{
}
buffer_s16_t execute(
buffer_c16_t src,
buffer_s16_t dst
buffer_f32_t execute(
const buffer_c16_t& src,
const buffer_f32_t& dst
);
void configure(const float sampling_rate, const float deviation_hz) {
k = static_cast<float>(32767.0f / (2.0 * pi * deviation_hz / sampling_rate));
}
buffer_s16_t execute(
const buffer_c16_t& src,
const buffer_s16_t& dst
);
void configure(const float sampling_rate, const float deviation_hz);
private:
complex16_t::rep_type z_;
float k;
complex16_t::rep_type z_ { 0 };
float kf { 0 };
float ks16 { 0 };
};
} /* namespace demodulate */