Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 38e905b3 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Refactor code related to I/O handles to reduce chance for leaks

The AudioRecord input handle code was refactored earlier
to fix a potential handle leak, and to simplify the code:
    > Change-Id: I124dce344b1d11c2dd66ca5e2c9aec0c52c230e2

This changelist refactors AudioTrack similarly,
and adds further cleanup of both AudioTrack and AudioRecord.

We attempt to implement the rules for referencing counting I/O handles,
but there is still the possibility of a handle leak if the client process
dies after allocating the handle reference but before releasing it.
That issue is being tracked separately.

Details:
 - AudioSystem::getOutput() is now called within createTrack_l
 - restoreTrack_l was missing offload info
   now it has the info available,
   but is not yet being called for offloaded tracks
 - AudioTrack::getOutput() is now const
 - Remove getOutput_l()

Change-Id: I44a0a623d24fc5847bcac0939c276400568adbca
parent f0002d14
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment