yolobs-studio/plugins/linux-jack/jack-wrapper.h

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.3 KiB
C
Raw Permalink Normal View History

2016-02-23 23:16:51 +00:00
/*
Copyright (C) 2015 by Bernd Buschinski <b.buschinski@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <jack/jack.h>
#include <obs.h>
2016-10-10 19:01:40 +00:00
#include <util/threading.h>
2016-02-23 23:16:51 +00:00
struct jack_data {
obs_source_t *source;
/* user settings */
char *device;
uint_fast8_t channels;
bool start_jack_server;
/* server info */
enum speaker_layout speakers;
uint_fast32_t samples_per_sec;
uint_fast32_t bytes_per_frame;
jack_client_t *jack_client;
jack_port_t **jack_ports;
pthread_mutex_t jack_mutex;
};
/**
* Initialize the jack client and register the ports
*/
2019-09-22 21:19:10 +00:00
int_fast32_t jack_init(struct jack_data *data);
2016-02-23 23:16:51 +00:00
/**
* Destroys the jack client and unregisters the ports
*/
2019-09-22 21:19:10 +00:00
void deactivate_jack(struct jack_data *data);