Multiple Speakers

Started by bigjim,

bigjim

Hi, I was just playing with the new BASS_SPEAKER_FRONT and BASS_SPEAKER_REAR flags.

I have two streams playing throught the front speakers and two streams through the rear speakers for monitoring.

I can adjust the volume of the front speakers ok, but I cant seem to change the rear speaker volumes, nothing happens. Also when I change the sample rate I get terrible crackling on the rear speakers.

Have I left out a flag perhaps, or is it more probable that it is a problem with my soundcard drivers?

I'm using WinXP sp1 with an Audigy Platinum Ex. However I'm NOT using the creative drivers I'm using the latest kx drivers from www.kxproject.com

Thanx

fredvs

#1
Hi Jim.

I have also a Audigy with WDM drivers and a AC97 built-in sound card on Win 98 SE and it seems to work well with rear and front speakers or both sound-cards for monitoring (see DJ MixK live who use your bpmf.dll for the BPM finder and your code ideas for the Wave-forms (cfr King of Emperor)).

fredvs

#2
Hi Jim  ;)

I have noted that, if you want to use the speakers assignment, you must use only one flag.

With my apps it works ONLY with one flag, for example if i use 2 flags :
BASS_StreamCreateFile(FALSE, f, 0, 0, BASS_STREAM_AUTOFREE and BASS_SPEAKER_FRONT)
the speakers assignment dont work.  :(

But if i use :

BASS_StreamCreateFile(FALSE, f, 0, 0,BASS_SPEAKER_FRONT)
the speakers assignment works.  :)

Maybe it could help you.

(: JOBnik! :)

Hi ;D

It's actually has to be - or - and not - and - between each flag.

Have fun!

8) JOBnik! 8)

fredvs

#4
Thanks Job, then "or" meens "and" and what if "or" must meen "or" ? :-/

(: JOBnik! :)

Hi ;D

or
---
0 or 0 = 0
0 or 1 = 1
1 or 0 = 1
1 or 1 = 1

and
----
0 and 0 = 0
0 and 1 = 0
1 and 0 = 0
1 and 1 = 1

see the difference?  ;) for example:

BASS_STREAM_DECODE or BASS_SAMPLE_FX = 2097280

BASS_STREAM_DECODE and BASS_SAMPLE_FX = 0

Have fun!

8) JOBnik! 8)

fredvs

#6
Alright, now i have well understand.

Thanks Job and good night (or day ?)

(: JOBnik! :)

Hi ;D

No problem :) Good Night :)

Have fun!

8) JOBnik! 8)

fredvs

#8
Hi JobNik. Sorry but in fact i have understand your and / or explication but why must i use

BASS_StreamCreateFile(FALSE, f, 0, 0, BASS_STREAM_AUTOFREE or BASS_SPEAKER_FRONT) and it works perfectly.

I want that bass create a stream that auto-free AND that uses front speakers...(1 and 1 = 1).

Will that say that bass choose or auto-free or speakers-front or both ?  If yes, why does it not work with AND ?

(Sorry to boring you, i know now how to do, i use "OR" in place of "AND", it works very well but i dont understand it)




 

DanaPaul

#9
QuoteWill that say that bass choose or auto-free or speakers-front or both ?  If yes, why does it not work with AND ?

Logical AND bitwise operand is mutually inclusive. Example...

$FF00FF00 AND $FF0000FF = $FF000000;

In the example above, both flags had the following bits (value)...

$FF000000

On the other hand, Logical OR bitwise operand is mutual and exclusive accumulating. Example...

$FF00FF00 OR $FF0000FF = $FF00FFFF;

Bitwise operand AND allows you to test the existence of, or exclude specific flags, while bitwise operand OR allows you to include additional flags.

Delphi equivalent is the SET type. But this Delphi type is cumbersome and not useful when using API.

Off subject, a very useful but often overlooked bitwise operand is XOR...

Enabled := (Chkbx1.Checked and FileExists) XOR
           (ChkBx2.Enabled and AllowCreate)