title: How to play a spotify music stream
body: <p>First of all, i am new to audio-programming, so bear with me.</p>
  
  <p>I am trying to play spotify music with NAudio or BASS.Net or any other .net audio-library.</p>
  
  <p>As far as i known, libspotify delivers music as raw PCM data. <a href="https://stackoverflow.com/questions/10760949/what-is-the-sample-rate-of-spotify-stream-libspotify">what is the sample rate of spotify stream (libspotify)?</a></p>
  
  <p>From the spotify docs:
  Samples are delivered as integers, see sp_audioformat. One frame consists of the same number of samples as there are channels. I.e. interleaving is on the sample level.</p>
  
  <p>When i try to play a song, spotify makes a callback with a 8192 byte buffer</p>
  
  <p>channels = 2</p>
  
  <p>sample_rate = 44100</p>
  
  <p>num_frames = 2048</p>
  
  <p>I need a little help translating this information to NAudio terms.</p>
  
  <p>I have also tried with a spotify to Bass.Net sample (BASSPlayer.cs). But i haven't heard a single note from my speakers yet. 
  I have tried to play an mp3-song with NAudio and Bass.NET and this works fine, so the speaker volume is ok.
  <a href="https://github.com/Alxandr/SpotiFire/blob/master/SpotiFire.Server/BASSPlayer.cs" rel="nofollow noreferrer">https://github.com/Alxandr/SpotiFire/blob/master/SpotiFire.Server/BASSPlayer.cs</a></p>