- bool success = RingBuffer<uint8_t>::full_read(sizeof(T), (uint8_t*)time);
- if (success)
- success = RingBuffer<uint8_t>::full_read(sizeof(EventType), (uint8_t*)type);
- if (success)
- success = RingBuffer<uint8_t>::full_read(sizeof(uint32_t), (uint8_t*)size);
- if (success)
- success = RingBuffer<uint8_t>::full_read(*size, buf);
-
- return success;
+ if (PBD::RingBufferNPT<uint8_t>::read ((uint8_t*)time, sizeof (Time)) != sizeof (Time)) {
+ return false;
+ }
+
+ if (PBD::RingBufferNPT<uint8_t>::read ((uint8_t*)type, sizeof(EventType)) != sizeof (EventType)) {
+ return false;
+ }
+
+ if (PBD::RingBufferNPT<uint8_t>::read ((uint8_t*)size, sizeof(uint32_t)) != sizeof (uint32_t)) {
+ return false;
+ }
+
+ if (PBD::RingBufferNPT<uint8_t>::read (buf, *size) != *size) {
+ return false;
+ }
+
+ return true;