Revision 45:0033259c6772 utilities/the-application/the-application.cpp
| utilities/the-application/the-application.cpp | ||
|---|---|---|
| 457 | 457 |
guessWorkFromTitle(filepart, scale, composer, guesses); |
| 458 | 458 |
} |
| 459 | 459 |
|
| 460 |
TrackFile *
|
|
| 460 |
Signal *
|
|
| 461 | 461 |
guess(QString track) |
| 462 | 462 |
{
|
| 463 | 463 |
cout << endl; |
| 464 | 464 |
cout << "Guessing composer for: " << track << endl; |
| 465 | 465 |
|
| 466 |
// cerr << "Creating TrackFile object...";
|
|
| 466 |
// cerr << "Creating Signal object...";
|
|
| 467 | 467 |
FileSource fs(track); |
| 468 |
TrackFile *tf = new TrackFile(fs); |
|
| 468 |
Signal *tf = new Signal; |
|
| 469 |
tf->addAvailableAs(new AudioFile(fs)); |
|
| 469 | 470 |
// cerr << "done" << endl; |
| 470 | 471 |
// cerr << "hash = " << tf->hash() << endl; |
| 471 | 472 |
|
| ... | ... | |
| 633 | 634 |
|
| 634 | 635 |
FeatureFileIndex *ffi = FeatureFileIndex::getInstance(); |
| 635 | 636 |
|
| 636 |
ffi->loadFor(0, 0); |
|
| 637 |
QStringList args; |
|
| 638 |
for (int i = 1; i < argc; ++i) {
|
|
| 639 |
args.push_back(argv[i]); |
|
| 640 |
} |
|
| 641 |
|
|
| 642 |
BasicStore bs; |
|
| 643 |
if (!args.empty()) {
|
|
| 644 |
foreach (QString track, args) {
|
|
| 645 |
FileSource fs(track); |
|
| 646 |
AudioFile af(fs); |
|
| 647 |
ffi->loadFor(&af, &bs); |
|
| 648 |
} |
|
| 649 |
} |
|
| 650 |
|
|
| 637 | 651 |
|
| 638 | 652 |
/* |
| 639 | 653 |
BasicStore *index = new BasicStore; |
| ... | ... | |
| 759 | 773 |
if (command == "guess") {
|
| 760 | 774 |
if (args.empty()) usage(argv[0]); |
| 761 | 775 |
foreach (QString track, args) {
|
| 762 |
TrackFile *tf = guess(track);
|
|
| 776 |
Signal *tf = guess(track);
|
|
| 763 | 777 |
localStorer->store(tf); |
| 764 | 778 |
} |
| 765 | 779 |
} |
Also available in: Unified diff