xref: /haiku/src/kits/midi2/MidiConsumer.cpp (revision 77f879871f89bfcd40965f6d4f2b2a529e2f9743)
1 /*
2  * Copyright 2006, Haiku.
3  *
4  * Copyright (c) 2002-2003 Matthijs Hollemans
5  * Distributed under the terms of the MIT License.
6  *
7  * Authors:
8  *		Matthijs Hollemans
9  */
10 
11 #include "debug.h"
12 #include <MidiConsumer.h>
13 #include "protocol.h"
14 
15 
16 bigtime_t
Latency() const17 BMidiConsumer::Latency() const
18 {
19 	bigtime_t res = 0LL;
20 
21 	if (LockLooper()) {
22 		res = fLatency;
23 		UnlockLooper();
24 	}
25 
26 	return res;
27 }
28 
29 
BMidiConsumer(const char * name)30 BMidiConsumer::BMidiConsumer(const char* name)
31 	: BMidiEndpoint(name)
32 {
33 	fIsConsumer = true;
34 	fLatency = 0LL;
35 	fPort = 0;
36 }
37 
38 
~BMidiConsumer()39 BMidiConsumer::~BMidiConsumer()
40 {
41 	// Do nothing.
42 }
43 
44 
_Reserved1()45 void BMidiConsumer::_Reserved1() { }
_Reserved2()46 void BMidiConsumer::_Reserved2() { }
_Reserved3()47 void BMidiConsumer::_Reserved3() { }
_Reserved4()48 void BMidiConsumer::_Reserved4() { }
_Reserved5()49 void BMidiConsumer::_Reserved5() { }
_Reserved6()50 void BMidiConsumer::_Reserved6() { }
_Reserved7()51 void BMidiConsumer::_Reserved7() { }
_Reserved8()52 void BMidiConsumer::_Reserved8() { }
53 
54