#include #define ALSA_PCM_NEW_HW_PARAMS_API 1 #include class PAudioDelay : public PObject { PCLASSINFO(PAudioDelay, PObject); public: PAudioDelay(); BOOL Delay(int time); void Restart(); int GetError(); protected: PTime previousTime; BOOL firstTime; int error; }; #define MIN_HEADROOM 30 #define MAX_HEADROOM 60 class SoundHandleEntry : public PObject { PCLASSINFO(SoundHandleEntry, PObject) public: SoundHandleEntry(); int handle; int direction; unsigned numChannels; unsigned sampleRate; unsigned bitsPerSample; unsigned fragmentValue; BOOL isInitialised; }; #define LOOPBACK_BUFFER_SIZE 5000 #define BYTESINBUF ((startptr