drumstick  1.1.2
alsaevent.h
Go to the documentation of this file.
1 /*
2  MIDI Sequencer C++ library
3  Copyright (C) 2006-2018, Pedro Lopez-Cabanillas <plcl@users.sf.net>
4 
5  This library is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  GNU General Public License for more details.
14 
15  You should have received a copy of the GNU General Public License
16  along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 
19 #ifndef DRUMSTICK_ALSAEVENT_H
20 #define DRUMSTICK_ALSAEVENT_H
21 
22 #include "drumstickcommon.h"
23 #include <QEvent>
24 
33 namespace drumstick {
34 
39 const QEvent::Type SequencerEventType = QEvent::Type(QEvent::User + 4154); // :-)
40 
44 #define CLONE_EVENT_DECLARATION(T) virtual T* clone() { return new T(&m_event); }
45 
52 class DRUMSTICK_EXPORT SequencerEvent : public QEvent
53 {
54 public:
56  SequencerEvent(const SequencerEvent& other);
57  SequencerEvent(snd_seq_event_t* event);
59  virtual ~SequencerEvent() {}
60 
61  SequencerEvent& operator=(const SequencerEvent& other);
62  void setSequencerType(const snd_seq_event_type_t eventType);
68  snd_seq_event_type_t getSequencerType() const { return m_event.type; }
69  void setDestination(const unsigned char client, const unsigned char port);
70  void setSource(const unsigned char port);
76  unsigned char getSourceClient() const { return m_event.source.client; }
82  unsigned char getSourcePort() const { return m_event.source.port; }
88  snd_seq_tick_time_t getTick() const { return m_event.time.tick; }
94  unsigned int getRealTimeSecs() const { return m_event.time.time.tv_sec; }
100  unsigned int getRealTimeNanos() const { return m_event.time.time.tv_nsec; }
101  void setSubscribers();
102  void setBroadcast();
103  void setDirect();
104  void scheduleTick(const int queue, const int tick, const bool relative);
105  void scheduleReal(const int queue, const ulong secs, const ulong nanos, const bool relative);
106  void setPriority(const bool high);
112  unsigned char getTag() const { return m_event.tag; }
113  void setTag(const unsigned char aTag);
114  unsigned int getRaw32(const unsigned int n) const;
115  void setRaw32(const unsigned int n, const unsigned int value);
116  unsigned char getRaw8(const unsigned int n) const;
117  void setRaw8(const unsigned int n, const unsigned char value);
122  snd_seq_event_t* getHandle() { return &m_event; }
123  int getEncodedLength();
124 
125  static bool isSubscription(const SequencerEvent* event);
126  static bool isPort(const SequencerEvent* event);
127  static bool isClient(const SequencerEvent* event);
128  static bool isConnectionChange(const SequencerEvent* event);
129  static bool isChannel(const SequencerEvent* event);
130 
133 
134 protected:
135  void free() __attribute__((deprecated));
136 
141  snd_seq_event_t m_event;
142 };
143 
147 class DRUMSTICK_EXPORT ChannelEvent : public SequencerEvent
148 {
149 public:
153  ChannelEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
159  void setChannel(const MidiByte c) { m_event.data.note.channel = (c & 0xf); }
165  int getChannel() const { return m_event.data.note.channel; }
166 };
167 
171 class DRUMSTICK_EXPORT KeyEvent : public ChannelEvent
172 {
173 public:
177  KeyEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
183  int getKey() const { return m_event.data.note.note; }
189  void setKey(const MidiByte b) { m_event.data.note.note = b; }
195  int getVelocity() const { return m_event.data.note.velocity; }
201  void setVelocity(const MidiByte b) { m_event.data.note.velocity = b; }
202 };
203 
210 class DRUMSTICK_EXPORT NoteEvent : public KeyEvent
211 {
212 public:
214  NoteEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTE; }
216  NoteEvent(snd_seq_event_t* event) : KeyEvent(event) {}
217  NoteEvent(const int ch, const int key, const int vel, const int dur);
223  ulong getDuration() const { return m_event.data.note.duration; }
229  void setDuration(const ulong d) { m_event.data.note.duration = d; }
232 };
233 
237 class DRUMSTICK_EXPORT NoteOnEvent : public KeyEvent
238 {
239 public:
241  NoteOnEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEON; }
243  NoteOnEvent(snd_seq_event_t* event) : KeyEvent(event) {}
244  NoteOnEvent(const int ch, const int key, const int vel);
247 };
248 
252 class DRUMSTICK_EXPORT NoteOffEvent : public KeyEvent
253 {
254 public:
256  NoteOffEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_NOTEOFF; }
258  NoteOffEvent(snd_seq_event_t* event) : KeyEvent(event) {}
259  NoteOffEvent(const int ch, const int key, const int vel);
262 };
263 
267 class DRUMSTICK_EXPORT KeyPressEvent : public KeyEvent
268 {
269 public:
271  KeyPressEvent() : KeyEvent() { m_event.type = SND_SEQ_EVENT_KEYPRESS; }
273  KeyPressEvent(snd_seq_event_t* event) : KeyEvent(event) {}
274  KeyPressEvent(const int ch, const int key, const int vel);
277 };
278 
282 class DRUMSTICK_EXPORT ControllerEvent : public ChannelEvent
283 {
284 public:
288  ControllerEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
289  ControllerEvent(const int ch, const int cc, const int val);
295  uint getParam() const { return m_event.data.control.param; }
301  void setParam( const uint p ) { m_event.data.control.param = p; }
307  int getValue() const { return m_event.data.control.value; }
313  void setValue( const int v ) { m_event.data.control.value = v; }
316 };
317 
321 class DRUMSTICK_EXPORT ProgramChangeEvent : public ChannelEvent
322 {
323 public:
325  ProgramChangeEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PGMCHANGE; }
327  ProgramChangeEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
328  ProgramChangeEvent(const int ch, const int val);
330  int getValue() const { return m_event.data.control.value; }
332  void setValue( const int v ) { m_event.data.control.value = v; }
335 };
336 
340 class DRUMSTICK_EXPORT PitchBendEvent : public ChannelEvent
341 {
342 public:
344  PitchBendEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_PITCHBEND; }
346  PitchBendEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
347  PitchBendEvent(const int ch, const int val);
349  int getValue() const { return m_event.data.control.value; }
351  void setValue( const int v ) { m_event.data.control.value = v; }
354 };
355 
359 class DRUMSTICK_EXPORT ChanPressEvent : public ChannelEvent
360 {
361 public:
363  ChanPressEvent() : ChannelEvent() { m_event.type = SND_SEQ_EVENT_CHANPRESS; }
365  ChanPressEvent(snd_seq_event_t* event) : ChannelEvent(event) {}
366  ChanPressEvent( const int ch, const int val);
368  int getValue() const { return m_event.data.control.value; }
370  void setValue( const int v ) { m_event.data.control.value = v; }
373 };
374 
378 class DRUMSTICK_EXPORT VariableEvent : public SequencerEvent
379 {
380 public:
381  VariableEvent();
382  VariableEvent(snd_seq_event_t* event);
383  VariableEvent(const QByteArray& data);
384  VariableEvent(const VariableEvent& other);
385  VariableEvent(const unsigned int datalen, char* dataptr);
386  VariableEvent& operator=(const VariableEvent& other);
388  unsigned int getLength() const { return m_event.data.ext.len; }
390  const char* getData() const { return static_cast<const char*>(m_event.data.ext.ptr); }
393 protected:
394  QByteArray m_data;
395 };
396 
400 class DRUMSTICK_EXPORT SysExEvent : public VariableEvent
401 {
402 public:
403  SysExEvent();
404  SysExEvent(snd_seq_event_t* event);
405  SysExEvent(const QByteArray& data);
406  SysExEvent(const SysExEvent& other);
407  SysExEvent(const unsigned int datalen, char* dataptr);
410 };
411 
418 class DRUMSTICK_EXPORT TextEvent : public VariableEvent
419 {
420 public:
421  TextEvent();
422  TextEvent(snd_seq_event_t* event);
423  explicit TextEvent(const QString& text, const int textType = 1);
424  TextEvent(const TextEvent& other);
425  TextEvent(const unsigned int datalen, char* dataptr);
426  QString getText() const;
427  int getTextType() const;
430 protected:
432 };
433 
437 class DRUMSTICK_EXPORT SystemEvent : public SequencerEvent
438 {
439 public:
443  SystemEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
444  SystemEvent(const snd_seq_event_type_t type);
447 };
448 
454 class DRUMSTICK_EXPORT QueueControlEvent : public SequencerEvent
455 {
456 public:
460  QueueControlEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
461  QueueControlEvent(const snd_seq_event_type_t type, const int queue, const int value);
463  int getQueue() const { return m_event.data.queue.queue; }
465  void setQueue(const uchar q) { m_event.data.queue.queue = q; }
467  int getValue() const { return m_event.data.queue.param.value; }
469  void setValue(const int val) { m_event.data.queue.param.value = val; }
471  uint getPosition() const { return m_event.data.queue.param.position; }
473  void setPosition(const uint pos) { m_event.data.queue.param.position = pos; }
475  snd_seq_tick_time_t getTickTime() const { return m_event.data.queue.param.time.tick; }
477  void setTickTime(const snd_seq_tick_time_t t) { m_event.data.queue.param.time.tick = t; }
479  uint getSkewBase() const { return m_event.data.queue.param.skew.base; }
481  void setSkewBase(const uint base) { m_event.data.queue.param.skew.base = base; }
483  uint getSkewValue() const { return m_event.data.queue.param.skew.value; }
485  void setSkewValue(const uint val) {m_event.data.queue.param.skew.value = val; }
488 };
489 
493 class DRUMSTICK_EXPORT ValueEvent : public SequencerEvent
494 {
495 public:
499  ValueEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
500  ValueEvent(const snd_seq_event_type_t type, const int val);
502  int getValue() const { return m_event.data.control.value; }
504  void setValue( const int v ) { m_event.data.control.value = v; }
507 };
508 
512 class DRUMSTICK_EXPORT TempoEvent : public QueueControlEvent
513 {
514 public:
518  TempoEvent(snd_seq_event_t* event) : QueueControlEvent(event) {}
519  TempoEvent(const int queue, const int tempo);
522 };
523 
527 class DRUMSTICK_EXPORT SubscriptionEvent : public SequencerEvent
528 {
529 public:
533  SubscriptionEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
535  bool subscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_SUBSCRIBED); }
537  bool unsubscribed() const { return (m_event.type == SND_SEQ_EVENT_PORT_UNSUBSCRIBED); }
539  int getSenderClient() const { return m_event.data.connect.sender.client; }
541  int getSenderPort() const { return m_event.data.connect.sender.port; }
543  int getDestClient() const { return m_event.data.connect.dest.client; }
545  int getDestPort() const { return m_event.data.connect.dest.port; }
548 };
549 
553 class DRUMSTICK_EXPORT ClientEvent : public SequencerEvent
554 {
555 public:
559  ClientEvent(snd_seq_event_t* event) : SequencerEvent(event) {}
560  int getClient() const { return m_event.data.addr.client; }
562  CLONE_EVENT_DECLARATION(ClientEvent)
563 };
564 
568 class DRUMSTICK_EXPORT PortEvent : public ClientEvent
569 {
570 public:
574  PortEvent(snd_seq_event_t* event) : ClientEvent(event) {}
576  int getPort() const { return m_event.data.addr.port; }
579 };
580 
585 class DRUMSTICK_EXPORT RemoveEvents
586 {
587 public:
588  friend class MidiClient;
589 
590 public:
592  RemoveEvents();
593  RemoveEvents(const RemoveEvents& other);
594  RemoveEvents(snd_seq_remove_events_t* other);
595  virtual ~RemoveEvents();
596  RemoveEvents* clone();
597  RemoveEvents& operator=(const RemoveEvents& other);
598  int getSizeOfInfo() const;
599 
600  int getChannel();
601  unsigned int getCondition();
602  const snd_seq_addr_t* getDest();
603  int getEventType();
604  int getQueue();
605  int getTag();
606  const snd_seq_timestamp_t* getTime();
607  void setChannel(int chan);
608  void setCondition(unsigned int cond);
609  void setDest(const snd_seq_addr_t* dest);
610  void setEventType(int type);
611  void setQueue(int queue);
612  void setTag(int tag);
613  void setTime(const snd_seq_timestamp_t* time);
614 
615 private:
616  snd_seq_remove_events_t* m_Info;
617 };
618 
622 class DRUMSTICK_EXPORT MidiCodec : public QObject
623 {
624  Q_OBJECT
625 public:
626  explicit MidiCodec(int bufsize, QObject* parent = 0);
627  ~MidiCodec();
628 
629  void init();
630  long decode(unsigned char *buf,
631  long count,
632  const snd_seq_event_t *ev);
633  long encode(const unsigned char *buf,
634  long count,
635  snd_seq_event_t *ev);
636  long encode(int c,
637  snd_seq_event_t *ev);
638  void enableRunningStatus(bool enable);
639  void resetEncoder();
640  void resetDecoder();
641  void resizeBuffer(int bufsize);
642 private:
643  snd_midi_event_t* m_Info;
644 };
645 
646 } /* namespace drumstick */
647 
650 #endif //DRUMSTICK_ALSAEVENT_H
ValueEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:499
snd_seq_event_t * getHandle()
Gets the handle of the event.
Definition: alsaevent.h:122
ClientEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:559
void setVelocity(const MidiByte b)
Sets the note velocity of this event.
Definition: alsaevent.h:201
ALSA Event representing a queue control command.
Definition: alsaevent.h:454
int getVelocity() const
Gets the note velocity of this event.
Definition: alsaevent.h:195
snd_seq_tick_time_t getTick() const
Gets the tick time of the event.
Definition: alsaevent.h:88
unsigned char getTag() const
Gets the tag of the event.
Definition: alsaevent.h:112
bool subscribed() const
Returns true if the event was a subscribed port.
Definition: alsaevent.h:535
TempoEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:518
void setValue(const int v)
Sets the MIDI program number.
Definition: alsaevent.h:332
Base class for the events having Key and Velocity properties.
Definition: alsaevent.h:171
PortEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:574
int getSenderClient() const
Gets the sender client number.
Definition: alsaevent.h:539
Generic event having a value property.
Definition: alsaevent.h:493
int getQueue() const
Gets the queue number.
Definition: alsaevent.h:463
ChanPressEvent()
Default constructor.
Definition: alsaevent.h:363
int getValue() const
Gets the channel aftertouch value.
Definition: alsaevent.h:368
const QEvent::Type SequencerEventType
Constant SequencerEventType is the QEvent::type() of any SequencerEvent object to be used to check th...
Definition: alsaevent.h:39
QByteArray m_data
Clone this object returning a pointer to the new object.
Definition: alsaevent.h:394
void setDuration(const ulong d)
Sets the note's duration.
Definition: alsaevent.h:229
PortEvent()
Default constructor.
Definition: alsaevent.h:572
SystemEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:443
ulong getDuration() const
Gets the note's duration.
Definition: alsaevent.h:223
virtual ~SequencerEvent()
Destructor.
Definition: alsaevent.h:59
Generic event.
Definition: alsaevent.h:437
Event representing a MIDI control change event.
Definition: alsaevent.h:282
NoteEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:216
void setTickTime(const snd_seq_tick_time_t t)
Sets the musical time in ticks.
Definition: alsaevent.h:477
KeyEvent()
Default constructor.
Definition: alsaevent.h:175
Base class for variable length events.
Definition: alsaevent.h:378
ProgramChangeEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:327
ALSA Event representing a change on some ALSA sequencer client on the system.
Definition: alsaevent.h:553
ControllerEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:288
The QObject class is the base class of all Qt objects.
Base class for the event's hierarchy.
Definition: alsaevent.h:52
snd_seq_event_type_t getSequencerType() const
Gets the sequencer event type.
Definition: alsaevent.h:68
Auxiliary class to translate between raw MIDI streams and ALSA events.
Definition: alsaevent.h:622
Event representing a MIDI system exclusive event.
Definition: alsaevent.h:400
int getValue() const
Gets the event's value.
Definition: alsaevent.h:502
int getValue() const
Gets the MIDI program number.
Definition: alsaevent.h:330
bool unsubscribed() const
Returns true if the event was an unsubscribed port.
Definition: alsaevent.h:537
int getValue() const
Gets the event's value.
Definition: alsaevent.h:467
void setSkewValue(const uint val)
Sets the skew value.
Definition: alsaevent.h:485
uint getParam() const
Gets the controller event's parameter.
Definition: alsaevent.h:295
int getSenderPort() const
Gets the sender port number.
Definition: alsaevent.h:541
NoteOnEvent()
Default constructor.
Definition: alsaevent.h:241
Client management.
Definition: alsaclient.h:197
void setQueue(const uchar q)
Sets the queue number.
Definition: alsaevent.h:465
ChanPressEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:365
uint getPosition() const
Gets the queue position.
Definition: alsaevent.h:471
void setSkewBase(const uint base)
Sets the skew base, should be 65536.
Definition: alsaevent.h:481
uint getSkewBase() const
Gets the skew base.
Definition: alsaevent.h:479
PitchBendEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:346
NoteEvent()
Default constructor.
Definition: alsaevent.h:214
unsigned char getSourcePort() const
Gets the source port id.
Definition: alsaevent.h:82
NoteOffEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:258
void setValue(const int v)
Sets the channel aftertouch value.
Definition: alsaevent.h:370
ClientEvent()
Default constructor.
Definition: alsaevent.h:557
void setPosition(const uint pos)
Sets the queue position.
Definition: alsaevent.h:473
int getValue() const
Gets the controller event's value.
Definition: alsaevent.h:307
ALSA Event representing a change on some ALSA sequencer port on the system.
Definition: alsaevent.h:568
Event representing a MIDI key pressure, or polyphonic after-touch event.
Definition: alsaevent.h:267
SubscriptionEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:533
void setValue(const int v)
Sets the controller event's value.
Definition: alsaevent.h:313
Event representing a SMF text event.
Definition: alsaevent.h:418
ALSA Event representing a tempo change for an ALSA queue.
Definition: alsaevent.h:512
Event representing a MIDI program change event.
Definition: alsaevent.h:321
PitchBendEvent()
Default constructor.
Definition: alsaevent.h:344
void setChannel(const MidiByte c)
Sets the channel of the event.
Definition: alsaevent.h:159
int getDestClient() const
Gets the destination client number.
Definition: alsaevent.h:543
Base class for the events having a Channel property.
Definition: alsaevent.h:147
SubscriptionEvent()
Default constructor.
Definition: alsaevent.h:531
unsigned int getLength() const
Gets the data length.
Definition: alsaevent.h:388
Common functionality.
unsigned char getSourceClient() const
Gets the source client id.
Definition: alsaevent.h:76
unsigned int getRealTimeSecs() const
Gets the seconds of the event's real time.
Definition: alsaevent.h:94
int getChannel() const
Gets the event's channel.
Definition: alsaevent.h:165
void setValue(const int v)
Sets the event's value.
Definition: alsaevent.h:504
ControllerEvent()
Default constructor.
Definition: alsaevent.h:286
Auxiliary class to remove events from an ALSA queue.
Definition: alsaevent.h:585
Class representing a note event with duration.
Definition: alsaevent.h:210
void setParam(const uint p)
Sets the controller event's parameter.
Definition: alsaevent.h:301
int m_textType
Clone this object returning a pointer to the new object.
Definition: alsaevent.h:431
ALSA Event representing a subscription between two ALSA clients and ports.
Definition: alsaevent.h:527
int getDestPort() const
Gets the destination port number.
Definition: alsaevent.h:545
QueueControlEvent()
Default constructor.
Definition: alsaevent.h:458
ValueEvent()
Default constructor.
Definition: alsaevent.h:497
ChannelEvent()
Default constructor.
Definition: alsaevent.h:151
uint getSkewValue() const
Gets the skew value.
Definition: alsaevent.h:483
Event representing a MIDI bender, or pitch wheel event.
Definition: alsaevent.h:340
#define CLONE_EVENT_DECLARATION(T)
Macro to declare a virtual clone() method for SequencerEvent and derived classes.
Definition: alsaevent.h:44
ProgramChangeEvent()
Default constructor.
Definition: alsaevent.h:325
int getPort() const
Gets the port number.
Definition: alsaevent.h:576
Event representing a note-off MIDI event.
Definition: alsaevent.h:252
NoteOffEvent()
Default constructor.
Definition: alsaevent.h:256
Event representing a MIDI channel pressure or after-touch event.
Definition: alsaevent.h:359
void setValue(const int v)
Sets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:351
Event representing a note-on MIDI event.
Definition: alsaevent.h:237
unsigned int getRealTimeNanos() const
Gets the nanoseconds of the event's real time.
Definition: alsaevent.h:100
TempoEvent()
Default constructor.
Definition: alsaevent.h:516
const char * getData() const
Gets the data pointer.
Definition: alsaevent.h:390
KeyEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:177
int getKey() const
Gets the MIDI note of this event.
Definition: alsaevent.h:183
NoteOnEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:243
int getValue() const
Gets the MIDI pitch bend value, zero centered from -8192 to 8191.
Definition: alsaevent.h:349
QueueControlEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:460
The QEvent class is the base class of all event classes.
KeyPressEvent()
Default constructor.
Definition: alsaevent.h:271
snd_seq_tick_time_t getTickTime() const
Gets the musical time in ticks.
Definition: alsaevent.h:475
KeyPressEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:273
ChannelEvent(snd_seq_event_t *event)
Constructor from an ALSA event record.
Definition: alsaevent.h:153
SystemEvent()
Default constructor.
Definition: alsaevent.h:441
void setKey(const MidiByte b)
Sets the MIDI note of this event.
Definition: alsaevent.h:189
quint8 MidiByte
8-bit unsigned number to be used as a MIDI message parameter
void setValue(const int val)
Sets the event's value.
Definition: alsaevent.h:469