mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-07-29 15:59:14 +02:00
make a definition for buffer sizes
This commit is contained in:
Vendored
+2
-1
@@ -8,6 +8,7 @@
|
|||||||
"stdio.h": "c",
|
"stdio.h": "c",
|
||||||
"stdlib.h": "c",
|
"stdlib.h": "c",
|
||||||
"error.h": "c",
|
"error.h": "c",
|
||||||
"math.h": "c"
|
"math.h": "c",
|
||||||
|
"options.h": "c"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,8 +11,7 @@
|
|||||||
#include "../lib/oscillator.h"
|
#include "../lib/oscillator.h"
|
||||||
#include "../lib/filters.h"
|
#include "../lib/filters.h"
|
||||||
|
|
||||||
// Features
|
#include "options.h"
|
||||||
#include "features.h"
|
|
||||||
|
|
||||||
#define SAMPLE_RATE 192000 // Don't go lower than 108 KHz, becuase it (53000*2) and (38000+15000)
|
#define SAMPLE_RATE 192000 // Don't go lower than 108 KHz, becuase it (53000*2) and (38000+15000)
|
||||||
|
|
||||||
@@ -74,13 +73,13 @@ int main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pa_buffer_attr input_buffer_atr = {
|
pa_buffer_attr input_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.fragsize = 8192
|
.fragsize = buffer_tlength_fragsize
|
||||||
};
|
};
|
||||||
pa_buffer_attr output_buffer_atr = {
|
pa_buffer_attr output_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.tlength = 8192,
|
.tlength = buffer_tlength_fragsize,
|
||||||
.prebuf = 0
|
.prebuf = buffer_prebuf
|
||||||
};
|
};
|
||||||
|
|
||||||
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
||||||
|
|||||||
@@ -1,2 +0,0 @@
|
|||||||
// #define PREEMPHASIS
|
|
||||||
// #define LPF
|
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// #define PREEMPHASIS
|
||||||
|
// #define LPF
|
||||||
|
|
||||||
|
#define buffer_maxlength 12288
|
||||||
|
#define buffer_tlength_fragsize 8192
|
||||||
|
#define buffer_prebuf 16
|
||||||
@@ -11,8 +11,7 @@
|
|||||||
#include "../lib/oscillator.h"
|
#include "../lib/oscillator.h"
|
||||||
#include "../lib/filters.h"
|
#include "../lib/filters.h"
|
||||||
|
|
||||||
// Features
|
#include "options.h"
|
||||||
#include "features.h"
|
|
||||||
|
|
||||||
#define SAMPLE_RATE 192000 // Don't go lower than 108 KHz, becuase it (53000*2) and (38000+15000)
|
#define SAMPLE_RATE 192000 // Don't go lower than 108 KHz, becuase it (53000*2) and (38000+15000)
|
||||||
|
|
||||||
@@ -73,13 +72,13 @@ int main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pa_buffer_attr input_buffer_atr = {
|
pa_buffer_attr input_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.fragsize = 8192
|
.fragsize = buffer_tlength_fragsize
|
||||||
};
|
};
|
||||||
pa_buffer_attr output_buffer_atr = {
|
pa_buffer_attr output_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.tlength = 8192,
|
.tlength = buffer_tlength_fragsize,
|
||||||
.prebuf = 0
|
.prebuf = buffer_prebuf
|
||||||
};
|
};
|
||||||
|
|
||||||
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
||||||
|
|||||||
+6
-7
@@ -12,8 +12,7 @@
|
|||||||
#include "../lib/filters.h"
|
#include "../lib/filters.h"
|
||||||
#include "../lib/fm_modulator.h"
|
#include "../lib/fm_modulator.h"
|
||||||
|
|
||||||
// Features
|
#include "options.h"
|
||||||
#include "features.h"
|
|
||||||
|
|
||||||
#define SAMPLE_RATE 192000
|
#define SAMPLE_RATE 192000
|
||||||
|
|
||||||
@@ -64,13 +63,13 @@ int main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pa_buffer_attr input_buffer_atr = {
|
pa_buffer_attr input_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.fragsize = 8192
|
.fragsize = buffer_tlength_fragsize
|
||||||
};
|
};
|
||||||
pa_buffer_attr output_buffer_atr = {
|
pa_buffer_attr output_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.tlength = 8192,
|
.tlength = buffer_tlength_fragsize,
|
||||||
.prebuf = 0
|
.prebuf = buffer_prebuf
|
||||||
};
|
};
|
||||||
|
|
||||||
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
||||||
|
|||||||
@@ -12,8 +12,7 @@
|
|||||||
#include "../lib/filters.h"
|
#include "../lib/filters.h"
|
||||||
#include "../lib/hilbert.h"
|
#include "../lib/hilbert.h"
|
||||||
|
|
||||||
// Features
|
#include "options.h"
|
||||||
#include "features.h"
|
|
||||||
//#define USB
|
//#define USB
|
||||||
|
|
||||||
#define SAMPLE_RATE 192000 // Don't go lower than 108 KHz, becuase it (53000*2) and (38000+15000)
|
#define SAMPLE_RATE 192000 // Don't go lower than 108 KHz, becuase it (53000*2) and (38000+15000)
|
||||||
@@ -76,13 +75,13 @@ int main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pa_buffer_attr input_buffer_atr = {
|
pa_buffer_attr input_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.fragsize = 8192
|
.fragsize = buffer_tlength_fragsize
|
||||||
};
|
};
|
||||||
pa_buffer_attr output_buffer_atr = {
|
pa_buffer_attr output_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.tlength = 8192,
|
.tlength = buffer_tlength_fragsize,
|
||||||
.prebuf = 0
|
.prebuf = buffer_prebuf
|
||||||
};
|
};
|
||||||
|
|
||||||
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
||||||
|
|||||||
+6
-7
@@ -11,8 +11,7 @@
|
|||||||
#include "../lib/oscillator.h"
|
#include "../lib/oscillator.h"
|
||||||
#include "../lib/filters.h"
|
#include "../lib/filters.h"
|
||||||
|
|
||||||
// Features
|
#include "options.h"
|
||||||
#include "features.h"
|
|
||||||
|
|
||||||
#define SAMPLE_RATE 192000 // Don't go lower than 108 KHz, becuase it (53000*2) and (38000+15000)
|
#define SAMPLE_RATE 192000 // Don't go lower than 108 KHz, becuase it (53000*2) and (38000+15000)
|
||||||
|
|
||||||
@@ -74,13 +73,13 @@ int main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pa_buffer_attr input_buffer_atr = {
|
pa_buffer_attr input_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.fragsize = 8192
|
.fragsize = buffer_tlength_fragsize
|
||||||
};
|
};
|
||||||
pa_buffer_attr output_buffer_atr = {
|
pa_buffer_attr output_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.tlength = 8192,
|
.tlength = buffer_tlength_fragsize,
|
||||||
.prebuf = 0
|
.prebuf = buffer_prebuf
|
||||||
};
|
};
|
||||||
|
|
||||||
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
||||||
|
|||||||
@@ -12,8 +12,7 @@
|
|||||||
#include "../lib/filters.h"
|
#include "../lib/filters.h"
|
||||||
#include "../lib/fm_modulator.h"
|
#include "../lib/fm_modulator.h"
|
||||||
|
|
||||||
// Features
|
#include "options.h"
|
||||||
#include "features.h"
|
|
||||||
|
|
||||||
#define SAMPLE_RATE 192000
|
#define SAMPLE_RATE 192000
|
||||||
|
|
||||||
@@ -75,13 +74,13 @@ int main() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
pa_buffer_attr input_buffer_atr = {
|
pa_buffer_attr input_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.fragsize = 8192
|
.fragsize = buffer_tlength_fragsize
|
||||||
};
|
};
|
||||||
pa_buffer_attr output_buffer_atr = {
|
pa_buffer_attr output_buffer_atr = {
|
||||||
.maxlength = 8192,
|
.maxlength = buffer_maxlength,
|
||||||
.tlength = 8192,
|
.tlength = buffer_tlength_fragsize,
|
||||||
.prebuf = 0
|
.prebuf = buffer_prebuf
|
||||||
};
|
};
|
||||||
|
|
||||||
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
printf("Connecting to input device... (%s)\n", INPUT_DEVICE);
|
||||||
|
|||||||
Reference in New Issue
Block a user