Render satisfies the INode interface. It is called by renderer at every frame and is used to update the audio source position and direction
(gl *gls.GLS)
| 296 | // It is called by renderer at every frame and is used to |
| 297 | // update the audio source position and direction |
| 298 | func (p *Player) Render(gl *gls.GLS) { |
| 299 | |
| 300 | // Sets the player source world position |
| 301 | var wpos math32.Vector3 |
| 302 | p.WorldPosition(&wpos) |
| 303 | al.Source3f(p.source, al.Position, wpos.X, wpos.Y, wpos.Z) |
| 304 | |
| 305 | // Sets the player source world direction |
| 306 | var wdir math32.Vector3 |
| 307 | p.WorldDirection(&wdir) |
| 308 | al.Source3f(p.source, al.Direction, wdir.X, wdir.Y, wdir.Z) |
| 309 | } |
| 310 | |
| 311 | // Goroutine to fill PCM buffers with decoded data for OpenAL |
| 312 | func (p *Player) run() { |
nothing calls this directly
no test coverage detected