1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-17 14:11:27 +01:00

Update Nyquist to v3.09.

This commit is contained in:
Leland Lucius
2015-04-07 22:10:17 -05:00
parent f88b27e6d8
commit 9fb0ce5b82
358 changed files with 26327 additions and 7043 deletions

View File

@@ -0,0 +1,34 @@
#include "stddef.h"
#include "cppext.h"
#include "longque.h"
#include "stdlib.h"
void longque::init(int size)
{
head = 0;
tail = 0;
count = 0;
max = size;
buff = (long *) malloc(sizeof(long) * size);
}
void longque::finish()
{
free(buff);
}
//1 producer-consumer safe
long longque::remove()
{
long l;
if (count <= 0) return 0;
count--;
l = buff[head++];
if (head == max) head = 0;
return l;
}