fix: pulse ID of inactive buffer
The index of the buffer to be written (active buffer) alternates when the transaction is completed (buffer is full). Pulse ID (which will be associated with the new inactive buffer) should be captured while switching the buffers.