class BMFFGlitch::Sample
Constants
- AUDIOSAMPLE
- HINTSAMPLE
- SYNCSAMPLE
- VISUALSAMPLE
Attributes
chunk_number[RW]
chunk_offset[RW]
data[RW]
file_offset[RW]
flag[RW]
sample_delta[RW]
sample_description_index[RW]
sample_number[RW]
sample_offset[RW]
size[RW]
Public Class Methods
new(sample_number, flag)
click to toggle source
# File lib/bmffglitch/sample.rb, line 9 def initialize(sample_number, flag) @sample_number = sample_number @flag = flag @data = "" @size = 0 @sample_offset = 0 @sample_delta = 0 @chunk_number = 0 @chunk_offset = 0 @file_offset = 0 @sample_description_index = 0 end
Public Instance Methods
initialize_copy(obj)
click to toggle source
# File lib/bmffglitch/sample.rb, line 22 def initialize_copy(obj) # make deep copy @sample_number = obj.sample_number @flag = obj.flag @data = obj.data.dup @size = obj.size @sample_offset = obj.sample_offset @sample_delta = obj.sample_delta @chunk_number = obj.chunk_number @chunk_offset = obj.chunk_offset @file_offset = obj.file_offset @sample_description_index = obj.sample_description_index end
is_audiosample?()
click to toggle source
# File lib/bmffglitch/sample.rb, line 40 def is_audiosample? (flag & AUDIOSAMPLE) != 0 ? true : false end
is_hintsample?()
click to toggle source
# File lib/bmffglitch/sample.rb, line 44 def is_hintsample? (flag & HINTSAMPLE) != 0 ? true : false end
is_syncsample?()
click to toggle source
# File lib/bmffglitch/sample.rb, line 48 def is_syncsample? (flag & SYNCSAMPLE) != 0 ? true : false end
is_visualsample?()
click to toggle source
# File lib/bmffglitch/sample.rb, line 36 def is_visualsample? (flag & VISUALSAMPLE) != 0 ? true : false end