Skip to content

Commit

Permalink
perf: 🔊 Add audio-output-buffer option
Browse files Browse the repository at this point in the history
  • Loading branch information
viarotel committed Nov 1, 2023
1 parent 23ec617 commit c210140
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 27 deletions.
14 changes: 8 additions & 6 deletions src/locales/languages/en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,10 @@
"preferences.video.screen-cropping.placeholder": "Default no crop, format is 1224:1440:0:0",
"preferences.video.multi-display.name": "Display",
"preferences.video.multi-display.placeholder": "Default 0 (main display)",
"preferences.video.video-buffering.name": "Video Buffering",
"preferences.video.video-buffering.placeholder": "Default 0ms",
"preferences.video.audio-buffering.name": "Audio Buffering",
"preferences.video.audio-buffering.placeholder": "Default 0ms",
"preferences.video.receiver-buffering.name": "Receiver Buffering (v412)",
"preferences.video.receiver-buffering.placeholder": "Default 0ms",
"preferences.video.video-buffer.name": "Video Buffer",
"preferences.video.video-buffer.placeholder": "Default 0ms",
"preferences.video.receiver-buffer.name": "Receiver Buffer (v412)",
"preferences.video.receiver-buffer.placeholder": "Default 0ms",
"preferences.video.disable.name": "Disable Video",
"preferences.video.disable.placeholder": "Disable video stream",
"preferences.device.name": "Device",
Expand Down Expand Up @@ -183,6 +181,10 @@
"preferences.record.format.name": "Format",
"preferences.record.format.placeholder": "Default *.mp4",
"preferences.audio.name": "Audio",
"preferences.audio.audio-buffer.name": "Audio Buffer",
"preferences.audio.audio-buffer.placeholder": "Default 0ms",
"preferences.audio.audio-output-buffer.name": "Audio Output Buffer",
"preferences.audio.audio-output-buffer.placeholder": "Default 5ms",
"preferences.audio.disable.name": "Disable Audio",
"preferences.audio.disable.placeholder": "Disable audio stream",
"about.name": "About",
Expand Down
14 changes: 8 additions & 6 deletions src/locales/languages/zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,10 @@
"preferences.video.screen-cropping.placeholder": "默认不裁剪,格式为 1224:1440:0:0",
"preferences.video.multi-display.name": "多显示器",
"preferences.video.multi-display.placeholder": "默认值为 0(主屏幕)",
"preferences.video.video-buffering.name": "视频缓冲",
"preferences.video.video-buffering.placeholder": "默认值为 0ms",
"preferences.video.audio-buffering.name": "音频缓冲",
"preferences.video.audio-buffering.placeholder": "默认值为 0ms",
"preferences.video.receiver-buffering.name": "接收器缓冲(v412)",
"preferences.video.receiver-buffering.placeholder": "默认值为 0ms",
"preferences.video.video-buffer.name": "视频缓冲",
"preferences.video.video-buffer.placeholder": "默认值为 0ms",
"preferences.video.receiver-buffer.name": "接收器缓冲(v412)",
"preferences.video.receiver-buffer.placeholder": "默认值为 0ms",
"preferences.video.disable.name": "禁用视频",
"preferences.video.disable.placeholder": "开启后将禁用视频",
"preferences.device.name": "设备控制",
Expand Down Expand Up @@ -183,6 +181,10 @@
"preferences.record.format.name": "录制视频格式",
"preferences.record.format.placeholder": "默认为 *.mp4 格式",
"preferences.audio.name": "音频控制",
"preferences.audio.audio-buffer.name": "音频缓冲",
"preferences.audio.audio-buffer.placeholder": "默认值为 0ms",
"preferences.audio.audio-output-buffer.name": "音频输出缓冲",
"preferences.audio.audio-output-buffer.placeholder": "默认值为 5ms",
"preferences.audio.disable.name": "禁用音频",
"preferences.audio.disable.placeholder": "开启后将禁用音频功能",
"about.name": "关于",
Expand Down
18 changes: 14 additions & 4 deletions src/store/preference/model/audio/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,21 @@ export default {
field: 'scrcpy',

children: {
audioBuffer: {
label: 'preferences.audio.audio-buffer.name',
field: '--audio-buffer',
type: 'Input.number',
value: '',
placeholder: 'preferences.audio.audio-buffer.placeholder',
},
audioOutputBuffer: {
label: 'preferences.audio.audio-output-buffer.name',
field: '--audio-output-buffer',
type: 'Input.number',
value: '',
placeholder: 'preferences.audio.audio-output-buffer.placeholder',
},
noAudio: {
// "[server] INFO: List of audio encoders:"
// "--audio-codec=opus --audio-encoder='c2.android.opus.encoder'"
// "--audio-codec=aac --audio-encoder='c2.android.aac.encoder'"
// "--audio-codec=aac --audio-encoder='OMX.google.aac.encoder'"
label: 'preferences.audio.disable.name',
field: '--no-audio',
type: 'Switch',
Expand Down
15 changes: 4 additions & 11 deletions src/store/preference/model/video/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,25 +117,18 @@ export default {
},
},
displayBuffer: {
label: 'preferences.video.video-buffering.name',
label: 'preferences.video.video-buffer.name',
field: '--display-buffer',
type: 'Input.number',
value: '',
placeholder: 'preferences.video.video-buffering.placeholder',
},
audioBuffer: {
label: 'preferences.video.audio-buffering.name',
field: '--audio-buffer',
type: 'Input.number',
value: '',
placeholder: 'preferences.video.audio-buffering.placeholder',
placeholder: 'preferences.video.video-buffer.placeholder',
},
v4l2Buffer: {
label: 'preferences.video.receiver-buffering.name',
label: 'preferences.video.receiver-buffer.name',
field: '--v4l2-buffer',
type: 'Input.number',
value: '',
placeholder: 'preferences.video.receiver-buffering.placeholder',
placeholder: 'preferences.video.receiver-buffer.placeholder',
},
noVideo: {
label: 'preferences.video.disable.name',
Expand Down

0 comments on commit c210140

Please sign in to comment.