code: def pcm(self, sampleRate, filename, stereo=False):
      # as comparing sample by sample will probably fail the results, in this test
      # a filename that lasts 10s with impulses of 1 every second is loaded.
      # the sum of the impulses computed and compared with the expectedSum value.
      loader = sAudioLoader(filename=join(testdata.audio_dir, filename))
      p = Pool()
  
      loader.audio >> (p, "audio")
      loader.numberChannels >> (p, "nChannels")
      loader.sampleRate >> (p, "sampleRate")
      loader.md5 >> (p, "md5")
      loader.bit_rate >> (p, "bit_rate")
      loader.codec >> (p, "codec")
  
      run(loader)
  
      self.assertEqual(p["sampleRate"], sampleRate)
      if stereo:
          self.assertEqual(p["nChannels"], 2)
      else:
          self.assertEqual(p["nChannels"], 1)
  
      audio = p["audio"]
  
      self.assertEqual(len(audio), 10 * sampleRate)
  
      sum = 0
  
      # compute sum
      for stereoSample in audio:
          sum += stereoSample[0] + stereoSample[1]
  
      if stereo:
          self.assertAlmostEqual(sum, 18, 1e-3)
      else:
          self.assertAlmostEqual(sum, 9, 1e-3)
  
file_path: essentia/test/src/unittests/io/test_audioloader_streaming.py
imports: from essentia_test import *
  import essentia
  from essentia.streaming import AudioLoader
  import sys
label_desc: Use image node_id 1 for calling the TestAudioLoader_Streaming obj's underlying member method code with example usage: obj.pcm(sampleRate, filename, stereo) without return types