From 194c70717221c0998a2333f2f8aaef3113e16b47 Mon Sep 17 00:00:00 2001 From: Vincent Riquer Date: Tue, 28 Feb 2012 01:01:14 +0100 Subject: [PATCH] pseudo-algorythmic part 1 --- atom | 93 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 atom diff --git a/atom b/atom new file mode 100644 index 0000000..c84441f --- /dev/null +++ b/atom @@ -0,0 +1,93 @@ +#!/bin/bash + +#parse arguments +#parse config +#check sanity + +getFiles() { + : +} + +getType() { + : +} + +getInfos::MP3() { + : +} + +getInfos::Ogg() { + : +} + +getInfos::FLAC() { + : +} + +getInfos::MPC() { + : +} + +getTags() { + #getType + #getInfos:: + : +} + +encodeFile::MP3() { + #lame + : +} + +encodeFile::Ogg() { + #oggenc + : +} + +transcodeFile() { + #sox -> wav + for format in $targets["format"] + do + #encodeFile::$format + : + done + #signal and of encoding to parent +} + +checkFinished() { + #retrieve info from finished transcodeFile() + #update counters / metadata + : +} + +checkLoad() { + #if load > threshold + # decrease concurrency + #elif load < threshold + # increase concurrency + #fi + : +} + +readUserInput() { + #read + / - / q(uit) / p(ause) + #initiate shutdown / check load threshold / SIGSTOP all children / SIGCONT all children + : +} + +transcodeLauncher() { + checkLoad + checkFinished + #until running processes < max processes + #do + checkLoad + checkFinished + readUserInput + #done + transcodeFile & + #update counter / metadata +} + +#UI + +# vim:set ts=8,sw=8: