WavPlayer.h changed to circuit board

Dependents:   WavPlayerSD WavPlayerUSB WavPlayerUSB WavPlayerSD_CB

Committer:
p07gbar
Date:
Wed Sep 19 10:58:16 2012 +0000
Revision:
0:3695886f3495
Working stably

Who changed what in which revision?

UserRevisionLine numberNew contents of line
p07gbar 0:3695886f3495 1 #ifndef RINGBUFFER_H
p07gbar 0:3695886f3495 2 #define RINGBUFFER_H
p07gbar 0:3695886f3495 3
p07gbar 0:3695886f3495 4 #include "mbed.h"
p07gbar 0:3695886f3495 5
p07gbar 0:3695886f3495 6 #define RBLENGTH 1000
p07gbar 0:3695886f3495 7 #define RBWIDTH 2
p07gbar 0:3695886f3495 8
p07gbar 0:3695886f3495 9 class RingBuffer {
p07gbar 0:3695886f3495 10
p07gbar 0:3695886f3495 11 public:
p07gbar 0:3695886f3495 12
p07gbar 0:3695886f3495 13 RingBuffer();
p07gbar 0:3695886f3495 14
p07gbar 0:3695886f3495 15 int addToBuffer(int* input);
p07gbar 0:3695886f3495 16 int addToBufferS(int input, int across);
p07gbar 0:3695886f3495 17 int nextBuffer();
p07gbar 0:3695886f3495 18
p07gbar 0:3695886f3495 19 void readFirst(int* output);
p07gbar 0:3695886f3495 20 int readFirstS(int across);
p07gbar 0:3695886f3495 21
p07gbar 0:3695886f3495 22 void readAt(int* output, int at);
p07gbar 0:3695886f3495 23 int readAtS(int at, int across);
p07gbar 0:3695886f3495 24
p07gbar 0:3695886f3495 25 void readLast(int*output);
p07gbar 0:3695886f3495 26 int readLastS(int across);
p07gbar 0:3695886f3495 27
p07gbar 0:3695886f3495 28 void usedFirst();
p07gbar 0:3695886f3495 29 void usedLast();
p07gbar 0:3695886f3495 30
p07gbar 0:3695886f3495 31 int numberStored();
p07gbar 0:3695886f3495 32
p07gbar 0:3695886f3495 33 protected:
p07gbar 0:3695886f3495 34
p07gbar 0:3695886f3495 35 int16_t Buffer[RBLENGTH][RBWIDTH];
p07gbar 0:3695886f3495 36
p07gbar 0:3695886f3495 37 int Start;
p07gbar 0:3695886f3495 38 int Finish;
p07gbar 0:3695886f3495 39 int Samples;
p07gbar 0:3695886f3495 40
p07gbar 0:3695886f3495 41 void sortFinishNS();
p07gbar 0:3695886f3495 42 void sortStartUS();
p07gbar 0:3695886f3495 43 };
p07gbar 0:3695886f3495 44 #endif