Skip to content

Commit

Permalink
refactor: Remove unused code related to buffer output type selection
Browse files Browse the repository at this point in the history
  • Loading branch information
royshil committed Jun 26, 2024
1 parent 158cae0 commit 7efe8e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/transcription-filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -863,21 +863,6 @@ obs_properties_t *transcription_filter_properties(void *data)
obs_properties_add_int_slider(buffered_output_group, "buffer_num_chars_per_line",
MT_("buffer_num_chars_per_line"), 1, 100, 1);

// on selection of buffer output type
obs_property_set_modified_callback(buffer_type_list, [](obs_properties_t *props,
obs_property_t *property,
obs_data_t *settings) {
UNUSED_PARAMETER(property);
UNUSED_PARAMETER(props);

// If the buffer output type is "Word" set the number of words per line to 10
const bool isSegmentationWord =
(obs_data_get_int(settings, "buffer_output_type") == SEGMENTATION_WORD);
obs_data_set_int(settings, "buffer_num_chars_per_line",
isSegmentationWord ? 8 : 30);
return true;
});

// on enable/disable buffered output, show/hide the group
obs_property_set_modified_callback(buffered_output_prop, [](obs_properties_t *props,
obs_property_t *property,
Expand Down
2 changes: 2 additions & 0 deletions src/transcription-utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#include <string>
#include <vector>
#include <chrono>
#include <algorithm>
#include <cctype>

// Fix UTF8 string for Windows
std::string fix_utf8(const std::string &str);
Expand Down

0 comments on commit 7efe8e5

Please sign in to comment.