| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
#ifndef H_COREAUDIOCOMMUNICATION |
| 14 |
#define H_COREAUDIOCOMMUNICATION |
| 15 |
|
| 16 |
#include <stdint.h> |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
const int32_t CommStatusIssued = 0; |
| 21 |
const int32_t CommStatusProcessing = 1; |
| 22 |
const int32_t CommStatusReady = 2; |
| 23 |
const int32_t CommStatusError = 3; |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
const int32_t CommCommandHello = 'HELO'; |
| 28 |
const int32_t CommCommandCodecs = 'CDCS'; |
| 29 |
const int32_t CommCommandSetup = 'STUP'; |
| 30 |
const int32_t CommCommandEncode = 'ENCD'; |
| 31 |
const int32_t CommCommandFinish = 'FNSH'; |
| 32 |
const int32_t CommCommandDuration = 'DURA'; |
| 33 |
const int32_t CommCommandQuit = 'QUIT'; |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
struct CoreAudioCommBuffer |
| 38 |
{ |
| 39 |
int32_t status; |
| 40 |
int32_t command; |
| 41 |
|
| 42 |
int32_t length; |
| 43 |
int32_t data[65536]; |
| 44 |
}; |
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
struct CoreAudioCommHello |
| 49 |
{ |
| 50 |
int32_t version; |
| 51 |
}; |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
struct CoreAudioCommCodecs |
| 56 |
{ |
| 57 |
uint32_t codecs[32]; |
| 58 |
int32_t bitrates[32][128]; |
| 59 |
}; |
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
struct CoreAudioCommSetup |
| 64 |
{ |
| 65 |
uint32_t codec; |
| 66 |
int32_t bitrate; |
| 67 |
int32_t format; |
| 68 |
|
| 69 |
int32_t channels; |
| 70 |
int32_t rate; |
| 71 |
int32_t bits; |
| 72 |
|
| 73 |
int8_t fp; |
| 74 |
int8_t sign; |
| 75 |
|
| 76 |
char file[32768]; |
| 77 |
}; |
| 78 |
|
| 79 |
#endif |