0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-27 03:23:54 +01:00

add libfmio and make the seperators in the helps tabs

This commit is contained in:
2025-04-22 13:40:26 +02:00
parent 6ab2926410
commit 72cea9622b
7 changed files with 236 additions and 190 deletions

26
io/audio.h Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
#include <pulse/simple.h>
#include <pulse/error.h>
#include <string.h>
#include <stdlib.h>
typedef struct
{
pa_simple* dev;
pa_sample_spec sample_spec;
pa_buffer_attr buffer_attr;
char* app_name;
char* stream_name;
char* device;
int initialized;
} PulseInputDevice;
int init_PulseInputDevice(PulseInputDevice *dev, int sample_rate, int channels, char *app_name, char *stream_name, char *device, pa_buffer_attr *buffer_attr);
int read_PulseInputDevice(PulseInputDevice *dev, float *buffer, size_t size);
void free_PulseInputDevice(PulseInputDevice *dev);
typedef PulseInputDevice PulseOutputDevice;
int init_PulseOutputDevice(PulseOutputDevice *dev, int sample_rate, int channels, char *app_name, char *stream_name, char *device, pa_buffer_attr *buffer_attr);
int write_PulseOutputDevice(PulseOutputDevice *dev, float *buffer, size_t size);
void free_PulseOutputDevice(PulseOutputDevice *dev);