Module: Sound::FormatLibrary::MMLib
- Includes:
- Base
- Defined in:
- lib/sound/format_library/mmlib.rb
Defined Under Namespace
Classes: WAVEFORMATEX
Constant Summary collapse
- WAVE_FORMAT_PCM =
1- DEFAULT_FORMAT =
WAVE_FORMAT_PCM
Instance Attribute Summary collapse
-
#wfx ⇒ Object
Returns the value of attribute wfx.
Instance Method Summary collapse
Methods included from Base
Instance Attribute Details
#wfx ⇒ Object
Returns the value of attribute wfx.
11 12 13 |
# File 'lib/sound/format_library/mmlib.rb', line 11 def wfx @wfx end |
Instance Method Details
#new_format ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# 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 ⇒ Object
24 25 26 |
# File 'lib/sound/format_library/mmlib.rb', line 24 def pointer self.wfx.pointer end |