scrcpy/app/src/util
Romain Vimont cfa4f7e2f2 Replace locks by atomics in audio player
The audio output thread only reads samples from the buffer, and most of
the time, the audio receiver thread only writes samples to the buffer.
In these cases, using atomics avoids lock contention.

There are still corner cases where the audio receiver thread needs to
"read" samples (and drop them), so lock only in these cases.

PR #4572 <https://github.com/Genymobile/scrcpy/pull/4572>
2024-02-17 16:01:33 +01:00
..
acksync.c Add acksync helper to wait for acks 2021-11-23 21:15:05 +01:00
acksync.h Wait SET_CLIPBOARD ack before Ctrl+v via HID 2021-11-24 09:41:21 +01:00
audiobuf.c Replace locks by atomics in audio player 2024-02-17 16:01:33 +01:00
audiobuf.h Replace locks by atomics in audio player 2024-02-17 16:01:33 +01:00
average.c Add audio player 2023-03-10 22:22:15 +01:00
average.h Add audio player 2023-03-10 22:22:15 +01:00
binary.h Add conversion from float to fixed-point i16 2022-08-28 15:23:08 +02:00
file.c Add OutOfMemory log helper 2021-11-24 22:06:49 +01:00
file.h Improve file API 2021-11-12 22:44:37 +01:00
intmap.c Use static maps to convert input events 2021-11-29 21:15:07 +01:00
intmap.h Use static maps to convert input events 2021-11-29 21:15:07 +01:00
intr.c Add OutOfMemory log helper 2021-11-24 22:06:49 +01:00
intr.h Rename SC_INVALID_SOCKET to SC_SOCKET_NONE 2021-11-14 01:22:22 +01:00
log.c Use void for empty function parameter list 2023-10-23 15:07:24 +02:00
log.h Use void for empty function parameter list 2023-10-23 15:07:24 +02:00
memory.c Add sc_allocarray() util 2023-03-10 22:22:15 +01:00
memory.h Add sc_allocarray() util 2023-03-10 22:22:15 +01:00
net.c Accept Windows Sockets from version 1.1 2023-02-27 20:51:54 +01:00
net.h Rename net_listen() parameter 2022-08-17 16:40:45 +02:00
net_intr.c Rename net_listen() parameter 2022-08-17 16:40:45 +02:00
net_intr.h Rename net_listen() parameter 2022-08-17 16:40:45 +02:00
process.c Rename scrcpy threads 2021-12-09 21:32:11 +01:00
process.h Move SC_PRIsizet to compat.h 2022-02-09 09:53:19 +01:00
process_intr.c Make intr optional for adb commands 2022-02-20 17:39:36 +01:00
process_intr.h Check process success locally for adb commands 2021-11-25 22:22:34 +01:00
rand.c Add random util 2023-01-27 19:26:19 +01:00
rand.h Add random util 2023-01-27 19:26:19 +01:00
str.c Remove confusing sc_str_truncate() 2022-02-06 14:39:51 +01:00
str.h Use current adb port (if any) for --tcpip 2022-12-02 19:09:53 +01:00
strbuf.c Add OutOfMemory log helper 2021-11-24 22:06:49 +01:00
strbuf.h Add string buffer util 2021-11-11 14:55:52 +01:00
term.c Add util function to get terminal size 2021-11-11 15:22:39 +01:00
term.h Add util function to get terminal size 2021-11-11 15:22:39 +01:00
thread.c Add thread priority API 2023-03-10 22:22:16 +01:00
thread.h Add thread priority API 2023-03-10 22:22:16 +01:00
tick.c Use timers with microsecond precision 2021-12-08 23:45:45 +01:00
tick.h Use timers with microsecond precision 2021-12-08 23:45:45 +01:00
timeout.c Add --time-limit 2023-06-10 16:04:51 +02:00
timeout.h Add --time-limit 2023-06-10 16:04:51 +02:00
vecdeque.h Use char * for pointer arithmetic 2023-10-24 23:12:36 +02:00
vector.h Use reallocarray() in sc_vector 2023-03-10 22:22:15 +01:00