refactor step 1 - BT

This commit is contained in:
philippe44
2019-06-28 23:08:46 -07:00
parent 0e3bc18748
commit 6c5ce6ba80
21 changed files with 452 additions and 1120 deletions

View File

@@ -352,13 +352,13 @@ void output_init_common(log_level level, const char *device, unsigned output_buf
buf_init(outputbuf, output_buf_size);
if (!outputbuf->buf) {
LOG_ERROR("unable to malloc output buffer");
local_exit(0);
exit(0);
}
silencebuf = malloc(MAX_SILENCE_FRAMES * BYTES_PER_FRAME);
if (!silencebuf) {
LOG_ERROR("unable to malloc silence buffer");
local_exit(0);
exit(0);
}
memset(silencebuf, 0, MAX_SILENCE_FRAMES * BYTES_PER_FRAME);
@@ -389,7 +389,7 @@ void output_init_common(log_level level, const char *device, unsigned output_buf
else {
if (!test_open(output.device, output.supported_rates, user_rates)) {
LOG_ERROR("unable to open output device: %s", output.device);
local_exit(0);
exit(0);
}
}