aboutsummaryrefslogtreecommitdiff
path: root/src/main.odin
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.odin')
-rw-r--r--src/main.odin26
1 files changed, 18 insertions, 8 deletions
diff --git a/src/main.odin b/src/main.odin
index 20969c1..ec9d70e 100644
--- a/src/main.odin
+++ b/src/main.odin
@@ -244,16 +244,22 @@ parse_folder :: proc(paths : Directory) -> (Report, bool) {
case "Scene":
row[i] = w.scene
case "Take":
- row[i] = fmt.tprintf("T%03d", w.take)
+ if w.take >= 0 {
+ row[i] = fmt.tprintf("%02d", w.take)
+ }
case "Duration":
row[i] = wav.tprint_duration(w)
case "Timecode":
- row[i] = wav.tprint_timecode(w)
+ if w.tc_framerate > 0 {
+ row[i] = wav.tprint_timecode(w)
+ }
case "TC FPS":
- if w.tc_dropframe { // TC FPS
- row[i] = fmt.tprintf("%.03f DF", w.tc_framerate)
- } else {
- row[i] = fmt.tprintf("%.03f ND", w.tc_framerate)
+ if w.tc_framerate > 0 {
+ if w.tc_dropframe { // TC FPS
+ row[i] = fmt.tprintf("%.03f DF", w.tc_framerate)
+ } else {
+ row[i] = fmt.tprintf("%.03f ND", w.tc_framerate)
+ }
}
case "User Bits":
if w.ubits != {0,0,0,0,0,0,0,0,} {
@@ -273,6 +279,8 @@ parse_folder :: proc(paths : Directory) -> (Report, bool) {
row[i] = fmt.tprintf("%d-bit int", w.bit_depth)
case .FLOAT:
row[i] = fmt.tprintf("%d-bit float", w.bit_depth)
+ case .ADPCM:
+ row[i] = fmt.tprintf("%d-bit ADPCM", w.bit_depth)
}
case "Circled":
if w.circled do row[i] = "O"
@@ -530,7 +538,10 @@ parse_file :: proc(path : CSV, device : Device = .UNSET) -> (Report, bool) {
last_channel_index := -1
stage : Stages = .TITLE
- #partial switch device {
+ switch device {
+ case .UNSET:
+ fmt.eprintln("Uh-oh. This shouldn't happen. No device set when trying to fill in data.")
+ unreachable()
case .SD8:
// .d8888b. 8888888b. .d8888b.
// d88P Y88b 888 "Y88b d88P Y88b
@@ -684,7 +695,6 @@ parse_file :: proc(path : CSV, device : Device = .UNSET) -> (Report, bool) {
if element[:4] == "Trk " {
if first_channel_index == -1 do first_channel_index = e
last_channel_index = e
- // TODO: Rename track column with corrected numbers
}
if element == "Start TC" {
output.tc_column_index = e