create3000 / x_ite

X_ITE X3D Browser, view and manipulate X3D and VRML scenes in HTML.
https://create3000.github.io/x_ite/
Other
67 stars 14 forks source link

Audio Nodes are silent in X_ITE #49

Closed billy-castle closed 5 years ago

billy-castle commented 5 years ago

Describe the bug I created a simple x3d file of a red ball. When you click on it you hear a pop. I tested it on two other browsers and they work. But in the X_ITE screen, the red ball appears but I don't hear anything when I click.

I also notice that no other x3d files with audio play anything here either. And there are no error or warning messages from the browser.

Evidently audio enabled and at regular listening volume is not the default setting. There must be something that needs to be turned on inside the X_ITE javascript code to turn the sound on. But I haven't learned to configure those things.

To Reproduce Load the file code (shown below) into an X_CITE window. You need to provide your own file called pop.wav because I can't attach a sound file.

Expected behavior Click on the red ball in the scene to hear a pop.

Screenshots N/A. No errors or warnings occur.

Desktop (please complete the following information): Mac OS Mojave 10.14 Safari 12.0

Additional context Other html files on my localhost play sound because I enabled it on this url.

CODE: trysound.txt

splace commented 5 years ago

this should not make any sound; read about the Sound node maxFront field.

and

startTime = -100 makes no sense, read about time dependent nodes.

billy-castle commented 5 years ago

I just set maxFront to 100. Now I am hearing a sound from x_ite for the first time. Thank you for calling this to my attention.

Evidently the defaults for Viewpoint distance and for maxFront are 10 meters, which is right on the cusp with regards to whether a browser might play it or not. So I am using a maxFront of 100 just to be sure.

I originally noted that an audio loop with start and stop times of zero starts as soon as it is loaded. So I set a negative start time to keep it from playing until an another event sent it a signal to begin. This doesn’t seem to be true if the audio is not looped.

Billy Gard duckfeetbilly@gmail.com

On Aug 7, 2019, at 6:08 PM, simon place notifications@github.com wrote:

this should not make any sound; read about the Sound mode maxFront field.

and

startTime = -100 makes no sense, read about time dependent nodes.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/create3000/x_ite/issues/49?email_source=notifications&email_token=AMUHPG3O5DGSZ4SXAPW2Z5DQDNWY5A5CNFSM4IKFKRA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD32D4TY#issuecomment-519323215, or mute the thread https://github.com/notifications/unsubscribe-auth/AMUHPGZ7D5DS2BR64O6GWA3QDNWY5ANCNFSM4IKFKRAQ.

splace commented 5 years ago

This doesn’t seem to be true if the audio is not looped.

yep, something also generally true in the other time dep. nodes. BTW there are other subtleties with time in vrml.

which is right on the cusp with regards to whether a browser might play it or not.

'exactly' @10m doesn't really exist in floating point maths, which is generally in use, so browsers may 'think' you are just in, or just out, of range. but the diff. between 0% and 1% volume is intended to be perceptually insignificant, making this irrelevant.

this inability to check 'exact' distances is also a general thing to be aware of. (in virtually all software actually.)

please remember to close fixed issues. helps with admin.

billy-castle commented 5 years ago

So it's nice to hear my x_ite window piping up.