Author Topic: Bass with ASIO???  (Read 3201 times)

Tony_Starks

  • Posts: 1
Bass with ASIO???
« on: 2 Jun '03 - 16:40 »
Hello I have a rather silly question,

I was looking at the Bass documentation and some questions arose.  I am using the ASIO 2.0 API to stream multichannel data to my 8 input soundcard.  Now, I am at the point where I need to figure out how to take apart the wav file, so to speak, and get it ready for streaming (ie. load it into fixed size buffers).  The BASS utility seems like it can do this kind of thing, meaning it can take a wave file and convert it to a smaller chunk, ready for me to store in an output buffer.  Is this correct?  If it is, can I use this to help me stream the wave file even though I am using ASIO 2.0?

Does anyone know how I can sample the wave file and send pre-defined chunks to an output buffer?  I am using Delphi.

Thanks, sorry long question,
Tony

Ian @ un4seen

  • Administrator
  • Posts: 26222
Re: Bass with ASIO???
« Reply #1 on: 2 Jun '03 - 21:32 »
Yes, you can play WAVs (or any of the other BASS supported formats) via ASIO, using decoding channels. As you're not actually outputting any sound via BASS, you could/should also use the "no sound" device when you call BASS_Init. See the WRITEWAV example - instead of writing to disk, write to the ASIO buffer :)

As ASIO buffers are mono though, you'll have to split the left and right channels from stereo sample data, if you play stereo files.