lib/builders/basic_builder.rb
#Reads the data from <audio></audio> - node
#and creates an Audio - object from that data.
Reads the data from  - node
and creates an Audio - object from that data.
Reads the data from - node and creates an Audio - object from that data .
def read_audio(audio)
    file = XPath.first(audio, "file").text
    start_point = XPath.first(audio, "start-point").text
    end_point = XPath.first(audio, "end-point").text
    place = XPath.first(audio, "place").text
    volume_points = []
    XPath.each(audio, "volumepoints/volumepoint"){|vol_point|
      volume_points << read_volume_point(vol_point)
    }
    return Audio.new(file, start_point, end_point, place, volume_points)
  end
def read_audio ( audio ) file = XPath . first ( audio , "file" ) . text start_point = XPath . first ( audio , "start-point" ) . text end_point = XPath . first ( audio , "end-point" ) . text place = XPath . first ( audio , "place" ) . text volume_points = [ ] XPath . each ( audio , "volumepoints/volumepoint" ) { | vol_point | volume_points << read_volume_point ( vol_point ) } return Audio . new ( file , start_point , end_point , place , volume_points ) end
Reads the data from <audio></audio> - node
and creates an Audio - object from that data.
Reads the data from <audio > < / audio > - node and creates an Audio - object from that data .
#If no VolumePoints are found, an empty array is given. #This signals Audio to create default volumepoints.
audio
<not_specific>