More work on the source module system

This commit is contained in:
Ryzerth
2020-10-02 01:44:18 +02:00
parent 1507e6ec31
commit 47b04ffef4
8 changed files with 158 additions and 47 deletions

View File

@ -74,7 +74,6 @@ else()
target_link_libraries(sdrpp_core PUBLIC dl)
endif (MSVC)
target_link_libraries(sdrpp_core PUBLIC SoapySDR)
target_link_libraries(sdrpp_core PUBLIC volk)
set(CORE_FILES ${RUNTIME_OUTPUT_DIRECTORY} PARENT_SCOPE)

View File

@ -26,6 +26,12 @@
namespace core {
ConfigManager configManager;
void setInputSampleRate(double samplerate) {
// NOTE: Zoom controls won't work
gui::waterfall.setBandwidth(samplerate);
sigpath::signalPath.setSampleRate(samplerate);
}
};
bool maximized = false;

View File

@ -4,6 +4,8 @@
namespace core {
SDRPP_EXPORT ConfigManager configManager;
void setInputSampleRate(double samplerate);
};
int sdrpp_main();

View File

@ -28,7 +28,7 @@ namespace mod {
mod._INIT_ = (void(*)())GetProcAddress(mod.inst, "_INIT_");
mod._CREATE_INSTANCE_ = (void*(*)(std::string))GetProcAddress(mod.inst, "_CREATE_INSTANCE_");
mod._DELETE_INSTANCE_ = (void(*)(void*))GetProcAddress(mod.inst, "_DELETE_INSTANCE_");
mod._STOP_ = (void(*)(void*))GetProcAddress(mod.inst, "_STOP_");
mod._STOP_ = (void(*)())GetProcAddress(mod.inst, "_STOP_");
#else
mod.inst = dlopen(path.c_str(), RTLD_LAZY);
if (mod.inst == NULL) {