mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-05 19:21:59 +01:00
Convert sampleCount <-> floating or -> long long explicitly ...
... A non-narrowing conversion out to long long is a necessity, but the conversions to float and double are simply conveniences. Conversion from floating is explicit, to avoid unintended consequences with arithmetic operators, when later sampleCount ceases to be an alias for an integral type. Some conversions are not made explicit, where I expect to change the type of the variable later to have mere size_t width.
This commit is contained in:
@@ -204,7 +204,9 @@ void ODComputeSummaryTask::Update()
|
||||
const auto odpcmaFile =
|
||||
std::static_pointer_cast<ODPCMAliasBlockFile>(file);
|
||||
odpcmaFile->SetStart(block.start);
|
||||
odpcmaFile->SetClipOffset(clip->GetStartTime()*clip->GetRate());
|
||||
odpcmaFile->SetClipOffset(sampleCount(
|
||||
clip->GetStartTime()*clip->GetRate()
|
||||
));
|
||||
|
||||
//these will always be linear within a sequence-lets take advantage of this by keeping a cursor.
|
||||
while(insertCursor<(int)tempBlocks.size()&&
|
||||
|
||||
Reference in New Issue
Block a user