Phase 13: protect recordings and recover retained audio after write failures
This commit is contained in:
parent
05140c2e93
commit
01d9db90fd
15 changed files with 308 additions and 30 deletions
|
|
@ -115,7 +115,7 @@ int main(void)
|
|||
float samples[128];
|
||||
for (i = 0; i < 128; ++i)
|
||||
samples[i] = 0.25f;
|
||||
assert(xtc_recorder_create(wave, 48000, 256, &recorder) == XTC_OK);
|
||||
assert(xtc_recorder_create_replace(wave, 48000, 256, 1, &recorder) == XTC_OK);
|
||||
xtc_recorder_push(recorder, samples, 128);
|
||||
assert(xtc_recorder_finish(recorder) == XTC_OK);
|
||||
xtc_recorder_destroy(recorder);
|
||||
|
|
@ -125,7 +125,7 @@ int main(void)
|
|||
assert(child >= 0);
|
||||
if (!child) {
|
||||
close(pipefd[0]);
|
||||
if (xtc_recorder_create(wave, 48000, 256, &recorder) != XTC_OK)
|
||||
if (xtc_recorder_create_replace(wave, 48000, 256, 1, &recorder) != XTC_OK)
|
||||
_exit(6);
|
||||
xtc_recorder_push(recorder, samples, 128);
|
||||
if (xtc_recorder_drain(recorder) != XTC_OK)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue