0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-26 19:23:51 +01:00

something here and there

This commit is contained in:
2025-08-03 15:58:43 +02:00
parent 122677ef1e
commit de8f4652a4
9 changed files with 35 additions and 38 deletions

View File

@@ -4,6 +4,7 @@
#include <pulse/error.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#ifdef DEBUG
#define PULSE_DEBUG
@@ -20,15 +21,15 @@ typedef struct
char* app_name;
char* stream_name;
char* device;
sig_atomic_t initialized;
bool initialized;
bool direction; // 0 = output, 1 - input
} PulseDevice;
typedef PulseDevice PulseInputDevice;
int init_PulseInputDevice(PulseInputDevice* dev, const int sample_rate, const int channels, const char* app_name, const char *stream_name, const char* device, pa_buffer_attr* buffer_attr, enum pa_sample_format format);
int read_PulseInputDevice(PulseInputDevice *dev, void *buffer, size_t size);
void free_PulseInputDevice(PulseInputDevice *dev);
void free_PulseDevice(PulseDevice *dev);
typedef PulseDevice PulseOutputDevice;
int init_PulseOutputDevice(PulseOutputDevice* dev, const int sample_rate, const int channels, const char* app_name, const char *stream_name, const char* device, pa_buffer_attr* buffer_attr, enum pa_sample_format format);
int write_PulseOutputDevice(PulseOutputDevice *dev, void *buffer, size_t size);
void free_PulseOutputDevice(PulseOutputDevice *dev);