xref: /haiku/src/kits/midi2/MidiConsumer.cpp (revision e81a954787e50e56a7f06f72705b7859b6ab06d1)
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
17 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 
30 BMidiConsumer::BMidiConsumer(const char* name)
31 	: BMidiEndpoint(name)
32 {
33 	fIsConsumer = true;
34 	fLatency = 0LL;
35 	fPort = 0;
36 }
37 
38 
39 BMidiConsumer::~BMidiConsumer()
40 {
41 	// Do nothing.
42 }
43 
44 
45 void BMidiConsumer::_Reserved1() { }
46 void BMidiConsumer::_Reserved2() { }
47 void BMidiConsumer::_Reserved3() { }
48 void BMidiConsumer::_Reserved4() { }
49 void BMidiConsumer::_Reserved5() { }
50 void BMidiConsumer::_Reserved6() { }
51 void BMidiConsumer::_Reserved7() { }
52 void BMidiConsumer::_Reserved8() { }
53 
54