Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ysfx_config.hpp 1.3KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright 2021 Jean Pierre Cimalando
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. //
  15. // SPDX-License-Identifier: Apache-2.0
  16. //
  17. #pragma once
  18. #include "ysfx.h"
  19. #include <vector>
  20. #include <string>
  21. #include <atomic>
  22. #include <cstdarg>
  23. struct ysfx_config_s {
  24. std::string import_root;
  25. std::string data_root;
  26. std::vector<ysfx_audio_format_t> audio_formats;
  27. ysfx_log_reporter_t *log_reporter = nullptr;
  28. intptr_t userdata = 0;
  29. std::atomic<uint32_t> ref_count{1};
  30. };
  31. void ysfx_log(ysfx_config_t &conf, ysfx_log_level level, const char *message);
  32. void ysfx_logfv(ysfx_config_t &conf, ysfx_log_level level, const char *format, va_list ap);
  33. #if defined(__GNUC__)
  34. __attribute__((format(printf, 3, 4)))
  35. #endif
  36. void ysfx_logf(ysfx_config_t &conf, ysfx_log_level level, const char *format, ...);