| 33 |
|
|
| 34 |
struct { |
struct { |
| 35 |
int buffer_frames; |
int buffer_frames; |
| 36 |
|
int nbuffers; |
| 37 |
int isAtexit; |
int isAtexit; |
| 38 |
} conf = { |
} conf = { |
| 39 |
.buffer_frames = 512, |
.buffer_frames = 512, |
| 40 |
|
.nbuffers = 4, |
| 41 |
.isAtexit = 0 |
.isAtexit = 0 |
| 42 |
}; |
}; |
| 43 |
|
|
| 395 |
"Could not get device buffer frame size\n"); |
"Could not get device buffer frame size\n"); |
| 396 |
return -1; |
return -1; |
| 397 |
} |
} |
| 398 |
hw->samples = 4 * core->audioDevicePropertyBufferFrameSize; |
hw->samples = conf.nbuffers * core->audioDevicePropertyBufferFrameSize; |
| 399 |
|
|
| 400 |
/* get StreamFormat */ |
/* get StreamFormat */ |
| 401 |
propertySize = sizeof(core->outputStreamBasicDescription); |
propertySize = sizeof(core->outputStreamBasicDescription); |
| 529 |
static struct audio_option coreaudio_options[] = { |
static struct audio_option coreaudio_options[] = { |
| 530 |
{"BUFFER_SIZE", AUD_OPT_INT, &conf.buffer_frames, |
{"BUFFER_SIZE", AUD_OPT_INT, &conf.buffer_frames, |
| 531 |
"Size of the buffer in frames", NULL, 0}, |
"Size of the buffer in frames", NULL, 0}, |
| 532 |
|
{"BUFFER_COUNT", AUD_OPT_INT, &conf.nbuffers, |
| 533 |
|
"Number of buffers", NULL, 0}, |
| 534 |
{NULL, 0, NULL, NULL, NULL, 0} |
{NULL, 0, NULL, NULL, NULL, 0} |
| 535 |
}; |
}; |
| 536 |
|
|