ref: 6f58415a9781a09a52c40a6b1f1f3bd88cfaedc1
parent: 3be5c03819801ff32bba9897da2c090a24b16a78
author: Sigrid Haflínudóttir <ftrvxmtrx@gmail.com>
date: Wed Dec 18 15:20:38 EST 2019
remove unused channels and samplerate
--- a/mkplist.c
+++ b/mkplist.c
@@ -180,8 +180,6 @@
}
curr->path = strdup(path);
curr->duration = ctx.duration;
- curr->samplerate = ctx.samplerate;
- curr->channels = ctx.channels;
}
close(fd);
}else if(depth < Maxdepth){ /* recurse into the directory */
@@ -221,10 +219,6 @@
s = seprint(s, buf+sizeof(buf), "%c%ld %s\n", Ptrack, strlen(m->track), m->track);
if(m->duration > 0)
s = seprint(s, buf+sizeof(buf), "%c %d\n", Pduration, m->duration);
- if(m->samplerate > 0)
- s = seprint(s, buf+sizeof(buf), "%c %d\n", Psamplerate, m->samplerate);
- if(m->channels > 0)
- s = seprint(s, buf+sizeof(buf), "%c %d\n", Pchannels, m->channels);
if(m->imagesize > 0)
s = seprint(s, buf+sizeof(buf), "%c %d %d %d %s\n", Pimage, m->imageoffset, m->imagesize, m->imagereader, m->imagefmt);
s = seprint(s, buf+sizeof(buf), "%c %s\n", Ppath, m->path);
--- a/plist.h
+++ b/plist.h
@@ -13,7 +13,6 @@
Palbum= 'a',
Partist= 'A',
- Pchannels= 'c',
Pdate= 'd',
Pduration= 'D',
Pimage= 'i',
@@ -20,6 +19,9 @@
Ptitle= 't',
Ptrack= 'T',
Ppath= 'p',
+
+ /* unused */
+ Pchannels= 'c',
Psamplerate= 's',
Maxartist=16, /* max artists for a track */
@@ -38,8 +40,6 @@
char *imagefmt;
int numartist;
int duration;
- int samplerate;
- int channels;
int imageoffset;
int imagesize;
int imagereader; /* non-zero if a special reader required */
--- a/zuke.c
+++ b/zuke.c
@@ -619,9 +619,7 @@
s = strchr(e+2, '\n') + 1;
}else if(s[0] == Pchannels || s[0] == Pduration || s[0] == Psamplerate){
intval = strtol(s+2, &e, 10);
- if(s[0] == Pchannels) m->channels = intval;
- else if(s[0] == Pduration) m->duration = intval;
- else if(s[0] == Psamplerate) m->samplerate = intval;
+ if(s[0] == Pduration) m->duration = intval;
s = e + 1;
}else if(s[0] == Ppath){
m->path = s+2;