I am working with the portaudio lib for c and c++ on a small project and i came across their custom datatypes they use as sample types and i have no clue how the definition of the types work.
I have tried googling the code but no results show what i have experienced.
When they define the datatype they use the the #define preprocessor function to define it like so.
typedef unsigned long PaSampleFormat
#define paFloat32 ((PaSampleFormat) 0x00000001)
Then my question is how does the ((PaSampleFormat) 0x00000001)
part work when you use it as a datatype.
User contributions licensed under CC BY-SA 3.0