MBED implementation of JAudioStream
Diff: JAudioStream.h
- Revision:
- 8:65d8e8882907
- Parent:
- 6:7e366261cd93
--- a/JAudioStream.h Wed Aug 19 15:38:05 2015 +0000 +++ b/JAudioStream.h Thu Aug 20 07:17:51 2015 +0000 @@ -19,6 +19,10 @@ const char* begn; const char* comt; const char* hrbt; + typedef void (*OnStream)(char*); + void (*streamCallback) (char*); + int bufferSize; + int requestCount; EthernetInterface eth; UDPSocket socket; Endpoint endPoint; @@ -30,16 +34,16 @@ void buildMeassge(const char*, int, char*, char*); void intTocharArr(int, char*); void send(char*, int); + void request(char); + bool read(char*, int); char* nowPlaying; public: - JAudioStream(); - bool connect(char *, short, char *); - bool read(char*, int); + JAudioStream(OnStream, int); + bool connect(char *, int, char *); bool isConnected(); char* getNowPlaying(); - void request(char); void disconnect(); - void receive(); + int loop(); }; #endif \ No newline at end of file