LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net multiple Enum flags needed at single terminal (use of BASS.NET)

Solved!
Go to solution

Hello All:

This question is about using Published .net wrappers in LabVIEW, and How to hand Enums to them correctly.

After review of these knowledge base documents, I have been trying to implement BASS.NET in LabVIEW.

So Far so good, but I have run into a problem implementing THIS Method to the same effect as the following code.

// setup the encoder 
int encoder = BassEnc.BASS_Encode_Start(dummy, null, 
                                        BASSEncode.BASS_ENCODE_PCM | BASSEncode.BASS_ENCODE_NOHEAD, 
                                        null, IntPtr.Zero);

dotnetinvoke.PNG 

The Method needs to be provided muliple flags, BASSEncode.BASS_ENCODE_PCM | BASSEncode.BASS_ENCODE_NOHEAD,

enum.png

But Can only accept one Enum/Flag.

 

Have you solved a similar problem in the past? Will post any additional information upon request. Until nessesary I am not going to attach the project file as it is a very finiky x64 build of the related .net/.dll objects. I doubt it would actually load execute/ on any system without the 4-5 coffee cups worth of time it took me to do the same.

 

Side note, this is my first discussion forum post in a long while. Please comment on how to better relay the nature of the problem.

Solution: (by NathanD) Hand the terminal the equivlent of a bitwise OR function, using the Boolean OR or the Compound arythmatic terminal.

or.png

0 Kudos
Message 1 of 2
(2,780 Views)
Solution
Accepted by topic author joesze

You should use a boolean OR, not build array. The | function in C# is a bitwise OR. If you need to combine more than 2 flags, you can use the Compound Arithmetic node set to the OR mode, and expand it to more terminals.

Message 2 of 2
(2,768 Views)