diff --git a/app/src/main/java/xdsopl/robot36/Decoder.java b/app/src/main/java/xdsopl/robot36/Decoder.java index 33808e3..a19519a 100644 --- a/app/src/main/java/xdsopl/robot36/Decoder.java +++ b/app/src/main/java/xdsopl/robot36/Decoder.java @@ -50,7 +50,7 @@ public class Decoder { private int currentScanLineSamples; private float lastFrequencyOffset; - Decoder(PixelBuffer scopeBuffer, PixelBuffer imageBuffer, int sampleRate) { + Decoder(PixelBuffer scopeBuffer, PixelBuffer imageBuffer, String rawName, int sampleRate) { this.scopeBuffer = scopeBuffer; this.imageBuffer = imageBuffer; imageBuffer.line = -1; @@ -94,7 +94,7 @@ public class Decoder { syncPulseToleranceSamples = (int) Math.round(syncPulseToleranceSeconds * sampleRate); double scanLineToleranceSeconds = 0.001; scanLineToleranceSamples = (int) Math.round(scanLineToleranceSeconds * sampleRate); - rawMode = new RawDecoder(sampleRate); + rawMode = new RawDecoder(rawName, sampleRate); Mode robot36 = new Robot_36_Color(sampleRate); currentMode = robot36; currentScanLineSamples = robot36.getScanLineSamples(); diff --git a/app/src/main/java/xdsopl/robot36/MainActivity.java b/app/src/main/java/xdsopl/robot36/MainActivity.java index 5bc0535..f97b38a 100644 --- a/app/src/main/java/xdsopl/robot36/MainActivity.java +++ b/app/src/main/java/xdsopl/robot36/MainActivity.java @@ -216,7 +216,7 @@ private void initAudioRecord() { audioRecord.setRecordPositionUpdateListener(recordListener); audioRecord.setPositionNotificationPeriod(frameCount); if (rateChanged) { - decoder = new Decoder(scopeBuffer, imageBuffer, recordRate); + decoder = new Decoder(scopeBuffer, imageBuffer, getString(R.string.raw_mode), recordRate); decoder.forceMode(forceMode); } startListening(); diff --git a/app/src/main/java/xdsopl/robot36/RawDecoder.java b/app/src/main/java/xdsopl/robot36/RawDecoder.java index a565275..f86a63d 100644 --- a/app/src/main/java/xdsopl/robot36/RawDecoder.java +++ b/app/src/main/java/xdsopl/robot36/RawDecoder.java @@ -10,8 +10,10 @@ public class RawDecoder implements Mode { private final ExponentialMovingAverage lowPassFilter; private final int smallPictureMaxSamples; private final int mediumPictureMaxSamples; + private final String name; - RawDecoder(int sampleRate) { + RawDecoder(String name, int sampleRate) { + this.name = name; smallPictureMaxSamples = (int) Math.round(0.125 * sampleRate); mediumPictureMaxSamples = (int) Math.round(0.175 * sampleRate); lowPassFilter = new ExponentialMovingAverage(); @@ -23,7 +25,7 @@ private float freqToLevel(float frequency, float offset) { @Override public String getName() { - return "Raw Mode"; + return name; } @Override diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index 444bf7c..edc11c0 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -3,6 +3,7 @@ Schirm Speichern Automatikmodus Modus Erzwingen + Rohmodus Aufnahme Läuft Audioeinstellungen Abtastrate diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml index 76424a2..aab6fab 100644 --- a/app/src/main/res/values-ru/strings.xml +++ b/app/src/main/res/values-ru/strings.xml @@ -3,6 +3,7 @@ Сохранить экран Автоматический режим Принудительный режим + необработанный режим Слушаю Настройки аудио Частота дискретизации diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 227a8fe..53b3f49 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -4,6 +4,7 @@ 保存图像 自动解码 强制指定解码模式 + 原始模式 监听中 音频设置 采样率 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index bb2805f..09f5f1e 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -4,12 +4,12 @@ Store Scope Auto Mode Force Mode - Robot Modes - PD Modes - Martin Modes - Scottie Modes - Wraase Modes - Raw Mode + Robot + PD + Martin + Scottie + Wraase + Raw Mode Robot 36 Color Robot 72 Color PD 50