Commit b9b98004 authored by Mark Hills's avatar Mark Hills
Browse files

Make deck responsible for the protect flag

parent 6442a00f
......@@ -46,7 +46,7 @@ static const struct record no_record = {
int deck_init(struct deck *d, struct rt *rt,
struct timecode_def *timecode,
double speed, bool phono)
double speed, bool phono, bool protect)
{
unsigned int rate;
......@@ -58,6 +58,7 @@ int deck_init(struct deck *d, struct rt *rt,
d->ncontrol = 0;
d->record = &no_record;
d->punch = NO_PUNCH;
d->protect = protect;
rate = device_sample_rate(&d->device);
assert(timecode != NULL);
timecoder_init(&d->timecoder, timecode, speed, rate, phono);
......
......@@ -53,7 +53,7 @@ struct deck {
int deck_init(struct deck *deck, struct rt *rt,
struct timecode_def *timecode,
double speed, bool phono);
double speed, bool phono, bool protect);
void deck_clear(struct deck *deck);
bool deck_is_locked(const struct deck *deck);
......
......@@ -309,7 +309,6 @@ int main(int argc, char *argv[])
ld = &deck[ndeck];
device = &ld->device;
ld->importer = importer;
ld->protect = protect;
/* Work out which device type we are using, and initialise
* an appropriate device. */
......@@ -349,7 +348,7 @@ int main(int argc, char *argv[])
/* Connect up the elements to make an operational deck */
r = deck_init(ld, &rt, timecode, speed, phono);
r = deck_init(ld, &rt, timecode, speed, phono, protect);
if (r == -1)
return -1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment