qm-dsp
1.8
Segmenter.cpp
Go to the documentation of this file.
1
/*
2
* Segmenter.cpp
3
*
4
* Created by Mark Levy on 04/04/2006.
5
* Copyright 2006 Centre for Digital Music, Queen Mary, University of London.
6
7
This program is free software; you can redistribute it and/or
8
modify it under the terms of the GNU General Public License as
9
published by the Free Software Foundation; either version 2 of the
10
License, or (at your option) any later version. See the file
11
COPYING included with this distribution for more information.
12
*
13
*/
14
15
#include <iomanip>
16
17
#include "
Segmenter.h
"
18
19
ostream&
operator<<
(ostream& os,
const
Segmentation
& s)
20
{
21
os <<
"structure_name : begin_time end_time\n"
;
22
23
for
(
int
i = 0; i < s.
segments
.size(); i++)
24
{
25
Segment
seg = s.
segments
[i];
26
os << std::fixed << seg.
type
<<
':'
<<
'\t'
<< std::setprecision(6) << seg.
start
/
static_cast<
double
>
(s.
samplerate
)
27
<<
'\t'
<< std::setprecision(6) << seg.
end
/
static_cast<
double
>
(s.
samplerate
) <<
"\n"
;
28
}
29
30
return
os;
31
}
operator<<
ostream & operator<<(ostream &os, const Segmentation &s)
Definition
Segmenter.cpp:19
Segmenter.h
Segment
Definition
Segmenter.h:26
Segment::type
int type
Definition
Segmenter.h:30
Segment::start
int start
Definition
Segmenter.h:28
Segment::end
int end
Definition
Segmenter.h:29
Segmentation
Definition
Segmenter.h:34
Segmentation::samplerate
int samplerate
Definition
Segmenter.h:37
Segmentation::segments
vector< Segment > segments
Definition
Segmenter.h:38
dsp
segmentation
Segmenter.cpp
Generated by
1.9.8