summaryrefslogtreecommitdiff
path: root/per.rs
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2013-09-30 22:06:17 -0500
committerDavid Barksdale <amatus@amatus.name>2013-09-30 22:06:17 -0500
commitb1c3f085316cd33759afc93a113acb79cec2510a (patch)
treeb306ede51091edd784ee9d5f0633c685e9a7944a /per.rs
parent692a845e55fc7c07ef3681525885a07a2c3fc749 (diff)
Use a file format amenable to lesser file systems.
Diffstat (limited to 'per.rs')
-rw-r--r--per.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/per.rs b/per.rs
index 78a9cfc..d476346 100644
--- a/per.rs
+++ b/per.rs
@@ -12,8 +12,6 @@ use mp3lame::LameContext;
mod oss;
mod mp3lame;
-
-#[fixed_stack_segment]
fn main() {
let args = os::args();
let opts = ~[
@@ -26,6 +24,7 @@ fn main() {
];
let DSP_FILES = ~[~"/dev/dsp", ~"/dev/dsp1"];
let DSP_SPEEDS = ~[44100i, 48000i];
+ let FILE_FORMAT = "%F %H.%M.%S%z.mp3";
let matches = match groups::getopts(args.tail(), opts) {
Ok(m) => m,
Err(f) => {
@@ -96,7 +95,7 @@ fn main() {
debug!("split!");
out_file.write(lame.encode_flush_nogap());
out_file.flush();
- out_file = open(&Path(at(now).rfc3339() + ".mp3"), Create, Write)
+ out_file = open(&Path(at(now).strftime(FILE_FORMAT)), Create, Write)
.unwrap();
let Timespec { sec, nsec } = next_split;
next_split = Timespec::new(sec + split as i64, nsec);