Skip to content

Commit

Permalink
fixed adding CD eject task after each track (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
vividos committed Aug 28, 2024
1 parent c32440d commit 72af5cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/winlame/TaskCreationHelper.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//
// winLAME - a frontend for the LAME encoding engine
// Copyright (c) 2000-2020 Michael Fink
// Copyright (c) 2000-2024 Michael Fink
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -251,14 +251,14 @@ void TaskCreationHelper::AddCDExtractTasks()
unsigned int cdReadTaskId = spCDExtractTask->Id();
lastCDReadTaskId = cdReadTaskId;

bool isLastTrack = jobIndex == maxJobIndex - 1;

if (m_uiSettings.m_ejectDiscAfterReading)
if (isLastTrack &&
m_uiSettings.m_ejectDiscAfterReading)
AddCDEjectTask(discInfo);

if (!outputWaveFile16bit)
{
bool isLastTrack = jobIndex == maxJobIndex - 1;

// also add encode task
std::shared_ptr<Encoder::EncoderTask> spEncoderTask =
CreateEncoderTaskForCDReadJob(cdReadTaskId, cdReadJob, nogapInstanceId, isLastTrack);
Expand Down

0 comments on commit 72af5cc

Please sign in to comment.