

The code used here is modified from another gauge using mouse clicks and that's perhaps the problem? The sound does come up, but plays in an endless loop!Here are extracts from the code://->// -// icons set to OFF or zero value// -UINT32 gearup = 0 // -// callbacks for the icons// -FLOAT64 FSAPI gear_cb(PELEMENT_ICON) // -// main gauge callback// -void FSAPI callout_cb(PGAUGEHDR, int, UINT32) // -// local variables// -char callout_gauge_name = GAUGE_NAME extern PELEMENT_HEADER callout_list extern MOUSERECT callout_mouse_rect // -// this variable will hold the actual width of the gauge //needed in some mouse callbacks// -double width // -// variables/definitions for the sound buffers:// sound files in FS Sound folder// -MFSSoundFileVars(gear_sound, "SOUNDJSATR_gear.WAV") // -// MODULE IMPORT AND EXPORT DEFINITIONS// -GAUGE_HEADER_FS700(GAUGE_W, callout_gauge_name, &callout_list, callout_mouse_rect, callout_cb, 0, 0, 0 ) // -// DRAWING ELEMENTS DEFINITIONS// -MAKE_ICON( gear,ĜALLOUT, NULL, NULL, IMAGE_USE_ERASE | IMAGE_USE_TRANSPARENCY | IMAGE_HIDDEN,Đ,Đ, 0, MODULE_VAR_NONE, gear_cb, ICON_SWITCH_TYPE_SET_CUR_ICON,đ,Đ,Đ)// -// link the drawing elements to the background// -PELEMENT_HEADER callout_plist1 = if ( gearwarn The TGaugePlaySound is set up with the sound declaration and in the Main Gauge Callback and should work.
/GettyImages-78767365-596024093df78cdc68b97af1.jpg)
This gauge does not use mouse clicks, but is only intended to play sounds at specific events. Hi All,I am working on a C++ callout (sound) gauge.
