VIANC/pw_plugin/main.cc

34 lines
722 B
C++
Raw Normal View History

2025-01-16 23:35:35 +01:00
#include <random>
#include <cstdio>
#include <cmath>
#include <cstring>
#include <iostream>
2025-01-27 09:58:36 +01:00
#include <array>
#include <atomic>
2025-01-16 23:35:35 +01:00
#include "pipewire/pipewire.h"
#include "spa/param/audio/format-utils.h"
#include "spa/param/latency-utils.h"
2025-01-16 23:35:35 +01:00
2025-01-27 18:25:45 +01:00
#include "passthrough.h"
2025-01-16 23:35:35 +01:00
int main(int argc, char** argv) {
pw_init(&argc, &argv);
2025-01-27 18:25:45 +01:00
auto* tloop = pw_thread_loop_new("thread", NULL);
ringbuffer rb;
if(tloop == nullptr) {
std::cerr << "Could not create loop!\n";
return 1;
}
2025-01-27 18:25:45 +01:00
logger_record lr(pw_thread_loop_get_loop(tloop), &rb);
2025-01-28 09:33:42 +01:00
logger_playback lp(pw_thread_loop_get_loop(tloop), &rb);
2025-01-27 18:25:45 +01:00
pw_thread_loop_start(tloop);
2025-01-16 23:35:35 +01:00
2025-01-27 18:25:45 +01:00
while(true) {}
pw_thread_loop_stop(tloop);
pw_thread_loop_destroy(tloop);
pw_deinit();
2025-01-16 23:35:35 +01:00
return 0;
}