-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dev audio #7485 #7562
Dev audio #7485 #7562
Conversation
…olume Changes to be committed: modified: examples/misc_sound.html new file: examples/sounds/Project_Utopia.ogg modified: examples/sounds/readme.txt modified: src/audio/Audio.js new file: src/audio/AudioBuffer.js modified: src/audio/AudioListener.js new file: src/audio/PositionAudio.js modified: utils/build/includes/common.json
|
||
THREE.AudioListener.prototype.setFilter = function ( value ) { | ||
|
||
if (this.filter !== null && this.filter !== undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to check for undefined
here.
Yes, we can add back a load method for compatibility. let me add this if (this.filter !== null && this.filter !== undefined) |
…ffer now only take the Audio context instead of the listener at creation
I also changed AudioBuffer to not need the listener at construction, only the webaudio context. Needed that to add back simple load function in Audio. |
Looks good! |
Thanks! |
Played a bit more with it. Pretty exciting stuff! |
thank you for the feedBack! I agree. The webAudio API has a lot of pretty cool stuff. Apart from the AudioBuffer for loading, all the filter and node stuff open a lot of possibility (there are some really cool demo online of some of the possibilities). Really, the oscillatorNode i added as example is a poor attempt at showing the real possibilities. as an aside, i already spotted one possible/necessary enhancement. If you need to create as you go PositionalAudio (for a game for example), you should probably be able to "clean up" PositionalAudio/Audio once they are not anymore useful (for example out of range, object emitting destroyed, etc..). Sure you can "reuse/recycle" them, but maybe a little function to disconnect it from the listener, and more generally cleaning any remaining Node reference would be useful. I am still testing it to see if it really would be useful. |
current state of audio Evolution.
Still need to add some fonction and the setSource capability