61 |
|
|
62 |
// select synthesis implementation (currently either pure C++ or MMX+SSE(1)) |
// select synthesis implementation (currently either pure C++ or MMX+SSE(1)) |
63 |
SYNTHESIS_MODE_SET_IMPLEMENTATION(SynthesisMode, Features::supportsMMX() && Features::supportsSSE()); |
SYNTHESIS_MODE_SET_IMPLEMENTATION(SynthesisMode, Features::supportsMMX() && Features::supportsSSE()); |
64 |
|
SYNTHESIS_MODE_SET_PROFILING(SynthesisMode, true); |
65 |
} |
} |
66 |
|
|
67 |
Voice::~Voice() { |
Voice::~Voice() { |
956 |
|
|
957 |
//same as 'pEngine->pBasicFilterParameters[i] = bqbase;' |
//same as 'pEngine->pBasicFilterParameters[i] = bqbase;' |
958 |
bq = (float*) &pEngine->pBasicFilterParameters[i]; |
bq = (float*) &pEngine->pBasicFilterParameters[i]; |
959 |
bq[0] = bqbase.a1; |
bq[0] = bqbase.b0; |
960 |
bq[1] = bqbase.a2; |
bq[1] = bqbase.b1; |
961 |
bq[2] = bqbase.b0; |
bq[2] = bqbase.b2; |
962 |
bq[3] = bqbase.b1; |
bq[3] = bqbase.a1; |
963 |
bq[4] = bqbase.b2; |
bq[4] = bqbase.a2; |
964 |
|
|
965 |
// same as 'pEngine->pMainFilterParameters[i] = bqmain;' |
// same as 'pEngine->pMainFilterParameters[i] = bqmain;' |
966 |
bq = (float*) &pEngine->pMainFilterParameters[i]; |
bq = (float*) &pEngine->pMainFilterParameters[i]; |
967 |
bq[0] = bqmain.a1; |
bq[0] = bqmain.b0; |
968 |
bq[1] = bqmain.a2; |
bq[1] = bqmain.b1; |
969 |
bq[2] = bqmain.b0; |
bq[2] = bqmain.b2; |
970 |
bq[3] = bqmain.b1; |
bq[3] = bqmain.a1; |
971 |
bq[4] = bqmain.b2; |
bq[4] = bqmain.a2; |
972 |
} |
} |
973 |
} |
} |
974 |
|
|
980 |
* @param pSrc - pointer to input sample data |
* @param pSrc - pointer to input sample data |
981 |
* @param Skip - number of sample points to skip in output buffer |
* @param Skip - number of sample points to skip in output buffer |
982 |
*/ |
*/ |
983 |
void Voice::Synthesize(uint Samples, sample_t* pSrc, int Skip) { |
void Voice::Synthesize(uint Samples, sample_t* pSrc, uint Skip) { |
984 |
UpdateSynthesisMode(); |
RunSynthesisFunction(SynthesisMode, *this, Samples, pSrc, Skip); |
|
SynthesizeFragment_Fn* f = (SynthesizeFragment_Fn*) SynthesizeFragmentFnPtr; |
|
|
f(*this, Samples, pSrc, Skip); |
|
|
} |
|
|
|
|
|
/** |
|
|
* Determine the respective synthesis function for the given synthesis |
|
|
* mode. |
|
|
*/ |
|
|
void Voice::UpdateSynthesisMode() { |
|
|
SynthesizeFragmentFnPtr = GetSynthesisFunction(SynthesisMode); |
|
985 |
} |
} |
986 |
|
|
987 |
/** |
/** |