Author Topic: Issue with BASSInfo flags  (Read 986 times)

aybe

  • Posts: 145
Issue with BASSInfo flags
« on: 21 Sep '10 - 21:24 »
All my devices are detected with the following capabilities : 3871
You can see that flags are returned as an integer, not like A | B | C.

After looking at the enum, only these are present :

0   DSCAPS_NONE
16   DSCAPS_CONTINUOUSRATE
32   DSCAPS_EMULDRIVER
64   DSCAPS_CERTIFIED
256   DSCAPS_SECONDARYMONO
512   DSCAPS_SECONDARYSTEREO
1024   DSCAPS_SECONDARY8BIT
2048   DSCAPS_SECONDARY16BIT

Closest match I can find by hand is 3872 so, off by one.

Are there some flags that are missing in the enum ?

Thank you  :D

fmcoder

  • Posts: 436
Re: Issue with BASSInfo flags
« Reply #1 on: 22 Sep '10 - 10:00 »
You should test for flags like this:

if (caps && DSCAPS_CERTIFIED != 0) - if true, then DSCAPS_CERTIFIED flag presents.

Same for other values.

aybe

  • Posts: 145
Re: Issue with BASSInfo flags
« Reply #2 on: 22 Sep '10 - 14:49 »
Hi,

Actually I want to know what are the missing member(s), I'm having these CAPS on all of my devices ...

BTW Your code is incorrect, it should be like :
bool test = (meetingDays & Days2.Thursday) == Days2.Thursday;

You are using a logical AND where it should be a bitwise AND, moreover it's not good practice to compare to 0 and if you needed so, you should compare to DSCAPS_NONE.

http://msdn.microsoft.com/en-us/library/cc138362.aspx

 ;D

Ian @ un4seen

  • Administrator
  • Posts: 20433
Re: Issue with BASSInfo flags
« Reply #3 on: 22 Sep '10 - 16:33 »
3871 = 0xF1F. The 0x00F part of it relates to primary buffer capabilities, which is only relevant with VxD drivers, eg. Win9x.

Code: [Select]
#define DSCAPS_PRIMARYMONO          0x00000001
#define DSCAPS_PRIMARYSTEREO        0x00000002
#define DSCAPS_PRIMARY8BIT          0x00000004
#define DSCAPS_PRIMARY16BIT         0x00000008

aybe

  • Posts: 145
Re: Issue with BASSInfo flags
« Reply #4 on: 22 Sep '10 - 16:39 »
Okay, thank you !