removed "Modes" word and translated "Raw Mode"

This commit is contained in:
Ahmet Inan 2024-05-18 07:34:33 +02:00
parent d5b72b75f6
commit 0eec2c501b
7 changed files with 16 additions and 11 deletions

View file

@ -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();

View file

@ -216,7 +216,7 @@ public class MainActivity extends AppCompatActivity {
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();

View file

@ -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 @@ public class RawDecoder implements Mode {
@Override
public String getName() {
return "Raw Mode";
return name;
}
@Override

View file

@ -3,6 +3,7 @@
<string name="store_scope">Schirm Speichern</string>
<string name="auto_mode">Automatikmodus</string>
<string name="force_mode">Modus Erzwingen</string>
<string name="raw_mode">Rohmodus</string>
<string name="listening">Aufnahme Läuft</string>
<string name="audio_settings">Audioeinstellungen</string>
<string name="sample_rate">Abtastrate</string>

View file

@ -3,6 +3,7 @@
<string name="store_scope">Сохранить экран</string>
<string name="auto_mode">Автоматический режим</string>
<string name="force_mode">Принудительный режим</string>
<string name="raw_mode">необработанный режим</string>
<string name="listening">Слушаю</string>
<string name="audio_settings">Настройки аудио</string>
<string name="sample_rate">Частота дискретизации</string>

View file

@ -4,6 +4,7 @@
<string name="store_scope">保存图像</string>
<string name="auto_mode">自动解码</string>
<string name="force_mode">强制指定解码模式</string>
<string name="raw_mode">原始模式</string>
<string name="listening">监听中</string>
<string name="audio_settings">音频设置</string>
<string name="sample_rate">采样率</string>

View file

@ -4,12 +4,12 @@
<string name="store_scope">Store Scope</string>
<string name="auto_mode">Auto Mode</string>
<string name="force_mode">Force Mode</string>
<string name="robot_modes" translatable="false">Robot Modes</string>
<string name="pd_modes" translatable="false">PD Modes</string>
<string name="martin_modes" translatable="false">Martin Modes</string>
<string name="scottie_modes" translatable="false">Scottie Modes</string>
<string name="wraase_modes" translatable="false">Wraase Modes</string>
<string name="raw_mode" translatable="false">Raw Mode</string>
<string name="robot_modes" translatable="false">Robot</string>
<string name="pd_modes" translatable="false">PD</string>
<string name="martin_modes" translatable="false">Martin</string>
<string name="scottie_modes" translatable="false">Scottie</string>
<string name="wraase_modes" translatable="false">Wraase</string>
<string name="raw_mode">Raw Mode</string>
<string name="robot36_color" translatable="false">Robot 36 Color</string>
<string name="robot72_color" translatable="false">Robot 72 Color</string>
<string name="pd50" translatable="false">PD 50</string>