module Sound::FormatLibrary::MMLib

Constants

DEFAULT_FORMAT
WAVE_FORMAT_PCM

Attributes

wfx[RW]

Public Instance Methods

new_format() click to toggle source
# File lib/sound/format_library/mmlib.rb, line 13
def new_format
  self.wfx = WAVEFORMATEX.new
  self.wfx[:wFormatTag] = type
  self.wfx[:nChannels] = channels
  self.wfx[:nSamplesPerSec] = sample_rate
  self.wfx[:wBitsPerSample] = bps
  self.wfx[:cbSize] = 0
  self.wfx[:nBlockAlign] = block_align
  self.wfx[:nAvgBytesPerSec] = avg_bps
end
pointer() click to toggle source
# File lib/sound/format_library/mmlib.rb, line 24
def pointer
  self.wfx.pointer
end