Merge branch 'windows+cc' into cairocanvas

This commit is contained in:
John Emmas
2014-01-12 17:45:28 +00:00
15 changed files with 79 additions and 25 deletions

View File

@@ -158,7 +158,7 @@ protected:
template<typename Time>
LIBEVORAL_API std::ostream& operator<<(std::ostream& o, const Evoral::Event<Time>& ev) {
/*LIBEVORAL_API*/ std::ostream& operator<<(std::ostream& o, const Evoral::Event<Time>& ev) {
o << "Event #" << ev.id() << " type = " << ev.event_type() << " @ " << ev.time();
o << std::hex;
for (uint32_t n = 0; n < ev.size(); ++n) {

View File

@@ -33,7 +33,7 @@ namespace Evoral {
* Used when we need an unsorted list of Events that is also an EventSink. Absolutely nothing more.
*/
template<typename Time>
class LIBEVORAL_API EventList : public std::list<Evoral::Event<Time> *>, public Evoral::EventSink<Time> {
class /*LIBEVORAL_API*/ EventList : public std::list<Evoral::Event<Time> *>, public Evoral::EventSink<Time> {
public:
EventList() {}

View File

@@ -40,7 +40,7 @@ namespace Evoral {
* possible interpretation of uint8_t.
*/
template<typename Time>
class LIBEVORAL_API EventRingBuffer : public PBD::RingBufferNPT<uint8_t>, public Evoral::EventSink<Time> {
class /*LIBEVORAL_API*/ EventRingBuffer : public PBD::RingBufferNPT<uint8_t>, public Evoral::EventSink<Time> {
public:
/** @param capacity Ringbuffer capacity in bytes.

View File

@@ -27,7 +27,7 @@ namespace Evoral {
/** Pure virtual base for anything you can write events to.
*/
template<typename Time>
class LIBEVORAL_API EventSink {
class /*LIBEVORAL_API*/ EventSink {
public:
virtual ~EventSink() {}
virtual uint32_t write(Time time, EventType type, uint32_t size, const uint8_t* buf) = 0;

View File

@@ -39,7 +39,7 @@ namespace Evoral {
* valid MIDI data for these functions to make sense.
*/
template<typename Time>
class LIBEVORAL_API MIDIEvent : public Event<Time> {
class /*LIBEVORAL_API*/ MIDIEvent : public Event<Time> {
public:
MIDIEvent(EventType type=0, Time time=0, uint32_t size=0, uint8_t* buf=NULL, bool alloc=false)
: Event<Time>(type, time, size, buf, alloc)

View File

@@ -24,20 +24,20 @@
namespace Evoral {
namespace MIDI {
struct LIBEVORAL_API ContinuousController : public Parameter {
struct /*LIBEVORAL_API*/ ContinuousController : public Parameter {
ContinuousController(uint32_t cc_type, uint8_t channel, uint32_t controller)
: Parameter(cc_type, channel, controller) {}
};
struct LIBEVORAL_API ProgramChange : public Parameter {
struct /*LIBEVORAL_API*/ ProgramChange : public Parameter {
ProgramChange(uint32_t pc_type, uint8_t channel) : Parameter(pc_type, channel, 0) {}
};
struct LIBEVORAL_API ChannelPressure : public Parameter {
struct /*LIBEVORAL_API*/ ChannelPressure : public Parameter {
ChannelPressure(uint32_t ca_type, uint32_t channel) : Parameter(ca_type, channel, 0) {}
};
struct LIBEVORAL_API PitchBender : public Parameter {
struct /*LIBEVORAL_API*/ PitchBender : public Parameter {
PitchBender(uint32_t pb_type, uint32_t channel) : Parameter(pb_type, channel, 0) {}
};

View File

@@ -33,7 +33,7 @@ namespace Evoral {
* Currently a note is defined as (on event, length, off event).
*/
template<typename Time>
class LIBEVORAL_API Note {
class /*LIBEVORAL_API*/ Note {
public:
Note(uint8_t chan=0, Time time=0, Time len=0, uint8_t note=0, uint8_t vel=0x40);
Note(const Note<Time>& copy);
@@ -108,7 +108,7 @@ private:
} // namespace Evoral
template<typename Time>
LIBEVORAL_API std::ostream& operator<<(std::ostream& o, const Evoral::Note<Time>& n) {
/*LIBEVORAL_API*/ std::ostream& operator<<(std::ostream& o, const Evoral::Note<Time>& n) {
o << "Note #" << n.id() << ": pitch = " << (int) n.note()
<< " @ " << n.time() << " .. " << n.end_time()
<< " velocity " << (int) n.velocity()
@@ -116,5 +116,7 @@ LIBEVORAL_API std::ostream& operator<<(std::ostream& o, const Evoral::Note<Time>
return o;
}
#include "../src/Note.impl"
#endif // EVORAL_NOTE_HPP

View File

@@ -30,7 +30,7 @@ template<typename Time> class EventRingBuffer;
/** Standard Midi File (Type 0)
*/
template<typename Time>
class LIBEVORAL_API SMF {
class /*LIBEVORAL_API*/ SMF {
public:
SMF();
virtual ~SMF();

View File

@@ -30,7 +30,7 @@ namespace Evoral {
* bank select and then a program change.
*/
template<typename Time>
class LIBEVORAL_API PatchChange
class /*LIBEVORAL_API*/ PatchChange
{
public:
/** @param t Time.
@@ -167,7 +167,7 @@ private:
}
template<typename Time>
LIBEVORAL_API std::ostream& operator<< (std::ostream& o, const Evoral::PatchChange<Time>& p) {
/*LIBEVORAL_API*/ std::ostream& operator<< (std::ostream& o, const Evoral::PatchChange<Time>& p) {
o << "Patch Change " << p.id() << " @ " << p.time() << " bank " << (int) p.bank() << " program " << (int) p.program();
return o;
}

View File

@@ -25,7 +25,7 @@
namespace Evoral {
enum LIBEVORAL_API OverlapType {
enum /*LIBEVORAL_API*/ OverlapType {
OverlapNone, // no overlap
OverlapInternal, // the overlap is 100% with the object
OverlapStart, // overlap covers start, but ends within
@@ -34,7 +34,7 @@ enum LIBEVORAL_API OverlapType {
};
template<typename T>
LIBEVORAL_API OverlapType coverage (T sa, T ea, T sb, T eb) {
/*LIBEVORAL_API*/ OverlapType coverage (T sa, T ea, T sb, T eb) {
/* OverlapType returned reflects how the second (B)
range overlaps the first (A).
@@ -109,7 +109,7 @@ LIBEVORAL_API OverlapType coverage (T sa, T ea, T sb, T eb) {
/** Type to describe a time range */
template<typename T>
struct LIBEVORAL_API Range {
struct /*LIBEVORAL_API*/ Range {
Range (T f, T t) : from (f), to (t) {}
T from; ///< start of the range
T to; ///< end of the range
@@ -121,7 +121,7 @@ bool operator== (Range<T> a, Range<T> b) {
}
template<typename T>
class LIBEVORAL_API RangeList {
class /*LIBEVORAL_API*/ RangeList {
public:
RangeList () : _dirty (false) {}
@@ -174,7 +174,7 @@ private:
/** Type to describe the movement of a time range */
template<typename T>
struct LIBEVORAL_API RangeMove {
struct /*LIBEVORAL_API*/ RangeMove {
RangeMove (T f, double l, T t) : from (f), length (l), to (t) {}
T from; ///< start of the range
double length; ///< length of the range

View File

@@ -44,7 +44,7 @@ template<typename Time> class Event;
/** An iterator over (the x axis of) a 2-d double coordinate space.
*/
class LIBEVORAL_API ControlIterator {
class /*LIBEVORAL_API*/ ControlIterator {
public:
ControlIterator(boost::shared_ptr<const ControlList> al, double ax, double ay)
: list(al)
@@ -216,7 +216,7 @@ private:
public:
/** Read iterator */
class const_iterator {
class LIBEVORAL_API /* Added by JE - */ const_iterator {
public:
const_iterator();
const_iterator(const Sequence<Time>& seq, Time t, bool, std::set<Evoral::Parameter> const &);
@@ -362,7 +362,8 @@ private:
} // namespace Evoral
template<typename Time> LIBEVORAL_API std::ostream& operator<<(std::ostream& o, const Evoral::Sequence<Time>& s) { s.dump (o); return o; }
template<typename Time> /*LIBEVORAL_API*/ std::ostream& operator<<(std::ostream& o, const Evoral::Sequence<Time>& s) { s.dump (o); return o; }
#endif // EVORAL_SEQUENCE_HPP

View File

@@ -65,11 +65,16 @@ protected:
* going on.
*/
template<typename A, typename B>
class LIBEVORAL_API IdentityConverter : public TimeConverter<A,B> {
class /*LIBEVORAL_API*/ IdentityConverter : public TimeConverter<A,B> {
public:
IdentityConverter() {}
LIBEVORAL_API /* Added by JE - 27-10-2013 */IdentityConverter() {}
LIBEVORAL_API /* Added by JE - 27-10-2013 */B to(A a) const;
LIBEVORAL_API /* Added by JE - 27-10-2013 */A from(B b) const;
/* Changed by JE - 27-10-2013. Was formerly. . .
B to(A a) const { return static_cast<B>(a); }
A from(B b) const { return static_cast<A>(b); }
*/
};

View File

@@ -29,7 +29,7 @@ class Parameter;
/** The applications passes one of these which provide the implementation
* with required information about event types in an opaque, type neutral way
*/
class LIBEVORAL_API TypeMap {
class /*LIBEVORAL_API*/ TypeMap {
public:
virtual ~TypeMap() {}

View File

@@ -0,0 +1,42 @@
/* This file is part of Evoral.
* Copyright (C) 2008 David Robillard <http://drobilla.net>
* Copyright (C) 2000-2008 Paul Davis
*
* Evoral is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* Evoral is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "evoral/TimeConverter.hpp"
typedef long long framepos_t;
namespace Evoral {
template<typename A, typename B>
B
IdentityConverter<A,B>::to(A a) const
{
return static_cast<B>(a);
}
template<typename A, typename B>
A
IdentityConverter<A,B>::from(B b) const
{
return static_cast<A>(b);
}
template class IdentityConverter<double, framepos_t>;
template class TimeConverter<double, framepos_t>;
} // namespace Evoral

View File

@@ -27,6 +27,10 @@
#include "evoral/midi_util.h"
#include "pbd/file_manager.h"
#ifdef COMPILER_MSVC
extern double round(double x);
#endif
using namespace std;
namespace Evoral {