No announcement yet.

glitch while playing a wav file

  • Filter
  • Time
  • Show
Clear All
new posts

  • glitch while playing a wav file

    I have noticed that if I use file_PlayWav and then make some gfx_* calls occasionally the display will glitch.
    ​I know I can wait on snd_Playing, but I was hoping to do some drawing in the background.
    Is this a known problem?

  • #2
    You should be able to draw just fine.

    However there may be an issue with 'long' drawing commands.

    The sound buffer might be getting exhausted causing the apparent glitches.

    Can you attach the sound file and give us the sequence of commands required to create the issue.

    We should be able to come up with a solution.


    • #3
      Actually I think there is some interaction between file_PlayWav and file_Image. Now I see that the wav file is being double played (or something).
      It looks like having two file handles open is causing problems, I will try to track it down further


      • #4
        Playing sounds will generally slow down the time it takes to display the image.

        If the image is very large the sound buffer might run out before it can be refreshed. (I might add that I have never heard of this happening on Diablo16)

        In this case increase the "Sound Buffer" size using the equivalent command.


        • #5
          OK I tried increasing the buffer size and that cured the wav file problem.
          The bitmap I'm displaying is a full screen image.
          nb I'm running at 625000 baud (never seen an error) and using python to blat the commands to the display so maybe no one else has run at that rate