DspPlaySound()

Using the DspPlaySound(...)  function, and it seems to work OK, except for the fact that the cursor turns into an hourglass while the sound plays.  If it catches it correctly, a program open indicator in the windows taskbar opens and closes.  Distracting, at best. It does almost seem to be a blocking function.

I see TN000028223 that references a memory leak in the function based on the XML Parser used in windows, but the Microsft documentation is quite confusing about how to update it.

Has anybody else seen this?  Beter yet,has anybody else fixed it?

  • Hi Michael

    We had this exact same problem and resolved it by deleting file C:\Program Files (x86)\Aveva\Citect SCADA 2018 R2\Bin\SE.Citect.Playsound.exe on the target machine.
    If you go with this solution, just be aware that this file will be reinstated on every subsequent Citect Update installation on that machine.

    Hope this helps.
    Ash

  • Excellent.  I tried it and it worked. 

    Curious what made you look there?

    I don't see and technotes/knowledge base articles that would steer in that direction.

    This was on 2018 - obviously the BIN directory is in a different place.

    Trying to say "Thanks" here.

  • No problem, glad it was useful!

    This was just something our Citect support engineer suggested to us at the time. We tried it, determined it didn't have any negative impact (e.g. memory leak) and so built this into our build procedure.

    Regards

  • Hi  ,

    The Se.Citect.PlaySound.exe was originally created to overcome a memory leak in the Windows OS sndPlaySound(), which has subsequently been fixed. In the latest version of Plant SCADA 2020 R2 (formerly Citect SCADA) they have removed this middleware, and reverted to use actual OS API. But there is a need to introduce a mode, to differentiate between sound file and system sound. Here is update to help:

    ----------------------------
    Plays a waveform (sound). Wave form sound files *.WAV are provided with Windows
    and by third-party developers, or you can record them yourself to play long
    (and complex) sound sequences.
    
    When the “sSoundname” is a sound file path and “nMode” is “0”, this function
    loads the .wav file from the specified path (Sound Files) and plays the
    associated waveform. If the specified sound file is not available in the
    mentioned path, a fail error will be returned and a hardware alarm will be
    reported. Use of a system sound in this mode is not supported and will result
    in return of a fail error and report of a hardware alarm.
    
    When the “sSoundname” is a system sound name and “nMode” is “1”, this function
    searches the system for the entry with the specified name, and plays the
    associated waveform. If the name cannot be found, there is no error indicated
    in either the return value or hardware alarm. For this reason, the use of mode
    0 with waveform files is recommended over mode 1 with system sounds. Further,
    use of a valid wave form sound file in this mode instead of mode "0" will
    result in return of a fail error and report of a hardware alarm informing the
    wrong mode is in use.
    
    ------------------------------
    

    I will ask the GCS team to write a TN to cover this information. It looks like your work around is valid.

    Can you also confirm which version / update you are currently using?

    Kind regards

    Olivier

  • Thanks!

    As far as the version/update, we have seen this since version 7 and still seeing it in 8.1 update 13.

    Being an interatgor, we have to plan our updates around customer schedules, so cannot get them all done promptly.

  • Hopefully smoother sailing going forward with Plant SCADA 2020 R2 (v8.30) having finally resolved this issue. It was originally caused by a OS handle leak, so work arounds were introduced, which added more complexity and ways things could fail.

  • Hi  , thanks for this, is this TN available yet and can you share if so.