Wrote /root/JavaX-Caches/tmp_681087727/main.java - 10184 bytes (written=10184, should be 10184) javac=0, ecj=1, useJarBot=0 Checking ECJ at port 4898 at 127.0.0.1 /root/jdk-17/bin/javac -source 11 -target 11 -nowarn -encoding utf8 -Xdiags:verbose -cp /root/.javax/x30.jar:/root/dexcompiler/android.jar:/root/dexcompiler/support-v4-22.2.1.jar:/root/javafx/javafx.base.jar:/root/javafx/javafx.graphics.jar:/root/javafx/javafx.swing.jar -d /root/JavaX-Caches/tmp_787578158 /root/JavaX-Caches/tmp_681087727/main.java 2>&1
[Compilation Error]

Compiler errors. Medium transpile. Show Java sources. Show snippet. Edit.

/root/JavaX-Caches/tmp_681087727/main.java:3: error: class, interface, or enum expected public static final int SAMPLE_RATE = 16000; ^ /root/JavaX-Caches/tmp_681087727/main.java:5: error: class, interface, or enum expected private AudioRecord mRecorder; ^ /root/JavaX-Caches/tmp_681087727/main.java:6: error: class, interface, or enum expected private File mRecording; ^ /root/JavaX-Caches/tmp_681087727/main.java:7: error: class, interface, or enum expected private short[] mBuffer; ^ /root/JavaX-Caches/tmp_681087727/main.java:8: error: class, interface, or enum expected private boolean mIsRecording = false; ^ /root/JavaX-Caches/tmp_681087727/main.java:9: error: class, interface, or enum expected float iGain = 1.0f; ^ /root/JavaX-Caches/tmp_681087727/main.java:10: error: class, interface, or enum expected CheckBox gain; ^ /root/JavaX-Caches/tmp_681087727/main.java:11: error: class, interface, or enum expected Button showPref; ^ /root/JavaX-Caches/tmp_681087727/main.java:12: error: class, interface, or enum expected OnBluetoothRecording bluetoothRecording; ^ /root/JavaX-Caches/tmp_681087727/main.java:13: error: class, interface, or enum expected protected int bitsPerSamples = 16; ^ /root/JavaX-Caches/tmp_681087727/main.java:15: error: class, interface, or enum expected p { ^ /root/JavaX-Caches/tmp_681087727/main.java:18: error: class, interface, or enum expected Button bluetooth = (Button)findViewById(R.id.blue); ^ /root/JavaX-Caches/tmp_681087727/main.java:20: error: class, interface, or enum expected showPref.setOnClickListener(new OnClickListener() { ^ /root/JavaX-Caches/tmp_681087727/main.java:23: error: class, interface, or enum expected public void onClick(View v) { ^ /root/JavaX-Caches/tmp_681087727/main.java:24: error: <identifier> expected startActivity(new Intent(getApplicationContext(),BluetoothPreferenceActivity.class)); ^ /root/JavaX-Caches/tmp_681087727/main.java:25: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:28: error: class, interface, or enum expected final Button button = (Button) findViewById(R.id.start); ^ /root/JavaX-Caches/tmp_681087727/main.java:29: error: class, interface, or enum expected button.setText(startRecordingLabel); ^ /root/JavaX-Caches/tmp_681087727/main.java:30: error: class, interface, or enum expected bluetooth.setOnClickListener(new OnClickListener() { ^ /root/JavaX-Caches/tmp_681087727/main.java:33: error: class, interface, or enum expected public void onClick(View v) { ^ /root/JavaX-Caches/tmp_681087727/main.java:36: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:38: error: class, interface, or enum expected gain.setOnCheckedChangeListener(new OnCheckedChangeListener() { ^ /root/JavaX-Caches/tmp_681087727/main.java:41: error: class, interface, or enum expected public void onCheckedChanged(CompoundButton buttonView, ^ /root/JavaX-Caches/tmp_681087727/main.java:46: error: class, interface, or enum expected } else { ^ /root/JavaX-Caches/tmp_681087727/main.java:48: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:52: error: class, interface, or enum expected button.setOnClickListener(new OnClickListener() { ^ /root/JavaX-Caches/tmp_681087727/main.java:54: error: class, interface, or enum expected public void onClick(final View v) { ^ /root/JavaX-Caches/tmp_681087727/main.java:54: error: class, interface, or enum expected public void onClick(final View v) { ^ /root/JavaX-Caches/tmp_681087727/main.java:58: error: class, interface, or enum expected public void onStartRecording(boolean state, boolean bluetoothFlag) { ^ /root/JavaX-Caches/tmp_681087727/main.java:61: error: class, interface, or enum expected if (!mIsRecording) { ^ /root/JavaX-Caches/tmp_681087727/main.java:63: error: class, interface, or enum expected mIsRecording = true; ^ /root/JavaX-Caches/tmp_681087727/main.java:64: error: class, interface, or enum expected mRecorder.startRecording(); ^ /root/JavaX-Caches/tmp_681087727/main.java:65: error: class, interface, or enum expected mRecording = getFile("raw"); ^ /root/JavaX-Caches/tmp_681087727/main.java:66: error: class, interface, or enum expected startBufferedWrite(mRecording); ^ /root/JavaX-Caches/tmp_681087727/main.java:67: error: class, interface, or enum expected } else { ^ /root/JavaX-Caches/tmp_681087727/main.java:69: error: class, interface, or enum expected mIsRecording = false; ^ /root/JavaX-Caches/tmp_681087727/main.java:70: error: class, interface, or enum expected mRecorder.stop(); ^ /root/JavaX-Caches/tmp_681087727/main.java:71: error: class, interface, or enum expected File waveFile = getFile("wav"); ^ /root/JavaX-Caches/tmp_681087727/main.java:72: error: class, interface, or enum expected try { ^ /root/JavaX-Caches/tmp_681087727/main.java:74: error: class, interface, or enum expected } catch (IOException e) { ^ /root/JavaX-Caches/tmp_681087727/main.java:77: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:81: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:85: error: class, interface, or enum expected public void onCancelRecording() { ^ /root/JavaX-Caches/tmp_681087727/main.java:88: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:90: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:94: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:99: error: class, interface, or enum expected mBuffer = new short[bufferSize]; ^ /root/JavaX-Caches/tmp_681087727/main.java:100: error: class, interface, or enum expected mRecorder = new AudioRecord(MediaRecorder.AudioSource.MIC, SAMPLE_RATE, ^ /root/JavaX-Caches/tmp_681087727/main.java:103: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:105: error: class, interface, or enum expected private void startBufferedWrite(final File file) { ^ /root/JavaX-Caches/tmp_681087727/main.java:108: error: class, interface, or enum expected public void run() { ^ /root/JavaX-Caches/tmp_681087727/main.java:110: error: class, interface, or enum expected try { ^ /root/JavaX-Caches/tmp_681087727/main.java:113: error: class, interface, or enum expected while (mIsRecording) { ^ /root/JavaX-Caches/tmp_681087727/main.java:116: error: class, interface, or enum expected int readSize = mRecorder.read(mBuffer, 0, ^ /root/JavaX-Caches/tmp_681087727/main.java:119: error: class, interface, or enum expected final int bytesPerSample = bitsPerSamples / 8; ^ /root/JavaX-Caches/tmp_681087727/main.java:120: error: class, interface, or enum expected final int emptySpace = 64 - bitsPerSamples; ^ /root/JavaX-Caches/tmp_681087727/main.java:121: error: class, interface, or enum expected int byteIndex = 0; ^ /root/JavaX-Caches/tmp_681087727/main.java:122: error: class, interface, or enum expected int byteIndex2 = 0; ^ /root/JavaX-Caches/tmp_681087727/main.java:123: error: class, interface, or enum expected int temp = 0; ^ /root/JavaX-Caches/tmp_681087727/main.java:124: error: class, interface, or enum expected int mLeftTemp = 0; ^ /root/JavaX-Caches/tmp_681087727/main.java:125: error: class, interface, or enum expected int mRightTemp = 0; ^ /root/JavaX-Caches/tmp_681087727/main.java:126: error: class, interface, or enum expected int a = 0; ^ /root/JavaX-Caches/tmp_681087727/main.java:127: error: class, interface, or enum expected int x = 0; ^ /root/JavaX-Caches/tmp_681087727/main.java:129: error: class, interface, or enum expected for (int frameIndex = 0; frameIndex < readSize; frameIndex++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:129: error: class, interface, or enum expected for (int frameIndex = 0; frameIndex < readSize; frameIndex++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:129: error: class, interface, or enum expected for (int frameIndex = 0; frameIndex < readSize; frameIndex++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:131: error: class, interface, or enum expected for (int c = 0; c < 1; c++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:131: error: class, interface, or enum expected for (int c = 0; c < 1; c++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:136: error: class, interface, or enum expected for (int b = 0; b < bytesPerSample; b++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:136: error: class, interface, or enum expected for (int b = 0; b < bytesPerSample; b++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:136: error: class, interface, or enum expected for (int b = 0; b < bytesPerSample; b++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:139: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:143: error: class, interface, or enum expected sample *= iGain; ^ /root/JavaX-Caches/tmp_681087727/main.java:146: error: class, interface, or enum expected int intValue = (int) ((double) sample * (double) Integer.MAX_VALUE); ^ /root/JavaX-Caches/tmp_681087727/main.java:148: error: class, interface, or enum expected for (int i = 0; i < bytesPerSample; i++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:148: error: class, interface, or enum expected for (int i = 0; i < bytesPerSample; i++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:148: error: class, interface, or enum expected for (int i = 0; i < bytesPerSample; i++) { ^ /root/JavaX-Caches/tmp_681087727/main.java:150: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:153: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:159: error: class, interface, or enum expected } else if (mBuffer[frameIndex] < -32767) { ^ /root/JavaX-Caches/tmp_681087727/main.java:161: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:164: error: class, interface, or enum expected sum += mBuffer[frameIndex] * mBuffer[frameIndex]; ^ /root/JavaX-Caches/tmp_681087727/main.java:165: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:168: error: class, interface, or enum expected final double amplitude = sum / readSize; ^ /root/JavaX-Caches/tmp_681087727/main.java:169: error: class, interface, or enum expected mProgressBar.setProgress((int) Math.sqrt(amplitude)); ^ /root/JavaX-Caches/tmp_681087727/main.java:170: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:175: error: class, interface, or enum expected } finally { ^ /root/JavaX-Caches/tmp_681087727/main.java:177: error: class, interface, or enum expected if (output != null) { ^ /root/JavaX-Caches/tmp_681087727/main.java:180: error: class, interface, or enum expected } catch (IOException e) { ^ /root/JavaX-Caches/tmp_681087727/main.java:183: error: class, interface, or enum expected } finally { ^ /root/JavaX-Caches/tmp_681087727/main.java:186: error: class, interface, or enum expected } catch (IOException e) { ^ /root/JavaX-Caches/tmp_681087727/main.java:189: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:195: error: class, interface, or enum expected } ^ /root/JavaX-Caches/tmp_681087727/main.java:197: error: class, interface, or enum expected private void rawToWave(final File rawFile, final File waveFile) ^ /root/JavaX-Caches/tmp_681087727/main.java:197: error: class, interface, or enum expected private void rawToWave(final File rawFile, final File waveFile) ^ /root/JavaX-Caches/tmp_681087727/main.java:201: error: class, interface, or enum expected DataInputStream input = null; ^ /root/JavaX-Caches/tmp_681087727/main.java:202: error: class, interface, or enum expected try { ^ /root/JavaX-Caches/tmp_681087727/main.java:205: error: class, interface, or enum expected input.read(rawData); ^ /root/JavaX-Caches/tmp_681087727/main.java:206: error: class, interface, or enum expected } finally { ^ /root/JavaX-Caches/tmp_681087727/main.java:209: error: class, interface, or enum expected } ^ 100 errors only showing the first 100 errors, of 140 total; use -Xmaxerrs if you would like to see more