scrcpy/app/src
Romain Vimont b7d2086508 Add audio player
Play the decoded audio using SDL.

The audio player frame sink receives the audio frames, resample them
and write them to a byte buffer (introduced by this commit).

On SDL audio callback (from an internal SDL thread), copy samples from
this byte buffer to the SDL audio buffer.

The byte buffer is protected by the SDL_AudioDeviceLock(), but it has
been designed so that the producer and the consumer may write and read
in parallel, provided that they don't access the same slices of the
ring-buffer buffer.

Co-authored-by: Simon Chan <1330321+yume-chan@users.noreply.github.com>
2023-02-26 22:41:07 +01:00
..
adb Use random name for device socket 2023-01-27 21:51:59 +01:00
android Fix typos 2021-04-18 14:36:31 +02:00
sys Use /dev/null instead of closing fds 2022-09-25 15:42:33 +02:00
trait Pass AVCodecContext to frame sinks 2023-02-26 22:41:07 +01:00
usb Prefix UI events constants by SC_ 2023-02-10 18:55:43 +01:00
util Add two-step write feature to bytebuf 2023-02-26 22:41:07 +01:00
audio_player.c Add audio player 2023-02-26 22:41:07 +01:00
audio_player.h Add audio player 2023-02-26 22:41:07 +01:00
cli.c Add --list-device-displays 2023-02-26 22:41:07 +01:00
cli.h Move scrcpy option structs to options.h 2021-10-27 18:43:47 +02:00
clock.c Replace '%g' by '%f' as printf format 2022-08-03 23:25:09 +02:00
clock.h Fix typo in clock comments 2021-10-29 12:21:34 +02:00
common.h Add missing SC_ prefix to header guards 2022-04-12 23:59:01 +02:00
compat.c Add jrand48()/nrand48() compat functions 2023-01-26 18:11:23 +01:00
compat.h Add jrand48()/nrand48() compat functions 2023-01-26 18:11:23 +01:00
control_msg.c Forward action button to device 2023-01-30 20:57:54 +01:00
control_msg.h Forward action button to device 2023-01-30 20:57:54 +01:00
controller.c Prefix receiver by sc_ 2023-02-18 09:37:31 +01:00
controller.h Prefix receiver by sc_ 2023-02-18 09:37:31 +01:00
coords.h Use sc_ prefix for size, position and point 2021-10-30 15:20:39 +02:00
decoder.c Add audio player 2023-02-26 22:41:07 +01:00
decoder.h Give a name to decoder instances 2023-02-26 22:41:07 +01:00
demuxer.c Quit on audio configuration failure 2023-02-26 22:41:07 +01:00
demuxer.h Give a name to demuxer instances 2023-02-26 22:41:07 +01:00
device_msg.c Rename buffer_util.h to binary.h 2022-08-28 15:23:08 +02:00
device_msg.h Add missing SC_ prefix to header guards 2022-04-12 23:59:01 +02:00
events.h Report recorder errors 2023-02-26 22:41:06 +01:00
file_pusher.c Remove LOGC() 2022-02-09 09:52:15 +01:00
file_pusher.h Move ADB code to adb/ 2022-02-04 08:39:10 +01:00
fps_counter.c Move FPS counter start/stop logs 2022-02-18 18:16:12 +01:00
fps_counter.h Add missing SC_ prefix to header guards 2022-04-12 23:59:01 +02:00
frame_buffer.c Fix code style 2022-01-27 19:02:07 +01:00
frame_buffer.h Extract current video_buffer to frame_buffer 2021-07-14 14:22:32 +02:00
icon.c Fix build with ffmpeg 5.0 2022-01-16 17:37:28 +01:00
icon.h Add missing SC_ prefix to header guards 2022-04-12 23:59:01 +02:00
input_events.h Force mouse source when --forward-all-clicks 2022-12-22 11:26:26 +01:00
input_manager.c Forward action button to device 2023-01-30 20:57:54 +01:00
input_manager.h Add missing SC_ prefix to header guards 2022-04-12 23:59:01 +02:00
keyboard_inject.c Use sc_ prefix for control_msg enums 2022-01-27 16:47:51 +01:00
keyboard_inject.h Use sc_ prefix for controller 2022-01-14 22:17:30 +01:00
main.c Move FFmpeg callback initialization 2023-02-26 22:41:06 +01:00
mouse_inject.c Forward action button to device 2023-01-30 20:57:54 +01:00
mouse_inject.h Use sc_ prefix for controller 2022-01-14 22:17:30 +01:00
opengl.c Fix OpenGL ES prefix skip 2022-03-30 12:01:01 +02:00
opengl.h Define feature test macros in common.h 2021-01-17 14:08:48 +01:00
options.c Add --list-device-displays 2023-02-26 22:41:07 +01:00
options.h Add --list-device-displays 2023-02-26 22:41:07 +01:00
packet_merger.c Extract packet merging 2023-02-11 09:44:33 +01:00
packet_merger.h Extract packet merging 2023-02-11 09:44:33 +01:00
receiver.c Prefix receiver by sc_ 2023-02-18 09:37:31 +01:00
receiver.h Prefix receiver by sc_ 2023-02-18 09:37:31 +01:00
recorder.c Record at least video packets on stop 2023-02-26 22:41:07 +01:00
recorder.h Disable audio on initialization error 2023-02-26 22:41:07 +01:00
scrcpy.c Add audio player 2023-02-26 22:41:07 +01:00
scrcpy.h Add specific exit code for device disconnection 2022-03-06 22:19:46 +01:00
screen.c Pass AVCodecContext to frame sinks 2023-02-26 22:41:07 +01:00
screen.h Add --print-fps to enable FPS counter on start 2022-02-18 18:16:50 +01:00
server.c Add --list-device-displays 2023-02-26 22:41:07 +01:00
server.h Add --list-device-displays 2023-02-26 22:41:07 +01:00
v4l2_sink.c Pass AVCodecContext to frame sinks 2023-02-26 22:41:07 +01:00
v4l2_sink.h Fix build with ffmpeg 5.0 2022-01-16 17:37:28 +01:00
version.c Print libusb version on --version 2022-02-09 10:15:19 +01:00
version.h Move version handling to a separate file 2022-02-09 10:15:07 +01:00
video_buffer.c Rename scrcpy threads 2021-12-09 21:32:11 +01:00
video_buffer.h Add buffering debugging tools 2021-07-14 14:54:22 +02:00