Browse Source

Fix Go build due to enum casting (#164)

* fix go build due to enum casts by casting enum array explicitly
tags/5.1.0
Serge Zaitsev Stephen Sinclair 5 years ago
parent
commit
920bb62a47
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      rtaudio_c.cpp

+ 4
- 3
rtaudio_c.cpp View File

@@ -17,9 +17,10 @@ struct rtaudio {

const char *rtaudio_version() { return RTAUDIO_VERSION; }

extern "C" const rtaudio_api_t rtaudio_compiled_apis[]; // casting from RtAudio::Api[]
extern "C" const unsigned int rtaudio_num_compiled_apis;
const rtaudio_api_t *rtaudio_compiled_api() { return rtaudio_compiled_apis; }
extern "C" const RtAudio::Api rtaudio_compiled_apis[];
const rtaudio_api_t *rtaudio_compiled_api() {
return (rtaudio_api_t *) &rtaudio_compiled_apis[0];
}

extern "C" const char* rtaudio_api_names[][2];
const char *rtaudio_api_name(rtaudio_api_t api) {


Loading…
Cancel
Save