3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
|
* Copyright (C) 2005, 2006 Christian Schoenebeck * |
7 |
* * |
* * |
8 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
9 |
* it under the terms of the GNU General Public License as published by * |
* it under the terms of the GNU General Public License as published by * |
34 |
|
|
35 |
std::map<LSCPEvent::event_t, String> LSCPEvent::EventNames = std::map<LSCPEvent::event_t, String>(); |
std::map<LSCPEvent::event_t, String> LSCPEvent::EventNames = std::map<LSCPEvent::event_t, String>(); |
36 |
|
|
37 |
LSCPEvent::LSCPEvent(String eventName) throw (LinuxSamplerException) { |
LSCPEvent::LSCPEvent(String eventName) throw (Exception) { |
38 |
for (std::map<event_t, String>::iterator iter = EventNames.begin(); iter != EventNames.end(); iter++) { |
for (std::map<event_t, String>::iterator iter = EventNames.begin(); iter != EventNames.end(); iter++) { |
39 |
if (iter->second == eventName) { |
if (iter->second == eventName) { |
40 |
this->type = iter->first; |
this->type = iter->first; |
41 |
return; |
return; |
42 |
} |
} |
43 |
} |
} |
44 |
throw LinuxSamplerException("Event does not exist"); |
throw Exception("Event does not exist"); |
45 |
} |
} |
46 |
|
|
47 |
LSCPEvent::LSCPEvent(event_t eventType, int uiData) { |
LSCPEvent::LSCPEvent(event_t eventType, int uiData) { |