Module: Ray::Audio
- Defined in:
- lib/ray/audio.rb,
ext/audio.c
Class Method Summary collapse
-
.direction ⇒ Ray::Vector3
The orientation of the listener.
-
.direction=(dir) ⇒ Object
Sets the orientation of the listener.
-
.pos ⇒ Ray::Vector3
The position of the listener.
-
.pos=(pos) ⇒ Object
Sets the position of the listener.
- .position ⇒ Object
- .position= ⇒ Object
-
.volume ⇒ Float
is the maximum.
-
.volume=(val) ⇒ Object
Sets the global volume.
Class Method Details
.direction ⇒ Ray::Vector3
Returns The orientation of the listener.
46 47 48 |
# File 'ext/audio.c', line 46 VALUE ray_audio_direction(VALUE self) { return ray_vector3_to_rb(say_audio_get_direction()); } |
.direction=(dir) ⇒ Object
Sets the orientation of the listener.
55 56 57 58 |
# File 'ext/audio.c', line 55
VALUE ray_audio_set_direction(VALUE self, VALUE dir) {
say_audio_set_direction(ray_convert_to_vector3(dir));
return dir;
}
|
.pos ⇒ Ray::Vector3
Returns The position of the listener.
28 29 30 |
# File 'ext/audio.c', line 28 VALUE ray_audio_pos(VALUE self) { return ray_vector3_to_rb(say_audio_get_pos()); } |
.pos=(pos) ⇒ Object
Sets the position of the listener. listener.
38 39 40 41 |
# File 'ext/audio.c', line 38
VALUE ray_audio_set_pos(VALUE self, VALUE pos) {
say_audio_set_pos(ray_convert_to_vector3(pos));
return pos;
}
|
.position ⇒ Object
3 |
# File 'lib/ray/audio.rb', line 3 alias position pos |
.position= ⇒ Object
4 |
# File 'lib/ray/audio.rb', line 4 alias position= pos= |
.volume ⇒ Float
is the maximum.
9 10 11 |
# File 'ext/audio.c', line 9 VALUE ray_audio_volume(VALUE self) { return rb_float_new(say_audio_get_volume()); } |
.volume=(val) ⇒ Object
Sets the global volume.
18 19 20 21 22 23 |
# File 'ext/audio.c', line 18
VALUE ray_audio_set_volume(VALUE self, VALUE value) {
float volume = (float)NUM2DBL(value);
say_audio_set_volume(volume);
return value;
}
|