mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-26 19:23:51 +01:00
NOW?
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#define PILOT_VOLUME 0.025f // 19 KHz Pilot
|
||||
#define STEREO_VOLUME 0.275f // L-R signal
|
||||
|
||||
#define TWO_BUFFER_SIZE (BUFFER_SIZE*2) // Don't touch this
|
||||
volatile sig_atomic_t to_run = 1;
|
||||
|
||||
const float format_scale = 1.0f / 32768.0f;
|
||||
@@ -130,7 +129,7 @@ int main() {
|
||||
signal(SIGINT, stop);
|
||||
signal(SIGTERM, stop);
|
||||
|
||||
int16_t input[TWO_BUFFER_SIZE];
|
||||
int16_t input[BUFFER_SIZE*2];
|
||||
float left[BUFFER_SIZE], right[BUFFER_SIZE];
|
||||
float mpx[BUFFER_SIZE];
|
||||
int16_t output[BUFFER_SIZE];
|
||||
@@ -139,7 +138,7 @@ int main() {
|
||||
fprintf(stderr, "Error reading from input device.\n");
|
||||
break;
|
||||
}
|
||||
stereo_s16le_to_float(input, left, right, TWO_BUFFER_SIZE);
|
||||
stereo_s16le_to_float(input, left, right, BUFFER_SIZE*2);
|
||||
|
||||
for (int i = 0; i < BUFFER_SIZE; i++) {
|
||||
float pilot = get_next_sample(&pilot_osc);
|
||||
|
||||
@@ -115,7 +115,7 @@ int main() {
|
||||
"StereoEncoder",
|
||||
PA_STREAM_RECORD,
|
||||
RDS_INPUT,
|
||||
"Audio Input",
|
||||
"RDS Input",
|
||||
&mono_format,
|
||||
NULL,
|
||||
&input_buffer_atr,
|
||||
@@ -170,8 +170,8 @@ int main() {
|
||||
fprintf(stderr, "Error reading from input device.\n");
|
||||
break;
|
||||
}
|
||||
stereo_s16le_to_float(input, left, right, sizeof(input));
|
||||
mono_s16le_to_float(input_rds, rds_data, sizeof(input_rds));
|
||||
stereo_s16le_to_float(input, left, right, BUFFER_SIZE*2);
|
||||
mono_s16le_to_float(input_rds, rds_data, BUFFER_SIZE);
|
||||
|
||||
for (int i = 0; i < BUFFER_SIZE; i++) {
|
||||
float pilot = get_next_sample(&pilot_osc);
|
||||
|
||||
Reference in New Issue
Block a user