code: def compressed(self, sampleRate, filename, stereo=False):
      # for compressed files we will compare only those values above certain threshold.
      noisefloor = 10.0 / 32767.0
  
      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)
  
      if stereo:
          self.assertEqual(p["nChannels"], 2)
      else:
          self.assertEqual(p["nChannels"], 1)
      self.assertEqual(p["sampleRate"], sampleRate)
  
      sum = 0
  
      for stereoSample in p["audio"]:
          left = abs(stereoSample[0])
          right = abs(stereoSample[1])
  
          # don't add absolute values!
          if left > noisefloor:
              sum += round(stereoSample[0])
          if right > noisefloor:
              sum += round(stereoSample[1])
  
      # TODO: ffmpeg seems to decode ogg files in opposite phase, thus:
      if sum < 0:
          print(
              "WARNING: Essentia uses a version of FFMpeg that does reverse decoding of Ogg files..."
          )
          sum = abs(sum)
  
      if stereo:
          self.assertEqual(sum, 18)
      else:
          self.assertEqual(sum, 9)
  
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 2 for calling the TestAudioLoader_Streaming obj's underlying member method code with example usage: obj.compressed(sampleRate, filename, stereo) without return types