int sm_play_tone_list(struct sm_play_tone_list_parms *tonep)
typedef struct sm_play_tone_list_parms { tSMChannelId channel; /* in */ struct sm_play_tone_item { enum kSMToneOperation { kSMToneOperationStop, kSMToneOperationSum, kSMToneOperationModulate, } operation; /* in */ tSM_UT32 duration; /* in */ double frequency1; /* in */ double amplitude1; /* in */ double frequency2; /* in */ double amplitude2; /* in */ } *tones; /* in */ tSM_INT tone_count; /* in */ } SM_PLAY_TONE_LIST_PARMS;
This call allows an application to generate multiple simple tones on a given output channel channel.
The application can wait to be notified by an event that tone generation of a given duration has completed. When a write event has been associated with channel (see sm_channel_set_event()), then the driver will notify the application with that event whenever it needs to invoke sm_play_tone_list_status().
The sm_play_tone_list_abort() call may be used to stop an ongoing tone generation.
This call offers a superset of the functionality provided by sm_play_tone(), sm_play_cptone() and sm_play_digits().
kSMPlayToneListStatusComplete
. All
other parameters are ignored and should be zero.
amplitude1 * sinewave(frequency1) * (1 + amplitude2 * sinewave(frequency2))
(after all parameters have been scaled appropriately).
kSMToneOperationModulate
then this tone specifies the
carrier.
kSMToneOperationModulate
then this tone specifies the
modulating signal.
kSMToneOperationSum
then this is the
amplitude of the second component frequency, specified in dBm0
(according to CCITT G.711) and must be in the range from -35 dBm0 to
+3 dBm0.
If
operation
is kSMToneOperationModulate
then this is the
amplitude relative to the carrier wave, with 0 dB corresponding
to 100% modulation. For example, a 50% modulation would be
specified as 20 * log10(0.5) = -6.0206 dB.
0 if call completed successfully, otherwise a standard error such as:
This function is part of the Prosody speech processing API.