I have compiled and imported a dylib C Library called portaudio (PortAudio website) into an Xcode 6.1 Swift project, all the functions / types are accessible except for one which is
typedef void PaStream;
I am having trouble understanding how to use that in Swift, in C I declare it like:
PaStream *audioStream = NULL;
Can anybody help on the Swift equivalent as I get a warning saying undeclared Type / unresolved identifier, it looks like Swift can not bridge a typedef void xyz; ?
Many thanks for any help.
The C typedef
is indeed not imported to Swift because you can't define a variable of type
void
. Even in C, you would only define pointer variables of typePaStream *
.Therefore you could add
to the bridging header file and then use it as