diff options
author | GrailFinder <wohilas@gmail.com> | 2023-02-25 15:02:37 +0300 |
---|---|---|
committer | GrailFinder <wohilas@gmail.com> | 2023-02-25 15:02:37 +0300 |
commit | f60be7df2d741b73863df63c8a275d1b9471db58 (patch) | |
tree | 20d7b0e0bd90ba42192feb443d3d9ac1da4904cd /workers.go | |
parent | 1ec6ff8ec85ea4597b4897f1d2f1a89ec5e1abb1 (diff) |
Feat: add simple slice functionality
Diffstat (limited to 'workers.go')
-rw-r--r-- | workers.go | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -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) + } +} |