WavPlayer.h changed to circuit board
Dependents: WavPlayerSD WavPlayerUSB WavPlayerUSB WavPlayerSD_CB
RingBuffer/RingBuffer.h
- Committer:
- JostBaus
- Date:
- 2019-04-14
- Revision:
- 4:b0186c8dca92
- Parent:
- 0:3695886f3495
File content as of revision 4:b0186c8dca92:
#ifndef RINGBUFFER_H #define RINGBUFFER_H #include "mbed.h" #define RBLENGTH 1000 #define RBWIDTH 2 class RingBuffer { public: RingBuffer(); int addToBuffer(int* input); int addToBufferS(int input, int across); int nextBuffer(); void readFirst(int* output); int readFirstS(int across); void readAt(int* output, int at); int readAtS(int at, int across); void readLast(int*output); int readLastS(int across); void usedFirst(); void usedLast(); int numberStored(); protected: int16_t Buffer[RBLENGTH][RBWIDTH]; int Start; int Finish; int Samples; void sortFinishNS(); void sortStartUS(); }; #endif