From f60be7df2d741b73863df63c8a275d1b9471db58 Mon Sep 17 00:00:00 2001 From: GrailFinder Date: Sat, 25 Feb 2023 15:02:37 +0300 Subject: Feat: add simple slice functionality --- workers.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'workers.go') diff --git a/workers.go b/workers.go index 03c9072..91f9eaf 100644 --- a/workers.go +++ b/workers.go @@ -9,7 +9,6 @@ func worker(queue chan *Utterance, done chan bool, worknumber int, geshaft chan return } select { - case ut := <-queue: if err := cutoutClipAndTranscode(ut); err == nil { geshaft <- ut @@ -21,3 +20,14 @@ func worker(queue chan *Utterance, done chan bool, worknumber int, geshaft chan } } } + +func cutterQueue(fQueue chan string, workerID int) { + for { + if len(fQueue) == 0 { + fmt.Println("empty queue, number", workerID) + return + } + fpath := <-fQueue + cutOnEqualParts(fpath, segmentSize) + } +} -- cgit v1.2.3