michaeltyson / TPCircularBuffer

A simple, fast circular buffer implementation
http://atastypixel.com/blog/a-simple-fast-circular-buffer-implementation-for-audio-processing/
839 stars 141 forks source link

Add data to the tail of the buffer. #28

Closed pablogeek closed 5 years ago

pablogeek commented 5 years ago

Hello would be possible to have a function that add bytes to the tail of the buffer instead of in the head? there are some situations where I might want to add data to the tail.

Thanks

michaeltyson commented 5 years ago

Hi - not without breaking the thread safety of the utility. You're probably better off using something different.

pablogeek commented 5 years ago

@michaeltyson Hi, thanks for the answer. Can you show me an example how this would be done. I will take care of the thread safety.

Thanks!!

michaeltyson commented 5 years ago

I'm afraid I don't have the time for that, as getting the logic right is nontrivial; apologies.

pablogeek commented 5 years ago

@michaeltyson Thanks anyway!! sorry to bother You!