clang-format: Apply formatting
Code submissions have continually suffered from formatting inconsistencies that constantly have to be addressed. Using clang-format simplifies this by making code formatting more consistent, and allows automation of the code formatting so that maintainers can focus more on the code itself instead of code formatting.
This commit is contained in:
@@ -33,7 +33,7 @@ static const char *jack_input_getname(void *unused)
|
||||
*/
|
||||
static void jack_destroy(void *vptr)
|
||||
{
|
||||
struct jack_data* data = (struct jack_data*)vptr;
|
||||
struct jack_data *data = (struct jack_data *)vptr;
|
||||
|
||||
if (!data)
|
||||
return;
|
||||
@@ -51,14 +51,14 @@ static void jack_destroy(void *vptr)
|
||||
*/
|
||||
static void jack_update(void *vptr, obs_data_t *settings)
|
||||
{
|
||||
struct jack_data* data = (struct jack_data*)vptr;
|
||||
struct jack_data *data = (struct jack_data *)vptr;
|
||||
if (!data)
|
||||
return;
|
||||
|
||||
const char *new_device;
|
||||
bool settings_changed = false;
|
||||
bool settings_changed = false;
|
||||
bool new_jack_start_server = obs_data_get_bool(settings, "startjack");
|
||||
int new_channel_count = obs_data_get_int(settings, "channels");
|
||||
int new_channel_count = obs_data_get_int(settings, "channels");
|
||||
|
||||
if (new_jack_start_server != data->start_jack_server) {
|
||||
data->start_jack_server = new_jack_start_server;
|
||||
@@ -99,7 +99,7 @@ static void *jack_create(obs_data_t *settings, obs_source_t *source)
|
||||
struct jack_data *data = bzalloc(sizeof(struct jack_data));
|
||||
|
||||
pthread_mutex_init(&data->jack_mutex, NULL);
|
||||
data->source = source;
|
||||
data->source = source;
|
||||
data->channels = -1;
|
||||
|
||||
jack_update(data, settings);
|
||||
@@ -129,22 +129,22 @@ static obs_properties_t *jack_input_properties(void *unused)
|
||||
|
||||
obs_properties_t *props = obs_properties_create();
|
||||
|
||||
obs_properties_add_int(props, "channels",
|
||||
obs_module_text("Channels"), 1, 8, 1);
|
||||
obs_properties_add_int(props, "channels", obs_module_text("Channels"),
|
||||
1, 8, 1);
|
||||
obs_properties_add_bool(props, "startjack",
|
||||
obs_module_text("StartJACKServer"));
|
||||
obs_module_text("StartJACKServer"));
|
||||
|
||||
return props;
|
||||
}
|
||||
|
||||
struct obs_source_info jack_output_capture = {
|
||||
.id = "jack_output_capture",
|
||||
.type = OBS_SOURCE_TYPE_INPUT,
|
||||
.output_flags = OBS_SOURCE_AUDIO,
|
||||
.get_name = jack_input_getname,
|
||||
.create = jack_create,
|
||||
.destroy = jack_destroy,
|
||||
.update = jack_update,
|
||||
.get_defaults = jack_input_defaults,
|
||||
.get_properties = jack_input_properties
|
||||
.id = "jack_output_capture",
|
||||
.type = OBS_SOURCE_TYPE_INPUT,
|
||||
.output_flags = OBS_SOURCE_AUDIO,
|
||||
.get_name = jack_input_getname,
|
||||
.create = jack_create,
|
||||
.destroy = jack_destroy,
|
||||
.update = jack_update,
|
||||
.get_defaults = jack_input_defaults,
|
||||
.get_properties = jack_input_properties,
|
||||
};
|
||||
|
Reference in New Issue
Block a user