mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
More tweaks to pass buffers by reference.
144 bytes less code!
This commit is contained in:
parent
778e2d2381
commit
05a1c22426
@ -31,8 +31,8 @@ namespace dsp {
|
||||
namespace demodulate {
|
||||
|
||||
buffer_s16_t AM::execute(
|
||||
buffer_c16_t src,
|
||||
buffer_s16_t dst
|
||||
const buffer_c16_t& src,
|
||||
const buffer_s16_t& dst
|
||||
) {
|
||||
/* Intermediate maximum value: 46341 (when input is -32768,-32768). */
|
||||
/* Normalized to maximum 32767 for int16_t representation. */
|
||||
@ -78,8 +78,8 @@ static inline float angle_precise(const complex32_t t) {
|
||||
}
|
||||
|
||||
buffer_s16_t FM::execute(
|
||||
buffer_c16_t src,
|
||||
buffer_s16_t dst
|
||||
const buffer_c16_t& src,
|
||||
const buffer_s16_t& dst
|
||||
) {
|
||||
auto z = z_;
|
||||
|
||||
|
@ -30,16 +30,16 @@ namespace demodulate {
|
||||
class AM {
|
||||
public:
|
||||
buffer_s16_t execute(
|
||||
buffer_c16_t src,
|
||||
buffer_s16_t dst
|
||||
const buffer_c16_t& src,
|
||||
const buffer_s16_t& dst
|
||||
);
|
||||
};
|
||||
|
||||
class FM {
|
||||
public:
|
||||
buffer_s16_t execute(
|
||||
buffer_c16_t src,
|
||||
buffer_s16_t dst
|
||||
const buffer_c16_t& src,
|
||||
const buffer_s16_t& dst
|
||||
);
|
||||
|
||||
void configure(const float sampling_rate, const float deviation_hz) {
|
||||
|
Loading…
Reference in New Issue
Block a user