Changeset 4315:346b6e260513 in roaraudio
- Timestamp:
- 09/07/10 15:01:11 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/notify_proxy.c
r4314 r4315 36 36 #include "libroar.h" 37 37 38 void roar_notify_proxy_std(struct roar_notify_core * core, struct roar_event * event, void * userdata); 38 #define MAX_EVENTS_PER_GROUP 4 39 #define EOL ROAR_NOTIFY_SPECIAL 40 41 void roar_notify_proxy_std(struct roar_notify_core * core, struct roar_event * event, void * userdata) { 42 struct { 43 uint32_t event_min, event_max; 44 uint32_t events[MAX_EVENTS_PER_GROUP]; 45 } * ptr, list[] = { 46 {.event_min = ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS), 47 .event_max = ROAR_NOTIFY_EGRP2EVENT(ROAR_NOTIFY_OE_GROUP_STREAMS + 0xff), 48 .events = { 49 EOL 50 } 51 } 52 }; 53 struct roar_event locevent; 54 size_t i, e; 55 register uint32_t oe = event->event; 56 57 (void)userdata; 58 59 memcpy(&locevent, event, sizeof(locevent)); 60 61 locevent.event_proxy = locevent.event; 62 locevent.flags |= ROAR_EVENT_FLAG_PROXYEVENT; 63 64 locevent.event = ROAR_EGRP_ANY_EVENT; 65 66 roar_notify_core_emit(core, &locevent); 67 68 69 for (i = 0; i < sizeof(list)/sizeof(*list); i++) { 70 ptr = &(list[i]); 71 if ( ptr->event_min <= oe && ptr->event_max >= oe ) { 72 for (e = 0; ptr->events[e] != EOL; e++) { 73 locevent.event = ptr->events[e]; 74 roar_notify_core_emit(core, &locevent); 75 } 76 } 77 } 78 } 39 79 40 80 //ll
Note: See TracChangeset
for help on using the changeset viewer.