Commit Graph

6 Commits (bd181651819379632b8907f9621e0d2b5c29431e)

Author SHA1 Message Date
Simon.Dean bd18165181 Reworked Message Handling
- Have adjusted the buffer mechanism so instead of using the buffer to store a message in the event of an interleaved frame, we basically perform all work on the buffer (albeit we take the existing message for the channel id from the buffer for the frame we're working on and write the message to the buffer if the message isn't resolved).
- Moved writing to buffer to receiveFramePayloadHandler() function if the message is BULK or LAST and therefore not resolved.
- Simplified receiveFrameHeaderHandler() so that we automatically try to find a message from the buffer and then createa message as necessary depending on the frame type.
- Excellent stability with no noticeable artefacts in audio after 1 hour.
- Removed majority of debugging after achieving stability.
2022-02-13 21:06:07 +00:00
Simon.Dean f80e72c480 Rework Message Handling.
Slight tweaks
- Add isInterleaved boolean
- If message is NULL and Frame Type is MIDDLE or LAST, then look for an existing message in buffer (if the message_ is null, then we need a FIRST or BULK frame)
- If message is still NULL, then we will create a new message, but recognise it as a valid frame ONLY if this is a FIRST or BULK frame because we cannot start on a MIDDLE or LAST.
- Rename recentFrameType to thisFrameType for more accuracy
- Only Resolve the Frame if the frame is BULK or LAST and the frame is valid.
- If the frame is interleaved, then we will use our interleavedPromise handler. Only resolve the main promise if the frame is not interleaved.
- Also reset message once resolved.
- Carry on reading if the original promise is not resolved (ie FIRST, MIDDLE, or Interleaved frame)
- Add some counters for debugging purposes.
2022-02-11 12:35:07 +00:00
Jason Wenger f9f02815d0 Rearrange directory structure 2020-07-04 09:37:43 -05:00
michal.szwaj dba8ce6b0b Improve thread safety 2018-03-17 01:57:35 +01:00
michal.szwaj 211e7f5072 Map operation aborted error code 2018-03-17 01:41:49 +01:00
michal.szwaj 9bcecbc977 Initial commit 2018-02-11 20:36:55 +01:00