Class: Discorb::Voice::OggAudio
- Inherits:
-
Object
- Object
- Discorb::Voice::OggAudio
- Defined in:
- lib/discorb/voice/source.rb
Overview
Plays audio from a ogg file.
Instance Attribute Summary collapse
-
#io ⇒ Object
readonly
Returns the value of attribute io.
Instance Method Summary collapse
-
#initialize(src) ⇒ OggAudio
constructor
Opens an ogg file.
Constructor Details
#initialize(src) ⇒ OggAudio
Opens an ogg file.
104 105 106 107 108 109 110 |
# File 'lib/discorb/voice/source.rb', line 104 def initialize(src) @io = if src.is_a?(String) File.open(src, "rb") else src end end |
Instance Attribute Details
#io ⇒ Object (readonly)
Returns the value of attribute io.
97 98 99 |
# File 'lib/discorb/voice/source.rb', line 97 def io @io end |