Audio Tone Example

#include "itc50.h"
void PlayTonesTest( void )
{
    HRESULT hr;
    // Abort if this functionality is not supported on the device.
    // 
    if( ! ITCIsAudioToneSupported() )
    return;
    // Play a tone at several octaves.
    //
    hr = ITCAudioPlayTone( 300,  200, ITC_GetToneVolumeVeryLoud() );
    hr = ITCAudioPlayTone( 600,  200, ITC_GetToneVolumeLoud() );
    hr = ITCAudioPlayTone( 1200, 200, ITC_GetToneVolumeNormal() );
    hr = ITCAudioPlayTone( 2400, 200, ITC_GetToneVolumeLow() );
    // Insert a silent pause for 1 second.
    //
    hr = ITCAudioPlayTone( 0, 1000, 0 );
    // Play a tone at the device's current volume setting.
    //
    hr = ITCAudioPlayTone( 1200, 200, ITC_TONE_VOLUME_CURRENT );
    // Generate a loud click sound.
    //
    hr = ITCAudioPlayTone( 
    ITC_GetTonePitchClick(), 
    ITC_GetToneDurationClick(), 
    ITC_GetToneVolumeVeryLoud() );

More Information

Audio and Sound Functions