Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,12 @@ std::vector<AdmAuthoringError> CumulatedPointData::useConstantValueForParameter(
errors.push_back(AdmAuthoringError("Attempting to assign a constant value to an ADM parameter which already has parameter data."));
return errors;
}
// If a parameter is constant and set to it's default, it doesn't need to be explicitly written, so just return
if (auto defaultValue = getAdmParameterDefault(admParameter);
defaultValue && valueWithinTolerance(value, *defaultValue)) {
return errors;
}
// Non-default, constant value parameter, so add a point
// No need to convert/scale here - it's not from an envelope
newPointData(0.0, admParameter, value);
return errors;
Expand Down
9 changes: 8 additions & 1 deletion reaper-adm-extension/src/reaper_adm/exportaction_pcmsink.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,11 @@ PCM_sink_adm::PCM_sink_adm(std::shared_ptr<ReaperAPI> api, const char *fn, void
// Start writing
auto chna = admExportSources->getChnaChunk();
auto axml = admExportSources->getAxmlChunk();
writer = bw64::writeFile(admFilename, totalChannels, sRate, 24, chna, axml);
try {
writer = bw64::writeFile(admFilename, totalChannels, sRate, 24, chna, axml);
} catch (std::runtime_error const& e) {
errors.push_back(std::string("Error: Unable to open output file for writing: ") + e.what());
}

// Start Renders
admExportSources->setRenderInProgress(true);
Expand Down Expand Up @@ -200,6 +204,9 @@ void PCM_sink_adm::WriteDoubles(double **samples, int len, int nch, int offset,
}

int PCM_sink_adm::processNextFrames(uint64_t toMaxFrame){
if (!writer) {
return 0;
}

float *bufferWritePos = aggregatedBlockBufferStart;
size_t sampleSize = sizeof(float);
Expand Down
Loading