[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

XWidget & XLaunchpad , Desktop customization
It is currently April 16th, 2024, 12:11 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: July 29th, 2013, 2:39 pm 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
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.


Last edited by yereverluvinuncleber on October 26th, 2014, 4:28 am, edited 2 times in total.

Top
 Profile  
 
PostPosted: July 29th, 2013, 7:34 pm 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313
function text1OnMouseMove(Sender,Shift,X,Y,Dx,Dy)
{
PlaySound2("abc.wav")
}


Top
 Profile  
 
PostPosted: July 30th, 2013, 3:21 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
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.


Top
 Profile  
 
PostPosted: July 30th, 2013, 7:06 am 
Offline
User avatar

Joined: June 10th, 2012, 5:57 am
Posts: 313


Top
 Profile  
 
PostPosted: July 30th, 2013, 10:05 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
It only plays the sound once though on a mousemove and only at the end of the mousemove.


Top
 Profile  
 
PostPosted: August 8th, 2013, 7:43 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
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.


Top
 Profile  
 
PostPosted: November 2nd, 2013, 8:07 pm 
Offline

Joined: October 26th, 2013, 8:17 am
Posts: 362


Top
 Profile  
 
PostPosted: June 1st, 2014, 5:36 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
I will try that though I think that is not exactly what I wanted to achieve, will respond later, thanks.


Top
 Profile  
 
PostPosted: October 19th, 2014, 12:29 pm 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
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.


Top
 Profile  
 
PostPosted: October 25th, 2014, 10:22 pm 
Offline

Joined: October 26th, 2013, 8:17 am
Posts: 362
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


Top
 Profile  
 
PostPosted: October 26th, 2014, 4:28 am 
Offline
User avatar

Joined: July 29th, 2013, 9:13 am
Posts: 609
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 18 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Powered by phpBB® Forum Software © phpBB Group