annotate dsp/segmentation/Segmenter.cpp @ 58:d72fcd34d9a7

* Fixes to problems shown up by vamp-plugin-tester. Still not all plugins pass all tests, though
author cannam
date Mon, 23 Mar 2009 16:28:53 +0000
parents 8e90a56b4b5f
children 67899fda84f5
rev   line source
cannam@18 1 /*
cannam@18 2 * Segmenter.cpp
cannam@18 3 * soundbite
cannam@18 4 *
cannam@18 5 * Created by Mark Levy on 04/04/2006.
cannam@18 6 * Copyright 2006 Centre for Digital Music, Queen Mary, University of London. All rights reserved.
cannam@18 7 *
cannam@18 8 */
cannam@18 9
cannam@18 10 #include <iomanip>
cannam@18 11
cannam@18 12 #include "Segmenter.h"
cannam@18 13
cannam@18 14 ostream& operator<<(ostream& os, const Segmentation& s)
cannam@18 15 {
cannam@18 16 os << "structure_name : begin_time end_time\n";
cannam@18 17
cannam@18 18 for (int i = 0; i < s.segments.size(); i++)
cannam@18 19 {
cannam@18 20 Segment seg = s.segments[i];
cannam@18 21 os << std::fixed << seg.type << ':' << '\t' << std::setprecision(6) << seg.start / static_cast<double>(s.samplerate)
cannam@18 22 << '\t' << std::setprecision(6) << seg.end / static_cast<double>(s.samplerate) << "\n";
cannam@18 23 }
cannam@18 24
cannam@18 25 return os;
cannam@18 26 }