Module: Ray::Audio
- Defined in:
- ext/audio.c
Class Method Summary collapse
- .direction ⇒ Object
-
.direction=(dir) ⇒ Object
Sets the orientation of the listener.
- .pos ⇒ Object
-
.pos=(pos) ⇒ Object
Sets the position of the listener.
- .volume ⇒ Object
-
.volume=(val) ⇒ Object
Sets the global volume.
Class Method Details
.direction ⇒ Object
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
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 ⇒ Object
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
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;
}
|
.volume ⇒ Object
8 9 10 |
# File 'ext/audio.c', line 8 VALUE ray_audio_volume(VALUE self) { return rb_float_new(say_audio_get_volume()); } |
.volume=(val) ⇒ Object
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;
}
|