You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sampler_loop.rb
    path of file: ./repos/wavefile/lib/wavefile
    
    the code of the file until where you have to start completion: module WaveFile
  # Public: Error that is raised when constructing a SamplerLoop instance that is invalid.
  #         "Invalid" means that one or more
    
    def initialize(id: required("id"),
                  type: required("type"),
                  start_sample_frame: required("start_sample_frame"),
                  end_sample_frame: required("end_sample_frame"),
                  fraction: required("fraction"),
                  play_count: required("play_count"))
      type = normalize_type(type)
      if play_count == 0
        play_count = Float::INFINITY
      end