Author Topic: Multiple Speakers  (Read 4907 times)

bigjim

  • Posts: 232
Multiple Speakers
« on: 14 May '03 - 00:50 »
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

  • Posts: 325
Re: Multiple Speakers
« Reply #1 on: 14 May '03 - 01:47 »
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)).
« Last Edit: 14 May '03 - 02:13 by fredvs »

fredvs

  • Posts: 325
Re: Multiple Speakers
« Reply #2 on: 16 May '03 - 23:23 »
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 :
Code: [Select]
BASS_StreamCreateFile(FALSE, f, 0, 0, BASS_STREAM_AUTOFREE and BASS_SPEAKER_FRONT)

the speakers assignment dont work.  :(

But if i use :

Code: [Select]
BASS_StreamCreateFile(FALSE, f, 0, 0,BASS_SPEAKER_FRONT)

the speakers assignment works.  :)

Maybe it could help you.
« Last Edit: 16 May '03 - 23:32 by fredvs »

(: JOBnik! :)

  • Posts: 1080
Re: Multiple Speakers
« Reply #3 on: 17 May '03 - 00:41 »
Hi ;D

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

Have fun!

8) JOBnik! 8)

fredvs

  • Posts: 325
Re: Multiple Speakers
« Reply #4 on: 17 May '03 - 00:57 »
Thanks Job, then "or" meens "and" and what if "or" must meen "or" ? :-/
« Last Edit: 17 May '03 - 00:58 by fredvs »

(: JOBnik! :)

  • Posts: 1080
Re: Multiple Speakers
« Reply #5 on: 17 May '03 - 01:07 »
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

  • Posts: 325
Re: Multiple Speakers
« Reply #6 on: 17 May '03 - 01:33 »
Alright, now i have well understand.

Thanks Job and good night (or day ?)
« Last Edit: 17 May '03 - 01:37 by fredvs »

(: JOBnik! :)

  • Posts: 1080
Re: Multiple Speakers
« Reply #7 on: 17 May '03 - 01:47 »
Hi ;D

No problem :) Good Night :)

Have fun!

8) JOBnik! 8)

fredvs

  • Posts: 325
Re: Multiple Speakers
« Reply #8 on: 17 May '03 - 03:42 »
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)





« Last Edit: 17 May '03 - 03:47 by fredvs »

DanaPaul

  • Posts: 335
Re: Multiple Speakers
« Reply #9 on: 17 May '03 - 04:18 »
Quote

Will 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)
« Last Edit: 17 May '03 - 10:35 by DanaPaul »