[Clam-devel] [PATCH] segmentation in chord extractor as a seperate class

Roman Goj roman.goj at gmail.com
Tue Jul 24 15:39:17 PDT 2007


Accessors are here :)

There's only one problem - the closing of the last segment - I'd like
to make _lastChord local for ChordExtractorSegmentation, not passed
with doIt (or is this not the right way?). So I'd like to be able to
check whether there is need for the closing of the last segment from
inside ChordExtractorSegmentation, so I added this:

        void closeLastSegment(unsigned & lastChord, CLAM::TData & currentTime )
        {
                if (lastChord != 0 & _timePositions.size() != 0)
                {
                        CLAM_ASSERT(_timePositions.size()%2==1,
"Attempting to close last segment even though all segments have been
closed");
                        _timePositions.push_back(currentTime);
                }
        }

to be called from the dumper's destructor... any nicer way of doing this?



Also - removed the commented out debugging code I introduced in the
first patch... further cleaning up coming... :)

Changelog:
* added accessors to _timePositions and _chordIndexes in
ChordExtractorSegmentation
* added closeLastSegment in ChordExtractorSegmentation
* removed commented out debugging code in ChordExtractorSegmentation

One more doxygen question though...
If I make comments like this

// This line does something extra neat
Cool.extraNeat( new wicked );

Should I make them also doxygen comments (or is doxygen supposed to be
used, as I'm guessing, just for variable/function declarations?) I can
check I guess somewhere... ok, found it:

"Doxygen allows you to put your documentation blocks practically
anywhere (the exception is inside the body of a function or inside a
normal C style comment block)."

in the manual link on doxygen.org, look up time 5 min. No RTFMs for me
this time then I guess ;-)

cheers!
roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChordExtractorSegmentation-step6-accessors.patch
Type: text/x-diff
Size: 4629 bytes
Desc: not available
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20070725/52ea49ef/attachment-0004.patch>


More information about the clam-devel mailing list