int SetVoiceEnvelope(nVoice,nShape,nRepeat)
This function queues the envelope (wave shape and repeat count) in the voice queue specified by the nVoice parameter. The new envelope replaces the previous one and remains in effect until the next SetVoiceEnvelope function call. An envelope is not counted as a note.
An error occurs if there is insufficient room in the queue; the SetVoiceEnvelope function always leaves space for a single sync mark in the queue. If nVoice is out of range, SetVoiceEnvelope is ignored.
Parameter | Type/Description |
nVoice | int Specifies the voice queue to receive the envelope. | |
nShape | int Specifies an index to an OEM wave-shape table. | |
nRepeat | int Specifies the number of repetitions of the wave shape during the duration of one note. |
The return value specifies the result of the function. It is zero if the function is successful. If an error occurs, the return value is one of the following values:
Value | Meaning |
S_SERDRC | Invalid repeat count | |
S_SERDSH | Invalid shape | |
S_SERQFUL | Queue full |