instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
April 24, 2018, 03:56:55 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: No sound in InstantPlayer 2.1.0  (Read 6058 times)
serversovereign
Newbie
*
Posts: 3


View Profile
« on: May 10, 2012, 02:32:16 am »

I have a world, coded in X3D, which I've been opening in InstantPlayer 2.1.0.22746 for testing as I go along.  I have a ProximitySensor which overlaps the entry point (the first viewpoint) which triggers a Sound node to begin playing a particular wav file.  InstantPlayer does not do this.  The console does not show anything out of the ordinary.  Other players, such as Octaga and FreeWRL, will play the sound and spatialize it correctly, but InstantPlayer is my favorite and I'd like to get it working.

Also, (I realize this isn't related to sound/video) there seems to be a bug on my system - in Game mode, pressing the W key causes it to keep moving forward and never stop!!

Has anyone else had these issues??  I really love InstantPlayer and I'd like to get it working!
Logged
yjung
Administrator
Sr. Member
*****
Posts: 260


View Profile
« Reply #1 on: May 11, 2012, 09:46:16 am »

Concerning walk: there once was a bug which should be fixed now, just install a recent dailybuild.

Concerning sound: triggering basically works like the TimeSensor. Additionally, you can set the environment variable OSG_LOG_LEVEL to notice or info before starting for getting more output.
Logged
serversovereign
Newbie
*
Posts: 3


View Profile
« Reply #2 on: May 11, 2012, 03:45:31 pm »

For the game-mode issue:  the dailybuild has the same behavior (pressing W moves forward forever).  However, I have noticed that the "beta 7" version works correctly (releasing the W key stops moving forward).  How odd is that?

Have you heard of this before?

Thanks for the reply and debugging tips.
Logged
yjung
Administrator
Sr. Member
*****
Posts: 260


View Profile
« Reply #3 on: May 12, 2012, 07:50:30 pm »

Oh, you really mean game mode, I was thinking of walk mode... Which OS do you use?

Concerning your sound problem, there is a short code snippet for testing below. However, if you trigger the sound source again before it stopped playing, then it doesn't play again. Therefore, you have to wait a few milliseconds before you can replay the sound.

Code:
Sound {
  source DEF clip AudioClip {
    url "yourFileHere.wav"
  }
}
Shape {
  appearance Appearance { material Material {} }
  geometry Sphere {}
}
DEF TS TouchSensor {
    ROUTE TS.touchTime TO clip.set_startTime
}
Logged
serversovereign
Newbie
*
Posts: 3


View Profile
« Reply #4 on: May 12, 2012, 09:39:30 pm »

For the game mode issue:  I'm using Windows 7 Professional 64-bit.  I will try under Debian (didn't think of that before).  I've tried the dailybuilds from May 9 and 10, both 32-bit and 64-bit versions, as well as the 32-bit and 64-bit versions of 2.1.0 and 2.0.0.  So far the only version that has worked correctly is the beta 7 build.

For the sound issue:  The problem was the "intensity" field of the Sound node.  When setting it to a decimal value (I was using 0.2), the sound does not play.  When I set it to 1 the sound plays normally.  I just set it to 1 and softened the audio clip.

I'll try this out with the code you posted and see if the Sound node continues to work only with integer values for the intensity field.

Thanks again.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines