[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4668: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4670: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4671: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4672: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3815)
XWidgetSoft Forum :: View topic - HELP: playing a sound continuously - CLOSED
XWidgetSoft Forum
https://bbs.xwidget.com/

HELP: playing a sound continuously - CLOSED
https://bbs.xwidget.com/viewtopic.php?f=8&t=3428
Page 1 of 1

Author:  yereverluvinuncleber [ July 29th, 2013, 2:39 pm ]
Post subject:  HELP: playing a sound continuously - CLOSED

Is there a way of getting a OnMouseMove event on an object to play a sound multiple times / continuously? At the moment it plays just once when the movement is completed. I just want the sound to be played each and every time the mouse movement occurs.

Author:  qiancang [ July 29th, 2013, 7:34 pm ]
Post subject:  Re: playing a sound continuously

function text1OnMouseMove(Sender,Shift,X,Y,Dx,Dy)
{
PlaySound2("abc.wav")
}

Author:  yereverluvinuncleber [ July 30th, 2013, 3:21 am ]
Post subject:  Re: playing a sound continuously

Yes, that almost works but it seems to play the sound synchronously, ie. it plays the sound before it lets the next mouse movement complete so mouse movement is interrupted while the sound plays.
I was hoping that the sound would play in parallel whilst the movement continued. In this way each movement of the mouse would cause a sound to play, one sound overlapping the other. A simple buzz would then be played multiple times whilst the mouse was dragged giving the impression of a electrical interference whilst the mouse is dragged.

On YWE the sounds are played as objects in an asynchronous fashion and I am trying to replicate that behaviour. any thoughts?

Thanks for the quick response.

Author:  qiancang [ July 30th, 2013, 7:06 am ]
Post subject:  Re: playing a sound continuously


Author:  yereverluvinuncleber [ July 30th, 2013, 10:05 am ]
Post subject:  Re: playing a sound continuously

It only plays the sound once though on a mousemove and only at the end of the mousemove.

Author:  yereverluvinuncleber [ August 8th, 2013, 7:43 am ]
Post subject:  Re: HELP: playing a sound continuously

I'm looking to play the sound asynchronously, one sound is kicked off immediately the mouse is moved - and when the next mouse movement happens the next sound plays. The end result is that the sounds overlap, ie. they play asynchronously. I suppose if this is not possible then I should raise it as a feature request.

Author:  hamid [ November 2nd, 2013, 8:07 pm ]
Post subject:  Re: HELP: playing a sound continuously


Author:  yereverluvinuncleber [ June 1st, 2014, 5:36 am ]
Post subject:  Re: HELP: playing a sound continuously

I will try that though I think that is not exactly what I wanted to achieve, will respond later, thanks.

Author:  yereverluvinuncleber [ October 19th, 2014, 12:29 pm ]
Post subject:  Re: HELP: playing a sound continuously

Hamid, in fact it is the opposite of what you describe.

On the OnMouseMove function it is meant to play the sound multiple times but it plays the sound only once.

On the other engine I use, the onMouseMove function, every mouse movement the sound plays and the sounds are combined as you would expect. The sound builds up and each sound layers upon the previous.

On the Xwidget engine, although I see the function running multiple times I only hear the sound running once when the onMouseMove function has completed. It plays just once. It is as if the Xwidget engine can only play one sound synchronously.

Author:  hamid [ October 25th, 2014, 10:22 pm ]
Post subject:  Re: HELP: playing a sound continuously

my explanation for my above code is correct for that code,
i thought you want it to create a scratch sound,
so on moving of mouse, it will stop the running one and start another one,
if your sound is placed at the beginning of the soundfile (at the 00:00:00),
it should generate a noise for movement of mouse

=============

but as i understand from your new post,
you want it to play multiple times and all of them together,
so they will get mixed up with each other,

for this one:
since only one instance of playsound() function will be ran on Xwidget,
it will need to call multiple instances of playsound() function in widget,
and i don't know a way to do that,
so maybe it's not possible right now

Author:  yereverluvinuncleber [ October 26th, 2014, 4:28 am ]
Post subject:  Re: HELP: playing a sound continuously

Thanks Hamid, the previous widget engine would allow a sound to be played multiple times altogether and I took advantage of that. I can do without that function for now, perhaps I will simply create a new sound.

Marked as CLOSED.

Page 1 of 1 All times are UTC - 8 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/