Skip to content

Commit

Permalink
retrieve sampleRate from file
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Abbasi committed Sep 4, 2024
1 parent f42f62a commit 0511ed6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,9 +245,11 @@ void load_files(decltype(captureData) &loadedFiles,
loadedFile.first.type = substr;
if (i == 4) // fifth element (serial of scope)
loadedFile.first.serial = substr;
if (i == 5) // sixth element (sampleRate of scope)
loadedFile.first.sampleRate = std::stoi(substr);
}
// each y-value is recorded at 1/sampleRate time
double step{0.00001}, base{step};
double step{1./loadedFile.first.sampleRate}, base{step};
size_t indx{2}; // y_values start from line 2 of the file
while (!readfile.eof()) { // fill the vector of the values
double value{};
Expand Down

0 comments on commit 0511ed6

Please sign in to comment.