MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / init

Method init

extlibs/soloud/src/audiosource/speech/klatt.cpp:1049–1073  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1047
1048
1049void klatt::init(int aBaseFrequency, float aBaseSpeed, float aBaseDeclination, int aBaseWaveform)
1050{
1051 mBaseF0 = aBaseFrequency;
1052 mBaseSpeed = aBaseSpeed;
1053 mBaseDeclination = aBaseDeclination;
1054 mBaseWaveform = aBaseWaveform;
1055
1056 mSampleRate = 11025;
1057 mF0Flutter = 0;
1058 mF0FundamentalFreq = mBaseF0;
1059 mFrame.mF0FundamentalFreq = mBaseF0;
1060
1061 int FLPhz = (950 * mSampleRate) / 10000;
1062 int BLPhz = (630 * mSampleRate) / 10000;
1063 mNspFr = (int)(mSampleRate * mBaseSpeed) / 1000;
1064
1065 mDownSampLowPassFilter.initResonator(FLPhz, BLPhz, mSampleRate);
1066
1067 mNPer = 0; /* LG */
1068 mT0 = 0; /* LG */
1069
1070 mVLast = 0; /* Previous output of voice */
1071 mNLast = 0; /* Previous output of random number generator */
1072 mGlotLast = 0; /* Previous value of glotout */
1073}

Callers 3

SpeechInstanceMethod · 0.45
getAudioMethod · 0.45
rewindMethod · 0.45

Calls 1

initResonatorMethod · 0.80

Tested by

no test coverage detected