1 /* CountEventConsumer.h
3 * A simple MIDI consumer that counts incoming MIDI events.
5 * Copyright 2013, Haiku, Inc. All rights reserved.
6 * Distributed under the terms of the MIT License.
8 * Revisions by Pete Goodeve
10 * Copyright 1999, Be Incorporated. All Rights Reserved.
11 * This file may be used under the terms of the Be Sample Code License.
13 #ifndef COUNTEVENTCONSUMER_H
14 #define COUNTEVENTCONSUMER_H
16 #include <MidiConsumer.h>
17 #include <SupportDefs.h>
19 class CountEventConsumer
: public BMidiLocalConsumer
22 CountEventConsumer(const char* name
)
24 BMidiLocalConsumer(name
),
36 void Data(uchar
*, size_t, bool, bigtime_t
)
38 atomic_add(&fEventCount
, 1);
45 #endif /* COUNTEVENTCONSUMER_H */