vb.netheap-memorycircular-buffer

Circular buffer in VB.NET


How can I create a circular buffer on the heap in VB.NET ?

This would be used for audio playback via P/Invoke to winmm.dll waveoutopen and waveoutwrite to support development of a software synth.

I currently use the marshall class to build a regular array of bytes in the heap.


Solution

  • OK, I'll byte...

    Do you really mean CIRCULAR ( as in fixed size) or could you use a linked-list?

    And

    Why worry about "heap?" This is VB not "c/c++" on an embedded hardware system. Is the use of the term "heap" due to data scope, life cycle, or availability (to other apps? as in ALLOC/MALLOC)