Class: Raylib::Music
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::Music
- Defined in:
- lib/raylib/core/structs/music.rb
Overview
Music, audio stream, anything longer than ~10 seconds should be streamed
Class Method Summary collapse
Instance Method Summary collapse
-
#ctx_data ⇒ void *
Audio context data, depends on type.
-
#ctx_data=(new_ctx_data) ⇒ Object
Sets Audio context data, depends on type.
-
#ctx_type ⇒ Integer
Type of music context (audio filetype).
-
#ctx_type=(new_ctx_type) ⇒ Object
Sets Type of music context (audio filetype).
-
#frame_count ⇒ Integer
Total number of frames (considering channels).
-
#frame_count=(new_frame_count) ⇒ Object
Sets Total number of frames (considering channels).
-
#looping ⇒ bool
Music looping enable.
-
#looping=(new_looping) ⇒ Object
Sets Music looping enable.
-
#stream ⇒ AudioStream
Audio stream.
-
#stream=(new_stream) ⇒ Object
Sets Audio stream.
- #to_s ⇒ Object
Class Method Details
.create(stream, frame_count, looping, ctx_type, ctx_data) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/raylib/core/structs/music.rb', line 12 def self.create(stream, frame_count, looping, ctx_type, ctx_data) new.tap do |instance| instance[:stream] = stream instance[:frameCount] = frame_count instance[:looping] = looping instance[:ctxType] = ctx_type instance[:ctxData] = ctx_data end end |
Instance Method Details
#ctx_data ⇒ void *
Audio context data, depends on type
64 |
# File 'lib/raylib/core/structs/music.rb', line 64 def ctx_data = self[:ctxData] |
#ctx_data=(new_ctx_data) ⇒ Object
Sets Audio context data, depends on type
67 68 69 |
# File 'lib/raylib/core/structs/music.rb', line 67 def ctx_data=(new_ctx_data) self[:ctxData] = new_ctx_data end |
#ctx_type ⇒ Integer
Type of music context (audio filetype)
55 |
# File 'lib/raylib/core/structs/music.rb', line 55 def ctx_type = self[:ctxType] |
#ctx_type=(new_ctx_type) ⇒ Object
Sets Type of music context (audio filetype)
58 59 60 |
# File 'lib/raylib/core/structs/music.rb', line 58 def ctx_type=(new_ctx_type) self[:ctxType] = new_ctx_type end |
#frame_count ⇒ Integer
Total number of frames (considering channels)
37 |
# File 'lib/raylib/core/structs/music.rb', line 37 def frame_count = self[:frameCount] |
#frame_count=(new_frame_count) ⇒ Object
Sets Total number of frames (considering channels)
40 41 42 |
# File 'lib/raylib/core/structs/music.rb', line 40 def frame_count=(new_frame_count) self[:frameCount] = new_frame_count end |
#looping ⇒ bool
Music looping enable
46 |
# File 'lib/raylib/core/structs/music.rb', line 46 def looping = self[:looping] |
#looping=(new_looping) ⇒ Object
Sets Music looping enable
49 50 51 |
# File 'lib/raylib/core/structs/music.rb', line 49 def looping=(new_looping) self[:looping] = new_looping end |
#stream ⇒ AudioStream
Audio stream
28 |
# File 'lib/raylib/core/structs/music.rb', line 28 def stream = self[:stream] |
#stream=(new_stream) ⇒ Object
Sets Audio stream
31 32 33 |
# File 'lib/raylib/core/structs/music.rb', line 31 def stream=(new_stream) self[:stream] = new_stream end |
#to_s ⇒ Object
22 23 24 |
# File 'lib/raylib/core/structs/music.rb', line 22 def to_s "Raylib::Music##{object_id} stream=#{stream} frame_count=#{frame_count} looping=#{looping} ctx_type=#{ctx_type} ctx_data=#{ctx_data}" end |