MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / would_exceed_text_limit

Function would_exceed_text_limit

src/framework/text/subtitle.cpp:77–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77bool would_exceed_text_limit(
78 const std::vector<runtime::WordTimestamp> & words,
79 size_t begin,
80 size_t candidate_end,
81 const SubtitleFormatOptions & options) {
82 const auto lines = wrap_words(words, begin, candidate_end, options.max_chars_per_line);
83 return static_cast<int>(lines.size()) > options.max_lines;
84}
85
86std::string format_time(int64_t sample, int sample_rate) {
87 const int64_t ms = (sample * 1000 + sample_rate / 2) / sample_rate;

Callers 1

build_subtitle_blocksFunction · 0.85

Calls 2

wrap_wordsFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected