mirror of https://bitbucket.org/ausocean/av.git
Fixed some var names
This commit is contained in:
parent
89b4468f6c
commit
3a5a9f51fc
|
@ -54,17 +54,17 @@ type ringBuffer struct {
|
|||
New returns the addres of a new ring buffer with the parameters specified.
|
||||
It initialises fields and allocates the required dataMemory.
|
||||
*/
|
||||
func NewRingBuffer(size int, elementSize int) (rb *ringBuffer) {
|
||||
func NewRingBuffer(bufferSize int, elementSize int) (rb *ringBuffer) {
|
||||
if size <= 0 || elementSize <= 0 {
|
||||
return nil
|
||||
}
|
||||
rb = new(ringBuffer)
|
||||
rb.dataMemory = make([][]byte, size)
|
||||
rb.dataMemory = make([][]byte, bufferSize)
|
||||
for i := range rb.dataMemory {
|
||||
rb.dataMemory[i] = make([]byte, elementSize)
|
||||
}
|
||||
rb.sizeMemory = make([]int, size)
|
||||
rb.size = size
|
||||
rb.size = bufferSize
|
||||
rb.noOfElements = 0
|
||||
rb.first = -1
|
||||
rb.last = -1
|
||||
|
|
Loading…
Reference in New Issue