ggwave : add "soundMarkerThreshold" parameter

Can be used to control the threshold used for distinguishing odd from even
frequencies in the sound markers.
This commit is contained in:
Georgi Gerganov
2021-02-21 00:13:28 +02:00
parent 6011c0cef2
commit f4fb02d5d4
5 changed files with 14 additions and 5 deletions

View File

@@ -220,6 +220,7 @@ bool GGWave_init(
g_obtainedSpecInp.freq,
g_obtainedSpecOut.freq,
GGWave::kDefaultSamplesPerFrame,
GGWave::kDefaultSoundMarkerThreshold,
sampleFormatInp,
sampleFormatOut});
}

View File

@@ -69,7 +69,7 @@ int main(int argc, char** argv) {
fprintf(stderr, "Generating waveform for message '%s' ...\n", message.c_str());
GGWave ggWave({ -1, GGWave::kBaseSampleRate, sampleRateOut, 1024, GGWAVE_SAMPLE_FORMAT_F32, GGWAVE_SAMPLE_FORMAT_I16 });
GGWave ggWave({ -1, GGWave::kBaseSampleRate, sampleRateOut, 1024, GGWave::kDefaultSamplesPerFrame, GGWAVE_SAMPLE_FORMAT_F32, GGWAVE_SAMPLE_FORMAT_I16 });
ggWave.init(message.size(), message.data(), ggWave.getTxProtocol(protocolId), volume);
std::vector<char> bufferPCM;