mirror of
https://github.com/ghaisanghaisan/morse_rs.git
synced 2026-11-11 19:38:00 -06:00
write_freq used hard coded values
This commit is contained in:
1 parent
a8e3cfed03
commit
9af562d99d
1 file changed
+3
-2
+3
-2
@@ -4,13 +4,14 @@ use std::f32::consts::PI;
|
|||||||
use std::{fs, i16, io};
|
use std::{fs, i16, io};
|
||||||
|
|
||||||
const SAMPLE_RATE: f32 = 44100.0;
|
const SAMPLE_RATE: f32 = 44100.0;
|
||||||
|
const BITS_PER_SAMPLE: u16 = 16;
|
||||||
const MORSE_FREQ: f32 = 600.0;
|
const MORSE_FREQ: f32 = 600.0;
|
||||||
const UNIT_TIME: f32 = 100.0 / 1000.0; // IN MS
|
const UNIT_TIME: f32 = 100.0 / 1000.0; // IN MS
|
||||||
|
|
||||||
const SPEC: hound::WavSpec = hound::WavSpec {
|
const SPEC: hound::WavSpec = hound::WavSpec {
|
||||||
channels: 1,
|
channels: 1,
|
||||||
sample_rate: 44100,
|
sample_rate: SAMPLE_RATE as u32,
|
||||||
bits_per_sample: 16,
|
bits_per_sample: BITS_PER_SAMPLE,
|
||||||
sample_format: hound::SampleFormat::Int,
|
sample_format: hound::SampleFormat::Int,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user