code: def load(
      self,
      inputSampleRate,
      outputSampleRate,
      filename,
      downmix,
      replayGain,
      startTime,
      endTime,
  ):
      # for this test we use audio files which have impulses at every sample.
      # files last 30s, longer than 10s, so the resampling is more accurate
  
      scale = math.pow(10, (replayGain + 6.0) / 20.0)
      if scale > 1:
          scale = 1
  
      loader = EasyLoader(
          filename=filename,
          sampleRate=outputSampleRate,
          downmix=downmix,
          startTime=startTime,
          endTime=endTime,
          replayGain=replayGain,
      )
      pool = Pool()
  
      loader.audio >> (pool, "audio")
      run(loader)
  
      length = int((endTime - startTime) * outputSampleRate)
      # it is kinda weird, some archs (64bit) produce 1 sample more when resampling
      # than what is expected. It is not that much of a problem, though, so we accept
      # it as a correct result
      self.assert_(
          len(pool["audio"]) == length
          or len(pool["audio"]) == length + 1
      )
      self.assertAlmostEqual(sum(pool["audio"]), length * scale, 1e-3)
  
file_path: essentia/test/src/unittests/io/test_easyloader_streaming.py
imports: from essentia_test import *
  from essentia.streaming import EasyLoader, MonoLoader
  import sys
  import math
label_desc: Use image node_id 1 for calling the TestEasyLoader_Streaming obj's underlying member method code with example usage: obj.load(inputSampleRate, outputSampleRate, filename, downmix, replayGain, startTime, endTime) without return types