Play sound on button not working.

Started by Slasher, Fri 06/12/2013 12:05:30

Previous topic - Next topic

Slasher

Hi,

I'm wondering what would stop the sound (Beep2) from playing:

Code: ags

function Button48_OnClick(GUIControl *control, MouseButton button)
{
  aBeep2.Play(); // Fails to run
  tbInput.Text= tbInput.Text.Append("1"); // Works
 }

This occurs on all buttons.

The input Textbox is set to enabled=false so that you have to use the keypad.

When you hit the 'Enter' button, on the same gui, the Beep2 works.

Edit: For some reason AGS is not playing new sounds for the buttons. If I use an already imported sound then they work just fine but if I import a new sound file and assign it the buttons the sound fails to play. The sounds have been tested and do play.

It's an enigma (nod)

Edit: Edit:

I managed to import a sound file that works.

It seems that the buttons will not activate sound if less than 1 game loop.



monkey0506

#1
Quote from: slasher on Fri 06/12/2013 12:05:30It seems that the buttons will not activate sound if less than 1 game loop.

Do you have sound effects that play for less than 1/40th of a second?

Slasher

Hi Monkey

QuoteDo you have sound effects that plays for less than 1/40th of a second?
I don't think it was a 40th, possibly a 25th. Either way they all failed to play.


monkey0506

Would you mind uploading a couple of these clips that you're using?

Slasher

Hi Monkey,

I'll put them up tomorrow.

cheers

Slasher


SMF spam blocked by CleanTalk