mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-02-26 11:22:00 +01:00
make dbr calculation precise
This commit is contained in:
22
.vscode/c_cpp_properties.json
vendored
Normal file
22
.vscode/c_cpp_properties.json
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"C:\\lua\\*"
|
||||
],
|
||||
"defines": [
|
||||
"_DEBUG",
|
||||
"UNICODE",
|
||||
"_UNICODE"
|
||||
],
|
||||
"windowsSdkVersion": "10.0.26100.0",
|
||||
"compilerPath": "cl.exe",
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++17",
|
||||
"intelliSenseMode": "windows-msvc-x64"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
@@ -8,7 +8,7 @@ inline float dbr_to_deviation(float dbr) {
|
||||
|
||||
inline float deviation_to_dbr(float deviation) {
|
||||
if (deviation < 1e-6f) return -100.0f;
|
||||
return 10.0f * (log2f(deviation) - LOG2_19000) * 0.30103f;
|
||||
return 10*log10f(deviation/19000);
|
||||
}
|
||||
|
||||
void init_bs412(BS412Compressor* mpx, uint32_t mpx_deviation, float target_power, float attack, float release, float max, uint32_t sample_rate) {
|
||||
|
||||
Reference in New Issue
Block a user