From 2b5c979fc50e3c3bf51b939c28b65906a5a29d44 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Thu, 2 Jan 2025 19:14:39 +0100 Subject: [PATCH] change --- README.md | 4 ++-- src/{stereo_sap_coder.c => stereo_sca_mod.c} | 14 +++++++------- 2 files changed, 9 insertions(+), 9 deletions(-) rename src/{stereo_sap_coder.c => stereo_sca_mod.c} (93%) diff --git a/README.md b/README.md index 301b630..7137fb9 100644 --- a/README.md +++ b/README.md @@ -38,5 +38,5 @@ SCAMod is a simple FM modulator which can be used to modulate a secondary audio Has a fine quality, but as it goes for 12 khz fm signals -# SSAPCoder -This "standard" was made by me, it encoder stereo am-quality audio into the FM carrier \ No newline at end of file +# StereoSCAMod +Stereo SCA, like normal SCA but encodes L-R onto 80 khz \ No newline at end of file diff --git a/src/stereo_sap_coder.c b/src/stereo_sca_mod.c similarity index 93% rename from src/stereo_sap_coder.c rename to src/stereo_sca_mod.c index 65a1134..722c8f4 100644 --- a/src/stereo_sap_coder.c +++ b/src/stereo_sca_mod.c @@ -59,7 +59,7 @@ static void stop(int signum) { } int main() { - printf("SSCAPMod : Stereo SAP Modulator (based on the SCA encoder SCAMod) made by radio95 (with help of ChatGPT and Claude, thanks!)\n"); + printf("StereoSCAMod : Stereo SCA Modulator (based on the SCA encoder SCAMod) made by radio95 (with help of ChatGPT and Claude, thanks!)\n"); // Define formats and buffer atributes pa_sample_spec mono_audio_format = { @@ -87,7 +87,7 @@ int main() { pa_simple *input_device = pa_simple_new( NULL, - "SSAPMod", + "StereoSCAMod", PA_STREAM_RECORD, INPUT_DEVICE, "Audio Input", @@ -105,7 +105,7 @@ int main() { pa_simple *output_device = pa_simple_new( NULL, - "SSAPMod", + "StereoSCAMod", PA_STREAM_PLAYBACK, OUTPUT_DEVICE, "Signal", @@ -121,8 +121,8 @@ int main() { } Oscillator osc_mono, osc_stereo; - init_oscillator(&osc_mono, 68000, SAMPLE_RATE); - init_oscillator(&osc_stereo, 77000, SAMPLE_RATE); + init_oscillator(&osc_mono, 67000, SAMPLE_RATE); + init_oscillator(&osc_stereo, 80000, SAMPLE_RATE); #ifdef PREEMPHASIS Emphasis preemp_l, preemp_r; init_emphasis(&preemp_l, PREEMPHASIS_TAU, SAMPLE_RATE); @@ -181,8 +181,8 @@ int main() { float mono = (current_left_input+current_right_input)/2.0f; float stereo = (current_left_input-current_right_input)/2.0f; - change_oscillator_frequency(&osc_mono, (68000+(mono*8000))); - change_oscillator_frequency(&osc_stereo, (77000+(stereo*8000))); + change_oscillator_frequency(&osc_mono, (67000+(mono*6000))); + change_oscillator_frequency(&osc_stereo, (80000+(stereo*6000))); signal[i] = get_oscillator_sin_sample(&osc_mono)*MONO_VOLUME+ get_oscillator_sin_sample(&osc_stereo)*STEREO_VOLUME; }