Jump to content


Photo

Audio alerts?


    3 replies to this topic

    #1 Kainsin

    Kainsin

      Member

    • Members
    • PipPip
    • 27 posts

      Posted 16 October 2015 - 11:00 AM

      Is there a way to play an audio clip / alert in an addon? Or is it best to just input a <call#> to the game?



      #2 Arcon

      Arcon

        Advanced Member

      • Windower Staff
      • 1189 posts
      • LocationMunich, Germany

      Posted 16 October 2015 - 02:21 PM

      There's a windower.play_sound function, but I'm not entirely sure how it works. It may only be able to play .wav files.


      • Kainsin likes this

      #3 Iryoku

      Iryoku

        Advanced Member

      • Windower Staff
      • 488 posts

        Posted 17 October 2015 - 01:28 AM

        windower.play_sound just does a few checks to make sure the file exists and then calls the Win32 PlaySound function, which I don't believes supports anything other than WAV files with a linear PCM codec*.

         

        * Yes, you can have WAV files with other codecs, even MP3. WAV is just a container format; actually they're RIFF files.


        • Kainsin likes this

        #4 Kainsin

        Kainsin

          Member

        • Members
        • PipPip
        • 27 posts

          Posted 17 October 2015 - 02:56 PM

          Thanks!






          1 user(s) are reading this topic

          0 members, 1 guests, 0 anonymous users