Class: Raylib::Sound

Inherits:
FFI::Struct
  • Object
show all
Defined in:
lib/raylib/core/structs/sound.rb

Overview

Sound

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(stream, frame_count) ⇒ Object



9
10
11
12
13
14
# File 'lib/raylib/core/structs/sound.rb', line 9

def self.create(stream, frame_count)
  new.tap do |instance|
    instance[:stream] = stream
    instance[:frameCount] = frame_count
  end
end

Instance Method Details

#frame_countInteger

Total number of frames (considering channels)

Returns:

  • (Integer)

    frameCount



31
# File 'lib/raylib/core/structs/sound.rb', line 31

def frame_count = self[:frameCount]

#frame_count=(new_frame_count) ⇒ Object

Sets Total number of frames (considering channels)



34
35
36
# File 'lib/raylib/core/structs/sound.rb', line 34

def frame_count=(new_frame_count)
  self[:frameCount] = new_frame_count
end

#streamAudioStream

Audio stream

Returns:



22
# File 'lib/raylib/core/structs/sound.rb', line 22

def stream = self[:stream]

#stream=(new_stream) ⇒ Object

Sets Audio stream



25
26
27
# File 'lib/raylib/core/structs/sound.rb', line 25

def stream=(new_stream)
  self[:stream] = new_stream
end

#to_sObject



16
17
18
# File 'lib/raylib/core/structs/sound.rb', line 16

def to_s
  "Raylib::Sound##{object_id} stream=#{stream} frame_count=#{frame_count}"
end