23 May '13 - 00:02 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
 
   Home   Help Search Login Register  
Pages: [1]
  Reply  |  Print  
Author Topic: How to play multi-channels (beyond stereo) 5.1 dolby  (Read 608 times)
pwatel
Posts: 48


« on: 8 Mar '12 - 08:11 »
Reply with quoteQuote

Hi
what are the steps to
init bass
then find out that the file is not stereo and I guess re-init bass to be able to play in WASAPI or asio
 in direct sound it does play
Thanks
PW
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #1 on: 8 Mar '12 - 16:08 »
Reply with quoteQuote

I'm not sure I understand the question. Are you asking whether you have to use WASAPI or ASIO to play 5.1 files? If so, the answer is no, it is possible to play them with standard BASS/DirectSound output too. Note the sample format specified in the BASS_Init call generally has no effect on the device's output format (see the BASS_Init docs for exceptions), so there is no need for that to match the file's format.

If that isn't what you were asking, please clarify Smiley
Logged
pwatel
Posts: 48


« Reply #2 on: 9 Mar '12 - 07:52 »
Reply with quoteQuote

The question
Was can one play these file using WASAPI or ASIO ?
and if yes what flag needs to be set on the various init function calls.

Using direct sound, it works I have checked it
Thank you sorry for a poorly formulated question
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #3 on: 9 Mar '12 - 15:19 »
Reply with quoteQuote

Oh, I see. With ASIO, you would join 6 mono ASIO channels using BASS_ASIO_ChannelJoin (enable 1 channel and join 5 others to it). With WASAPI, you would set the BASS_WASAPI_Init "chans" parameter to 6. You can then call BASS_ChannelGetData on the 6 channel stream (created with the BASS_STREAM_DECODE flag) in your ASIOPROC or WASAPIPROC callback function. You don't need to do anything special in your BASS_Init call, but you could use the "no sound" device.

One thing to note is that the ASIO driver may have a different channel/speaker order, and you may need to swap the rear and cen/lfe channels around. The easiest way to do that is using the BASSmix add-on's splitter stream feature and its "chanmap" option. For example, like this...

int chanmap[]={0, 1, 4, 5, 2, 3, -1}; // channel mapping to swap rear and cen/lfe channels
split=BASS_Split_StreamCreate(source, BASS_STREAM_DECODE, chanmap); // create the splitter stream

You would then use the "split" handle in the ASIOPROC's BASS_ChannelGetData call.
Logged
Ian @ un4seen
Administrator
Posts: 15269


« Reply #4 on: 22 Mar '12 - 17:01 »
Reply with quoteQuote

Just a little follow-up... With the release of BASSASIO 1.2, the ASIO channel reordering above can now be achieved by using the new BASS_ASIO_JOINORDER option, like this...

BASS_ASIO_Init(device, BASS_ASIO_JOINORDER); // initalize ASIO device with chronological joined channel ordering
...
// join together 6 channels for 5.1 output with rear and cen/lfe channels swapped
BASS_ASIO_ChannelEnable(0, 0, AsioProc, 0); // enable 1st output channel (front-left)
BASS_ASIO_ChannelJoin(0, 1, 0); // join the 2nd channel to it (front-right)
BASS_ASIO_ChannelJoin(0, 4, 0); // and the 5th channel (rear-left)
BASS_ASIO_ChannelJoin(0, 5, 0); // and the 6th channel (rear-right)
BASS_ASIO_ChannelJoin(0, 2, 0); // and the 3rd channel (center)
BASS_ASIO_ChannelJoin(0, 3, 0); // and the 4th channel (LFE)
Logged
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.18 | SMF © 2013, Simple Machines