Class: Raylib::AudioStream
- Inherits:
-
FFI::Struct
- Object
- FFI::Struct
- Raylib::AudioStream
- Defined in:
- lib/raylib/core/structs/audio_stream.rb
Overview
AudioStream, custom audio stream
Class Method Summary collapse
Instance Method Summary collapse
-
#buffer ⇒ rAudioBuffer *
Pointer to internal data used by the audio system.
-
#buffer=(new_buffer) ⇒ Object
Sets Pointer to internal data used by the audio system.
-
#channels ⇒ Integer
Number of channels (1-mono, 2-stereo, …).
-
#channels=(new_channels) ⇒ Object
Sets Number of channels (1-mono, 2-stereo, …).
-
#processor ⇒ rAudioProcessor *
Pointer to internal data processor, useful for audio effects.
-
#processor=(new_processor) ⇒ Object
Sets Pointer to internal data processor, useful for audio effects.
-
#sample_rate ⇒ Integer
Frequency (samples per second).
-
#sample_rate=(new_sample_rate) ⇒ Object
Sets Frequency (samples per second).
-
#sample_size ⇒ Integer
Bit depth (bits per sample): 8, 16, 32 (24 not supported).
-
#sample_size=(new_sample_size) ⇒ Object
Sets Bit depth (bits per sample): 8, 16, 32 (24 not supported).
- #to_s ⇒ Object
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
#buffer ⇒ rAudioBuffer *
Pointer to internal data used by the audio system
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 |
#channels ⇒ Integer
Number of channels (1-mono, 2-stereo, …)
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 |
#processor ⇒ rAudioProcessor *
Pointer to internal data processor, useful for audio effects
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_rate ⇒ Integer
Frequency (samples per second)
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_size ⇒ Integer
Bit depth (bits per sample): 8, 16, 32 (24 not supported)
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_s ⇒ Object
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 |