title: Visualization of streamed music from Spotify
body: <p>I'm streaming music from Spotify with C# wrapper ohLibSpotify and play it with NAudio. Now I'm trying to create a spectrum visualization for the data i receive.</p>
  
  <p>When i get data from libspotify, following callback gets called:</p>
  
  <pre><code>public void MusicDeliveryCallback(SpotifySession session, AudioFormat format, IntPtr frames, int num_frames)
  {
      //handle received music data from spotify for streaming
      //format: audio format for streaming
      //frames: pointer to the byte-data in storage
  
      var size = num_frames * format.channels * 2;
      if (size != 0)
      {
          _copiedFrames = new byte[size];
          Marshal.Copy(frames, _copiedFrames, 0, size);   //Copy Pointer Bytes to _copiedFrames
          _bufferedWaveProvider.AddSamples(_copiedFrames, 0, size);    //adding bytes from _copiedFrames as samples
      }
  }
  </code></pre>
  
  <p>Is it possible to analyze the data i pass to the BufferedWaveProvider to create a realtime visualization? And can somebody explain how?</p>