Fixed LCR and Xylos transmitters

This commit is contained in:
furrtek
2016-05-09 20:42:20 +02:00
parent d55a420dfd
commit d40016ffda
39 changed files with 1614 additions and 151 deletions
+1 -55
View File
@@ -23,63 +23,9 @@
#include "proc_audiotx.hpp"
#include "portapack_shared_memory.hpp"
#include "sine_table.hpp"
#include "audio_output.hpp"
#include "lfsr_random.hpp"
#include <cstdint>
uint32_t lfsr(uint32_t v) {
enum {
length = 31,
tap_0 = 31,
tap_1 = 18,
shift_amount_0 = 12,
shift_amount_1 = 12,
shift_amount_2 = 8
};
const lfsr_word_t zero = 0;
v = (
(
v << shift_amount_0
) | (
(
(v >> (tap_0 - shift_amount_0)) ^
(v >> (tap_1 - shift_amount_0))
) & (
~(~zero << shift_amount_0)
)
)
);
v = (
(
v << shift_amount_1
) | (
(
(v >> (tap_0 - shift_amount_1)) ^
(v >> (tap_1 - shift_amount_1))
) & (
~(~zero << shift_amount_1)
)
)
);
v = (
(
v << shift_amount_2
) | (
(
(v >> (tap_0 - shift_amount_2)) ^
(v >> (tap_1 - shift_amount_2))
) & (
~(~zero << shift_amount_2)
)
)
);
return v;
}
void AudioTXProcessor::execute(const buffer_c8_t& buffer){
for (size_t i = 0; i<buffer.count; i++) {
@@ -91,7 +37,7 @@ void AudioTXProcessor::execute(const buffer_c8_t& buffer){
aphase += 90000;
//FM
frq = sample * 2500;
frq = sample * 1000;
phase = (phase + frq);
sphase = phase + (256<<16);