# Class: soundnode

soundnodes are sound sources in space.

## Methods:

### Method overview:

- autodelete
- delete
- gain
- isplaying
- loop
- new
- pause
- pitch
- play
- pos
- refdist
- rewind
- stop
- update
- velocity

new (Sound snd)
  returns: (soundnode node)
  new soundnode
autodelete (soundnode self, [boolean])
  returns: ([boolean])
  sets or gets autodelete value. If true, the soundnode is automaticly delete when the soundplaying is stoped. This is the default.
delete (soundnode self)
  returns: ()
  deletes soundnode
gain (soundnode self, [float])
  returns: ([float])
  sets or gets gain value
isplaying (soundnode self)
  returns: (boolean)
  true if soundnode is playing
loop (soundnode self, [boolean])
  returns: ([boolean])
  sets or gets looping value
pause (soundnode self)
  returns: ()
  pauses soundnode
pitch (soundnode self, [float])
  returns: ([float])
  sets or gets pitch value
play (soundnode self)
  returns: (boolean)
  plays soundnode. Make adjustments to pitch, gain, position, etc.before calling this function, otherwise you may hear not what you expect. These properties are only updated once per frame and when play is executed. Returns true if the sound is played, false if it couldn't play it (too many sounds playing) or nil if the sound playback is disabled.
pos (soundnode self, [float x,y,z])
  returns: ([float x,y,z])
  sets or gets position
refdist (soundnode self, [float])
  returns: ([float])
  sets or gets reference distance value
rewind (soundnode self)
  returns: ()
  rewinds soundnode
stop (soundnode self)
  returns: ()
  stops soundnode
update (soundnode self)
  returns: ()
  manualy updates the node parameters (gain, pitch, position...). This is done automaticly once per frame, use this function only if you want to make your changes work instantly. Remember that sound playback is threaded and you will instantly hear any changes to the soundplayback (unlike the graphics which is synchronized per frame).
velocity (soundnode self, [float x,y,z])
  returns: ([float x,y,z])
  sets or gets velocity vector