@@ -92,7 +92,7 @@ private static void scrcpy(Options options) throws IOException, ConfigurationExc
92
92
}
93
93
94
94
Controller controller = null ;
95
- AudioEncoder audioEncoder = null ;
95
+ AudioRecorder audioRecorder = null ;
96
96
97
97
try (DesktopConnection connection = DesktopConnection .open (scid , tunnelForward , audio , control , sendDummyByte )) {
98
98
if (options .getSendDeviceMeta ()) {
@@ -111,8 +111,8 @@ private static void scrcpy(Options options) throws IOException, ConfigurationExc
111
111
if (audio ) {
112
112
Streamer audioStreamer = new Streamer (connection .getAudioFd (), options .getAudioCodec (), options .getSendCodecId (),
113
113
options .getSendFrameMeta ());
114
- audioEncoder = new AudioEncoder (audioStreamer , options .getAudioBitRate (), options .getAudioCodecOptions (), options .getAudioEncoder ());
115
- audioEncoder .start ();
114
+ audioRecorder = new AudioEncoder (audioStreamer , options .getAudioBitRate (), options .getAudioCodecOptions (), options .getAudioEncoder ());
115
+ audioRecorder .start ();
116
116
}
117
117
118
118
Streamer videoStreamer = new Streamer (connection .getVideoFd (), options .getVideoCodec (), options .getSendCodecId (),
@@ -131,17 +131,17 @@ private static void scrcpy(Options options) throws IOException, ConfigurationExc
131
131
} finally {
132
132
Ln .d ("Screen streaming stopped" );
133
133
initThread .interrupt ();
134
- if (audioEncoder != null ) {
135
- audioEncoder .stop ();
134
+ if (audioRecorder != null ) {
135
+ audioRecorder .stop ();
136
136
}
137
137
if (controller != null ) {
138
138
controller .stop ();
139
139
}
140
140
141
141
try {
142
142
initThread .join ();
143
- if (audioEncoder != null ) {
144
- audioEncoder .join ();
143
+ if (audioRecorder != null ) {
144
+ audioRecorder .join ();
145
145
}
146
146
if (controller != null ) {
147
147
controller .join ();
0 commit comments