Fixed driver bug
This commit is contained in:
parent
6a71f0a801
commit
5ec6da3aad
5 changed files with 141 additions and 125 deletions
|
|
@ -1,9 +1,20 @@
|
|||
#include "helpers.hpp"
|
||||
|
||||
extern "C" void destruct_AsioDrivers(AsioDrivers * a){
|
||||
a->~AsioDrivers();
|
||||
}
|
||||
|
||||
extern "C" ASIOError get_sample_rate(double * rate){
|
||||
return ASIOGetSampleRate(reinterpret_cast<ASIOSampleRate *>(rate));
|
||||
}
|
||||
|
||||
extern AsioDrivers* asioDrivers;
|
||||
bool loadAsioDriver(char *name);
|
||||
|
||||
extern "C" bool load_asio_driver(char * name){
|
||||
return loadAsioDriver(name);
|
||||
}
|
||||
|
||||
extern "C" void remove_current_driver() {
|
||||
asioDrivers->removeCurrentDriver();
|
||||
}
|
||||
extern "C" long get_driver_names(char **names, long maxDrivers) {
|
||||
AsioDrivers ad;
|
||||
return ad.getDriverNames(names, maxDrivers);
|
||||
}
|
||||
|
|
@ -2,9 +2,9 @@
|
|||
#include "asiodrivers.h"
|
||||
#include "asio.h"
|
||||
|
||||
// Helper function to call destructors from within library
|
||||
extern "C" void destruct_AsioDrivers(AsioDrivers * a);
|
||||
|
||||
// Helper function to wrap confusing preprocessor
|
||||
extern "C" ASIOError get_sample_rate(double * rate);
|
||||
|
||||
extern "C" bool load_asio_driver(char * name);
|
||||
extern "C" void remove_current_driver();
|
||||
extern "C" long get_driver_names(char **names, long maxDrivers);
|
||||
Loading…
Add table
Add a link
Reference in a new issue