That is a great feature of C++ but PortAudio is using
'C' not C++. So I
think our only choices are #define and enum. PortAudio uses both.
you can still use const variables - gcc with optimizations treats them like
defines, but with type-safety.
Are enums better than #defines?? I am always trying to
improve my 'C' chops
so I am open to suggestions.
If you can enumerate the values, you should, IMHO. Of course, there are
times to break this, but in general YES. An enum is a real type, and can be
used as such.
enum foo_cmd {
FOO_A,
FOO_B,
FOO_C,
};
int doo_foo_cmd(enum foo_cmd cmd);
Tim