WorldViz User Forum  

Go Back   WorldViz User Forum > Vizard

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 09-01-2005, 07:26 PM
alaa alaa is offline
Member
 
Join Date: Apr 2005
Posts: 10
sound problem

Hi,
I'm having a sound problem. I have a class that plays a sound when I call a fucnction in that class. and also I have a sound that is always looping from the begining of the program (in the main program that is calling the class). Also i have another sound in there that playes once sometimes. The problem is that when I loop the sound from the class then I play the sound in the main program, the loop in the class stops. Here is a small part of the program explaining what i mean:
--------------------------------------------------------
class Avatar(viz.EventClass):
...
playSound():
self.obj.playsound('audio/sound.wav',viz.LOOP)



#in main program
viz.go()
avatar = Avatar(...)
bell = viz.add(...)
viz.playsound('audio/wind.wav', viz.LOOP) #this works fine all the time
....
avatar.playSound() #works fine till the next sound plays
....
bell.play() #now this plays and stops the other one
....
---------------------------------------------------------
I don't know if the problem is that the main program has a priorty for the sound, or is it that I'm doing something wrong.

I have another question, I keep getting "Interlace" in the output screen in vizard. What does it mean.

Thank you,
Alaa Gharbawi
Reply With Quote
  #2  
Old 09-01-2005, 08:16 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

I can't replicate your problem here. I created a script that loops a sound on an object and also plays another sound and it worked fine. Would you mind posting a very short example that produces this problem?

Also, is there anything else being printed in the output other than "Interlace"?
Reply With Quote
  #3  
Old 09-01-2005, 08:47 PM
alaa alaa is offline
Member
 
Join Date: Apr 2005
Posts: 10
Hi,
The program is big. and I'm trying to riplicate but i can't. One more thing. The bell sound is called from a director after waiting for an amount of time, would that has to do with the problem.

I only get "interlace" several times.
Reply With Quote
  #4  
Old 09-01-2005, 08:51 PM
alaa alaa is offline
Member
 
Join Date: Apr 2005
Posts: 10
Hi again,
Also I forgot to mension. When the sound in the class is loaded i get this msg in the output:
** NOTIFY: 3D sound engine loaded: DirectX


Thank you,
Reply With Quote
  #5  
Old 09-02-2005, 12:15 AM
alaa alaa is offline
Member
 
Join Date: Apr 2005
Posts: 10
Hi again,

What things could cause the sound to stop?

Thank you,
Reply With Quote
  #6  
Old 09-02-2005, 11:31 AM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

How many sounds are you playing at the same time?
Reply With Quote
  #7  
Old 09-02-2005, 02:00 PM
alaa alaa is offline
Member
 
Join Date: Apr 2005
Posts: 10
Hi,
At elast three sounds at a time. I tried replicating the problem, but it seems that the director doesn't have to do with the problem. In what ways can you stop a looping sound?Is there in vizard maybe I'm using that might interfere with sound?

Thank you,
Alaa
Reply With Quote
  #8  
Old 09-02-2005, 02:13 PM
farshizzo farshizzo is offline
WorldViz Team Member
 
Join Date: Mar 2003
Posts: 2,849
Hi,

Here are the following ways to stop a looping sound, depending on how you played them:
Code:
viz.playsound('sound.wav',viz.LOOP)
viz.playsound('sound.wav',viz.STOP)
.
.
obj.playsound('sound.wav',viz.LOOP)
obj.playsound('sound.wav',viz.STOP)
.
.
sound = viz.add('sound.wav')
sound.loop()
sound.play()
sound.stop()
I'm not aware of anything else that would stop a sound unless there is a bug. But I would need to replicate the problem before I could fix it.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:16 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC