cpal/asio-sys/asio-link/helpers.cpp

29 lines
700 B
C++
Raw Normal View History

2018-04-22 12:07:47 +00:00
#include "helpers.hpp"
2018-11-04 10:23:24 +00:00
#include <stdio.h>
2018-04-22 12:07:47 +00:00
extern "C" ASIOError get_sample_rate(double * rate){
return ASIOGetSampleRate(reinterpret_cast<ASIOSampleRate *>(rate));
}
2018-11-01 01:21:00 +00:00
2018-11-02 11:06:08 +00:00
extern "C" ASIOError set_sample_rate(double rate){
return ASIOSetSampleRate(rate);
}
extern "C" ASIOError can_sample_rate(double rate){
return ASIOCanSampleRate(rate);
}
2018-11-01 01:21:00 +00:00
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);
}