mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-07-29 15:59:14 +02:00
changes with the volumes
This commit is contained in:
@@ -22,8 +22,9 @@
|
|||||||
#define BUFFER_SIZE 512
|
#define BUFFER_SIZE 512
|
||||||
#define CLIPPER_THRESHOLD 0.425 // Adjust this as needed
|
#define CLIPPER_THRESHOLD 0.425 // Adjust this as needed
|
||||||
|
|
||||||
#define MONO_VOLUME 0.45f // L+R Signal
|
#define MONO_VOLUME 0.5f // L+R Signal
|
||||||
#define STEREO_VOLUME 0.35f // L-R signal
|
#define STEREO_VOLUME_AUDIO 0.5f // L-R signal (once demodulated)
|
||||||
|
#define STEREO_VOLUME_MODULATION 0.5f // L-R signal (on MPX)
|
||||||
|
|
||||||
#ifdef PREEMPHASIS
|
#ifdef PREEMPHASIS
|
||||||
#define PREEMPHASIS_TAU 0.00005 // 50 microseconds, use 0.000075 if in america
|
#define PREEMPHASIS_TAU 0.00005 // 50 microseconds, use 0.000075 if in america
|
||||||
@@ -179,10 +180,10 @@ int main() {
|
|||||||
float mono = (current_left_input + current_right_input) / 2.0f; // Stereo to Mono
|
float mono = (current_left_input + current_right_input) / 2.0f; // Stereo to Mono
|
||||||
float stereo = (current_left_input - current_right_input) / 2.0f; // Also Stereo to Mono but a bit diffrent
|
float stereo = (current_left_input - current_right_input) / 2.0f; // Also Stereo to Mono but a bit diffrent
|
||||||
|
|
||||||
change_oscillator_frequency(&osc, (50000+(stereo*15000)));
|
change_oscillator_frequency(&osc, (50000+((stereo*STEREO_VOLUME_AUDIO)*15000)));
|
||||||
|
|
||||||
mpx[i] = mono * MONO_VOLUME +
|
mpx[i] = mono * MONO_VOLUME +
|
||||||
get_oscillator_sin_sample(&osc)*STEREO_VOLUME;
|
get_oscillator_sin_sample(&osc)*STEREO_VOLUME_MODULATION;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pa_simple_write(output_device, mpx, sizeof(mpx), NULL) < 0) {
|
if (pa_simple_write(output_device, mpx, sizeof(mpx), NULL) < 0) {
|
||||||
|
|||||||
@@ -25,8 +25,8 @@
|
|||||||
#define MONO_VOLUME 0.45f // L+R Signal
|
#define MONO_VOLUME 0.45f // L+R Signal
|
||||||
#define PILOT_VOLUME 0.0175f // 19 KHz Pilot
|
#define PILOT_VOLUME 0.0175f // 19 KHz Pilot
|
||||||
#define SIN38_VOLUME 0.35f
|
#define SIN38_VOLUME 0.35f
|
||||||
#define COS38_VOLUME 0.35f
|
#define COS38_VOLUME 0.05f
|
||||||
#define SIN76_VOLUME 0.35f
|
#define SIN76_VOLUME 0.05f
|
||||||
|
|
||||||
#ifdef PREEMPHASIS
|
#ifdef PREEMPHASIS
|
||||||
#define PREEMPHASIS_TAU 0.00005 // 50 microseconds, use 0.000075 if in america
|
#define PREEMPHASIS_TAU 0.00005 // 50 microseconds, use 0.000075 if in america
|
||||||
|
|||||||
+1
-1
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
#define MONO_VOLUME 0.45f // L+R Signal
|
#define MONO_VOLUME 0.45f // L+R Signal
|
||||||
#define PILOT_VOLUME 0.0175f // 19 KHz Pilot
|
#define PILOT_VOLUME 0.0175f // 19 KHz Pilot
|
||||||
#define STEREO_VOLUME 0.35f // L-R signal
|
#define STEREO_VOLUME 0.45f // L-R signal
|
||||||
|
|
||||||
#ifdef PREEMPHASIS
|
#ifdef PREEMPHASIS
|
||||||
#define PREEMPHASIS_TAU 0.00005 // 50 microseconds, use 0.000075 if in america
|
#define PREEMPHASIS_TAU 0.00005 // 50 microseconds, use 0.000075 if in america
|
||||||
|
|||||||
Reference in New Issue
Block a user