Class: Raylib::AudioStream

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

Overview

AudioStream, custom audio stream

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.create(buffer, processor, sample_rate, sample_size, channels) ⇒ Object



12
13
14
15
16
17
18
19
20
# File 'lib/raylib/core/structs/audio_stream.rb', line 12

def self.create(buffer, processor, sample_rate, sample_size, channels)
  new.tap do |instance|
    instance[:buffer] = buffer
    instance[:processor] = processor
    instance[:sampleRate] = sample_rate
    instance[:sampleSize] = sample_size
    instance[:channels] = channels
  end
end

Instance Method Details

#bufferrAudioBuffer *

Pointer to internal data used by the audio system

Returns:

  • (rAudioBuffer *)

    buffer



28
# File 'lib/raylib/core/structs/audio_stream.rb', line 28

def buffer = self[:buffer]

#buffer=(new_buffer) ⇒ Object

Sets Pointer to internal data used by the audio system



31
32
33
# File 'lib/raylib/core/structs/audio_stream.rb', line 31

def buffer=(new_buffer)
  self[:buffer] = new_buffer
end

#channelsInteger

Number of channels (1-mono, 2-stereo, …)

Returns:

  • (Integer)

    channels



64
# File 'lib/raylib/core/structs/audio_stream.rb', line 64

def channels = self[:channels]

#channels=(new_channels) ⇒ Object

Sets Number of channels (1-mono, 2-stereo, …)



67
68
69
# File 'lib/raylib/core/structs/audio_stream.rb', line 67

def channels=(new_channels)
  self[:channels] = new_channels
end

#processorrAudioProcessor *

Pointer to internal data processor, useful for audio effects

Returns:

  • (rAudioProcessor *)

    processor



37
# File 'lib/raylib/core/structs/audio_stream.rb', line 37

def processor = self[:processor]

#processor=(new_processor) ⇒ Object

Sets Pointer to internal data processor, useful for audio effects



40
41
42
# File 'lib/raylib/core/structs/audio_stream.rb', line 40

def processor=(new_processor)
  self[:processor] = new_processor
end

#sample_rateInteger

Frequency (samples per second)

Returns:

  • (Integer)

    sampleRate



46
# File 'lib/raylib/core/structs/audio_stream.rb', line 46

def sample_rate = self[:sampleRate]

#sample_rate=(new_sample_rate) ⇒ Object

Sets Frequency (samples per second)



49
50
51
# File 'lib/raylib/core/structs/audio_stream.rb', line 49

def sample_rate=(new_sample_rate)
  self[:sampleRate] = new_sample_rate
end

#sample_sizeInteger

Bit depth (bits per sample): 8, 16, 32 (24 not supported)

Returns:

  • (Integer)

    sampleSize



55
# File 'lib/raylib/core/structs/audio_stream.rb', line 55

def sample_size = self[:sampleSize]

#sample_size=(new_sample_size) ⇒ Object

Sets Bit depth (bits per sample): 8, 16, 32 (24 not supported)



58
59
60
# File 'lib/raylib/core/structs/audio_stream.rb', line 58

def sample_size=(new_sample_size)
  self[:sampleSize] = new_sample_size
end

#to_sObject



22
23
24
# File 'lib/raylib/core/structs/audio_stream.rb', line 22

def to_s
  "Raylib::AudioStream##{object_id} buffer=#{buffer} processor=#{processor} sample_rate=#{sample_rate} sample_size=#{sample_size} channels=#{channels}"
end