MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / SoxrApi

Method SoxrApi

src/framework/audio/resampling.cpp:70–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68 size_t *,
69 const SoxrIoSpec *,
70 const SoxrQualitySpec *,
71 const SoxrRuntimeSpec *);
72 using IoSpecFn = SoxrIoSpec (*)(SoxrDataType, SoxrDataType);
73 using QualitySpecFn = SoxrQualitySpec (*)(unsigned long, unsigned long);
74 using RuntimeSpecFn = SoxrRuntimeSpec (*)(unsigned);
75
76 SoxrApi() {
77 handle_ = io::open_dynamic_library(
78 {"libsoxr.so.0", "libsoxr.so", "libsoxr.dylib", "soxr.dll", "libsoxr.dll",
79#if defined(__APPLE__)
80 "/opt/homebrew/lib/libsoxr.dylib", "/usr/local/lib/libsoxr.dylib",
81#endif
82 });
83 if (handle_ == nullptr) {
84 return;
85 }
86 oneshot_ = load_symbol<OneShotFn>("soxr_oneshot");
87 io_spec_ = load_symbol<IoSpecFn>("soxr_io_spec");
88 quality_spec_ = load_symbol<QualitySpecFn>("soxr_quality_spec");
89 runtime_spec_ = load_symbol<RuntimeSpecFn>("soxr_runtime_spec");
90 if (oneshot_ == nullptr || quality_spec_ == nullptr) {
91 io::close_dynamic_library(handle_);

Callers

nothing calls this directly

Calls 2

open_dynamic_libraryFunction · 0.85
close_dynamic_libraryFunction · 0.85

Tested by

no test coverage detected