Class: NuWav::CartChunk
Instance Attribute Summary collapse
-
#artist ⇒ Object
Returns the value of attribute artist.
-
#category ⇒ Object
Returns the value of attribute category.
-
#classification ⇒ Object
Returns the value of attribute classification.
-
#client_id ⇒ Object
Returns the value of attribute client_id.
-
#cut_id ⇒ Object
Returns the value of attribute cut_id.
-
#end_date ⇒ Object
Returns the value of attribute end_date.
-
#end_time ⇒ Object
Returns the value of attribute end_time.
-
#level_reference ⇒ Object
Returns the value of attribute level_reference.
-
#out_cue ⇒ Object
Returns the value of attribute out_cue.
-
#post_timer ⇒ Object
Returns the value of attribute post_timer.
-
#producer_app_id ⇒ Object
Returns the value of attribute producer_app_id.
-
#producer_app_version ⇒ Object
Returns the value of attribute producer_app_version.
-
#reserved ⇒ Object
Returns the value of attribute reserved.
-
#start_date ⇒ Object
Returns the value of attribute start_date.
-
#start_time ⇒ Object
Returns the value of attribute start_time.
-
#tag_text ⇒ Object
Returns the value of attribute tag_text.
-
#title ⇒ Object
Returns the value of attribute title.
-
#url ⇒ Object
Returns the value of attribute url.
-
#user_def ⇒ Object
Returns the value of attribute user_def.
-
#version ⇒ Object
Returns the value of attribute version.
Attributes inherited from Chunk
Instance Method Summary collapse
Methods inherited from Chunk
#initialize, parse, #read_char, #read_dword, #read_word, #write_char, #write_dword, #write_word
Constructor Details
This class inherits a constructor from NuWav::Chunk
Instance Attribute Details
#artist ⇒ Object
Returns the value of attribute artist.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def artist @artist end |
#category ⇒ Object
Returns the value of attribute category.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def category @category end |
#classification ⇒ Object
Returns the value of attribute classification.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def classification @classification end |
#client_id ⇒ Object
Returns the value of attribute client_id.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def client_id @client_id end |
#cut_id ⇒ Object
Returns the value of attribute cut_id.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def cut_id @cut_id end |
#end_date ⇒ Object
Returns the value of attribute end_date.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def end_date @end_date end |
#end_time ⇒ Object
Returns the value of attribute end_time.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def end_time @end_time end |
#level_reference ⇒ Object
Returns the value of attribute level_reference.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def level_reference @level_reference end |
#out_cue ⇒ Object
Returns the value of attribute out_cue.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def out_cue @out_cue end |
#post_timer ⇒ Object
Returns the value of attribute post_timer.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def post_timer @post_timer end |
#producer_app_id ⇒ Object
Returns the value of attribute producer_app_id.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def producer_app_id @producer_app_id end |
#producer_app_version ⇒ Object
Returns the value of attribute producer_app_version.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def producer_app_version @producer_app_version end |
#reserved ⇒ Object
Returns the value of attribute reserved.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def reserved @reserved end |
#start_date ⇒ Object
Returns the value of attribute start_date.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def start_date @start_date end |
#start_time ⇒ Object
Returns the value of attribute start_time.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def start_time @start_time end |
#tag_text ⇒ Object
Returns the value of attribute tag_text.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def tag_text @tag_text end |
#title ⇒ Object
Returns the value of attribute title.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def title @title end |
#url ⇒ Object
Returns the value of attribute url.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def url @url end |
#user_def ⇒ Object
Returns the value of attribute user_def.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def user_def @user_def end |
#version ⇒ Object
Returns the value of attribute version.
215 216 217 |
# File 'lib/nu_wav/chunk.rb', line 215 def version @version end |
Instance Method Details
#parse ⇒ Object
218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 |
# File 'lib/nu_wav/chunk.rb', line 218 def parse @version = read_char(0,4) @title = read_char(4,64) @artist = read_char(68,64) @cut_id = read_char(132,64) @client_id = read_char(196,64) @category = read_char(260,64) @classification = read_char(324,64) @out_cue = read_char(388,64) @start_date = read_char(452,10) @start_time = read_char(462,8) @end_date = read_char(470,10) @end_time = read_char(480,8) @producer_app_id = read_char(488,64) @producer_app_version = read_char(552,64) @user_def = read_char(616,64) @level_reference = read_dword(680) @post_timer = read_char(684,64) @reserved = read_char(748,276) @url = read_char(1024,1024) @tag_text = read_char(2048) end |
#to_binary(options = {}) ⇒ Object
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 |
# File 'lib/nu_wav/chunk.rb', line 245 def to_binary(={}) out = "cart" + write_dword(2048 + @tag_text.length ) out += write_char(@version,4) out += write_char(@title,64) out += write_char(@artist,64) out += write_char(@cut_id,64) out += write_char(@client_id,64) out += write_char(@category,64) out += write_char(@classification,64) out += write_char(@out_cue,64) out += write_char(@start_date,10) out += write_char(@start_time,8) out += write_char(@end_date,10) out += write_char(@end_time,8) out += write_char(@producer_app_id,64) out += write_char(@producer_app_version,64) out += write_char(@user_def,64) out += write_dword(@level_reference) out += write_char(@post_timer,64) out += write_char(@reserved,276) out += write_char(@url,1024) out += write_char(@tag_text) out end |
#to_s ⇒ Object
241 242 243 |
# File 'lib/nu_wav/chunk.rb', line 241 def to_s "<chunk type:cart version:#{version}, title:#{title}, artist:#{artist}, cut_id:#{cut_id}, client_id:#{client_id}, category:#{category}, classification:#{classification}, out_cue:#{out_cue}, start_date:#{start_date}, start_time:#{start_time}, end_date:#{end_date}, end_time:#{end_time}, producer_app_id:#{producer_app_id}, producer_app_version:#{producer_app_version}, user_def:#{user_def}, level_reference:#{level_reference}, post_timer:#{post_timer}, reserved:#{reserved}, url:#{url}, tag_text:#{tag_text} />" end |