MCPcopy Create free account
hub / github.com/clangen/musikcube / GetCddbQueryString

Method GetCddbQueryString

src/plugins/cddadecoder/CddaDataModel.cpp:360–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

358}
359
360std::string CddaDataModel::AudioDisc::GetCddbQueryString() {
361 std::string query = "cmd=cddb+query+" + this->GetCddbId() + "+";
362 query += std::to_string(this->GetTrackCount());
363
364 /* tracks */
365 for (auto track : this->tracks) {
366 size_t frames =
367 track->GetFrames() +
368 (track->GetSeconds() * FRAMES_PER_SECOND) +
369 (track->GetMinutes()) * FRAMES_PER_MINUTE;
370
371 query += "+" + std::to_string(frames);
372 }
373
374 size_t leadoutOffset =
375 leadout->GetFrames() +
376 (leadout->GetSeconds() * FRAMES_PER_SECOND) +
377 (leadout->GetMinutes()) * FRAMES_PER_MINUTE;
378
379 query += "+" + std::to_string(leadoutOffset / FRAMES_PER_SECOND);
380
381 return query;
382}
383
384void CddaDataModel::AudioDisc::SetLeadout(DiscTrackPtr leadout) {
385 this->leadout = leadout;

Callers 1

ScanMethod · 0.80

Calls 5

GetCddbIdMethod · 0.95
GetTrackCountMethod · 0.95
GetFramesMethod · 0.80
GetSecondsMethod · 0.80
GetMinutesMethod · 0.80

Tested by

no test coverage detected