diff options
Diffstat (limited to 'readmusictags.cpp')
-rw-r--r-- | readmusictags.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/readmusictags.cpp b/readmusictags.cpp new file mode 100644 index 0000000..62312f6 --- /dev/null +++ b/readmusictags.cpp @@ -0,0 +1,35 @@ +#include "AudioFile.h" + +#include <iostream> + +using namespace std; + +int main(int argc, char *argv[]) +{ + for (int i = 1; i < argc; ++i) { + AudioFile f(argv[i]); + if (!f.isValid()) { + cout << argv[i] << " is not valid." << endl; + continue; + } + cout << "Filename: " << f.filename() << endl; + cout << "Artist: " << f.artist() << endl; + cout << "Composer: " << f.composer() << endl; + cout << "Album: " << f.album() << endl; + cout << "Album Artist: " << f.albumArtist() << endl; + cout << "Title: " << f.title() << endl; + cout << "Genre: " << f.genre() << endl; + cout << "Comment: " << f.comment() << endl; + cout << "Track: " << f.track() << endl; + cout << "Disc: " << f.disc() << endl; + cout << "Bpm: " << f.bpm() << endl; + cout << "Year: " << f.year() << endl; + cout << "Length: " << f.length() << endl; + cout << "Bitrate: " << f.bitrate() << endl; + cout << "Sample Rate: " << f.sampleRate() << endl; + cout << "Channels: " << f.channels() << endl; + cout << "Compilation: " << f.compilation() << endl; + cout << endl; + } + return 0; +} |