the endless quest to plug memory leaks -- episode 379
[ardour.git] / headless / misc.cc
1 #include <iostream>
2 #include <cstdlib>
3
4 #include "misc.h"
5
6 void
7 TestReceiver::receive (Transmitter::Channel chn, const char * str)
8 {
9         const char *prefix = "";
10
11         switch (chn) {
12         case Transmitter::Error:
13                 prefix = ": [ERROR]: ";
14                 break;
15         case Transmitter::Info:
16                 /* ignore */
17                 return;
18         case Transmitter::Warning:
19                 prefix = ": [WARNING]: ";
20                 break;
21         case Transmitter::Fatal:
22                 prefix = ": [FATAL]: ";
23                 break;
24         case Transmitter::Throw:
25                 /* this isn't supposed to happen */
26                 abort ();
27         }
28
29         /* note: iostreams are already thread-safe: no external
30            lock required.
31         */
32
33         std::cout << prefix << str << std::endl;
34
35         if (chn == Transmitter::Fatal) {
36                 ::exit (9);
37         }
38 }
39
40 /* temporarily required due to some code design confusion (Feb 2014) */
41
42 #include "ardour/vst_types.h"
43
44 int vstfx_init (void*) { return 0; }
45 void vstfx_exit () {}
46 void vstfx_destroy_editor (VSTState*) {}