Class: IO

Inherits:
Object
  • Object
show all
Defined in:
lib/windsp.rb

Class Method Summary collapse

Class Method Details

.binwrite(name, data, offset = nil) ⇒ Object



134
135
136
137
138
139
140
141
142
# File 'lib/windsp.rb', line 134

def binwrite(name, data, offset = nil)
  if name == "/dev/dsp"
    WinDSP.open do |dsp|
      dsp.binwrite(data)
    end
  else
    windsp_orig_binwrite(path, data, offset)
  end
end

.windsp_orig_binwriteObject



133
# File 'lib/windsp.rb', line 133

alias windsp_orig_binwrite binwrite

.windsp_orig_writeObject



122
# File 'lib/windsp.rb', line 122

alias windsp_orig_write write

.write(name, data, offset = nil) ⇒ Object



123
124
125
126
127
128
129
130
131
# File 'lib/windsp.rb', line 123

def write(name, data, offset = nil)
  if name == "/dev/dsp"
    WinDSP.open do |dsp|
      dsp.write(data)
    end
  else
    windsp_orig_binwrite(path, data, offset)
  end
end