Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b45f871544 | ||
|
|
516fb7b932 | ||
|
|
3de296b5d2 | ||
|
|
37ecd0fa6e | ||
|
|
467dabe509 | ||
|
|
0f827f7a9c |
@@ -11,8 +11,8 @@ android {
|
|||||||
applicationId = "ru.ua1zbe.svxremote"
|
applicationId = "ru.ua1zbe.svxremote"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 9
|
versionCode = 10
|
||||||
versionName = "1.0.7"
|
versionName = "1.0.8"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|||||||
@@ -25,6 +25,12 @@
|
|||||||
android:exported="false"
|
android:exported="false"
|
||||||
android:label="@string/settings_title" />
|
android:label="@string/settings_title" />
|
||||||
|
|
||||||
|
<activity
|
||||||
|
android:name=".AudioSettingsActivity"
|
||||||
|
android:exported="false"
|
||||||
|
android:label="@string/audio_settings_title"
|
||||||
|
android:screenOrientation="portrait" />
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".SplashActivity"
|
android:name=".SplashActivity"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
|
|||||||
@@ -0,0 +1,70 @@
|
|||||||
|
package ru.ua1zbe.svxremote
|
||||||
|
|
||||||
|
import android.app.Activity
|
||||||
|
import android.os.Bundle
|
||||||
|
import android.widget.Button
|
||||||
|
import android.widget.SeekBar
|
||||||
|
import android.widget.TextView
|
||||||
|
import android.widget.Toast
|
||||||
|
import ru.ua1zbe.svxremote.prefs.Prefs
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Скрытые настройки звука (тройной тап по названию программы на главном
|
||||||
|
* экране): усиление микрофона, буфер воспроизведения (джиттер), накопление
|
||||||
|
* перед стартом. Применяются при следующем подключении/передаче.
|
||||||
|
*/
|
||||||
|
class AudioSettingsActivity : Activity() {
|
||||||
|
|
||||||
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
|
super.onCreate(savedInstanceState)
|
||||||
|
setContentView(R.layout.activity_audio_settings)
|
||||||
|
|
||||||
|
val seekMicGain = findViewById<SeekBar>(R.id.seek_mic_gain)
|
||||||
|
val lblMicGain = findViewById<TextView>(R.id.lbl_mic_gain_value)
|
||||||
|
val seekRxBuffer = findViewById<SeekBar>(R.id.seek_rx_buffer)
|
||||||
|
val lblRxBuffer = findViewById<TextView>(R.id.lbl_rx_buffer_value)
|
||||||
|
val seekJitter = findViewById<SeekBar>(R.id.seek_jitter)
|
||||||
|
val lblJitter = findViewById<TextView>(R.id.lbl_jitter_value)
|
||||||
|
|
||||||
|
fun updateMicGainLabel() {
|
||||||
|
lblMicGain.text = "${100 + seekMicGain.progress * 10}%"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateRxBufferLabel() {
|
||||||
|
lblRxBuffer.text = "${100 + seekRxBuffer.progress * 20} мс"
|
||||||
|
}
|
||||||
|
|
||||||
|
fun updateJitterLabel() {
|
||||||
|
lblJitter.text = "${seekJitter.progress * 20} мс"
|
||||||
|
}
|
||||||
|
|
||||||
|
seekMicGain.progress = ((Prefs.micGain(this) - 1.0f) * 10).toInt().coerceIn(0, 40)
|
||||||
|
seekRxBuffer.progress = ((Prefs.rxBufferMs(this) - 100) / 20).coerceIn(0, 25)
|
||||||
|
seekJitter.progress = (Prefs.rxJitterMs(this) / 20).coerceIn(0, 20)
|
||||||
|
updateMicGainLabel()
|
||||||
|
updateRxBufferLabel()
|
||||||
|
updateJitterLabel()
|
||||||
|
|
||||||
|
val listener = object : SeekBar.OnSeekBarChangeListener {
|
||||||
|
override fun onProgressChanged(seekBar: SeekBar, progress: Int, fromUser: Boolean) {
|
||||||
|
updateMicGainLabel()
|
||||||
|
updateRxBufferLabel()
|
||||||
|
updateJitterLabel()
|
||||||
|
}
|
||||||
|
|
||||||
|
override fun onStartTrackingTouch(seekBar: SeekBar) {}
|
||||||
|
override fun onStopTrackingTouch(seekBar: SeekBar) {}
|
||||||
|
}
|
||||||
|
seekMicGain.setOnSeekBarChangeListener(listener)
|
||||||
|
seekRxBuffer.setOnSeekBarChangeListener(listener)
|
||||||
|
seekJitter.setOnSeekBarChangeListener(listener)
|
||||||
|
|
||||||
|
findViewById<Button>(R.id.btn_audio_save).setOnClickListener {
|
||||||
|
Prefs.setMicGain(this, 1.0f + seekMicGain.progress * 0.1f)
|
||||||
|
Prefs.setRxBufferMs(this, 100 + seekRxBuffer.progress * 20)
|
||||||
|
Prefs.setRxJitterMs(this, seekJitter.progress * 20)
|
||||||
|
Toast.makeText(this, getString(R.string.saved), Toast.LENGTH_SHORT).show()
|
||||||
|
finish()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -67,6 +67,8 @@ class MainActivity : Activity(), SvxService.Listener {
|
|||||||
|
|
||||||
private val mainHandler = Handler(Looper.getMainLooper())
|
private val mainHandler = Handler(Looper.getMainLooper())
|
||||||
private var titleHoldRunnable: Runnable? = null
|
private var titleHoldRunnable: Runnable? = null
|
||||||
|
private var titleResetRunnable: Runnable? = null
|
||||||
|
private var titleTaps = 0
|
||||||
|
|
||||||
private data class TalkLogEntry(val time: Long, val callsign: String, val tg: Long)
|
private data class TalkLogEntry(val time: Long, val callsign: String, val tg: Long)
|
||||||
|
|
||||||
@@ -164,18 +166,36 @@ class MainActivity : Activity(), SvxService.Listener {
|
|||||||
|
|
||||||
lblTalker.setOnClickListener { showTalkLogDialog() }
|
lblTalker.setOnClickListener { showTalkLogDialog() }
|
||||||
|
|
||||||
// Удержание на названии программы (> 2 с) — выбор профиля настроек
|
// Удержание на названии программы (> 2 с) — выбор профиля настроек;
|
||||||
|
// короткие тапы считаем: тройной тап — настройки
|
||||||
lblAppTitle.setOnTouchListener { _, event ->
|
lblAppTitle.setOnTouchListener { _, event ->
|
||||||
when (event.actionMasked) {
|
when (event.actionMasked) {
|
||||||
MotionEvent.ACTION_DOWN -> {
|
MotionEvent.ACTION_DOWN -> {
|
||||||
val r = Runnable { showProfileDialog() }
|
val r = Runnable {
|
||||||
|
titleHoldRunnable = null
|
||||||
|
showProfileDialog()
|
||||||
|
}
|
||||||
titleHoldRunnable = r
|
titleHoldRunnable = r
|
||||||
mainHandler.postDelayed(r, 2000)
|
mainHandler.postDelayed(r, 2000)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
MotionEvent.ACTION_UP, MotionEvent.ACTION_CANCEL -> {
|
||||||
|
val wasHold = titleHoldRunnable == null
|
||||||
titleHoldRunnable?.let { mainHandler.removeCallbacks(it) }
|
titleHoldRunnable?.let { mainHandler.removeCallbacks(it) }
|
||||||
titleHoldRunnable = null
|
titleHoldRunnable = null
|
||||||
|
if (!wasHold) {
|
||||||
|
titleTaps++
|
||||||
|
// Скользящее окно: сброс от последнего тапа
|
||||||
|
titleResetRunnable?.let { mainHandler.removeCallbacks(it) }
|
||||||
|
val reset = Runnable { titleTaps = 0 }
|
||||||
|
titleResetRunnable = reset
|
||||||
|
mainHandler.postDelayed(reset, 1200)
|
||||||
|
if (titleTaps >= 3) {
|
||||||
|
titleTaps = 0
|
||||||
|
titleResetRunnable?.let { mainHandler.removeCallbacks(it) }
|
||||||
|
startActivity(Intent(this, AudioSettingsActivity::class.java))
|
||||||
|
}
|
||||||
|
}
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
else -> true
|
else -> true
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import android.widget.Button
|
|||||||
import android.widget.CheckBox
|
import android.widget.CheckBox
|
||||||
import android.widget.EditText
|
import android.widget.EditText
|
||||||
import android.widget.Spinner
|
import android.widget.Spinner
|
||||||
|
import android.widget.TextView
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import ru.ua1zbe.svxremote.prefs.ConnectionSettings
|
import ru.ua1zbe.svxremote.prefs.ConnectionSettings
|
||||||
import ru.ua1zbe.svxremote.prefs.Prefs
|
import ru.ua1zbe.svxremote.prefs.Prefs
|
||||||
@@ -41,6 +42,8 @@ class SettingsActivity : Activity() {
|
|||||||
val chkNodeToasts = findViewById<CheckBox>(R.id.chk_node_toasts)
|
val chkNodeToasts = findViewById<CheckBox>(R.id.chk_node_toasts)
|
||||||
chkNodeToasts.isChecked = Prefs.nodeToastsEnabled(this)
|
chkNodeToasts.isChecked = Prefs.nodeToastsEnabled(this)
|
||||||
inputAprsCoords.setText(Prefs.aprsCoords(this))
|
inputAprsCoords.setText(Prefs.aprsCoords(this))
|
||||||
|
findViewById<TextView>(R.id.lbl_version).text =
|
||||||
|
getString(R.string.app_version_fmt, BuildConfig.VERSION_NAME)
|
||||||
|
|
||||||
val profileNames = (1..Prefs.PROFILE_COUNT)
|
val profileNames = (1..Prefs.PROFILE_COUNT)
|
||||||
.map { getString(R.string.profile_name, it) }
|
.map { getString(R.string.profile_name, it) }
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import android.os.Binder
|
|||||||
import android.os.IBinder
|
import android.os.IBinder
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import ru.ua1zbe.svxremote.audio.OpusEngine
|
import ru.ua1zbe.svxremote.audio.OpusEngine
|
||||||
|
import ru.ua1zbe.svxremote.prefs.Prefs
|
||||||
import ru.ua1zbe.svxremote.proto.MsgParser
|
import ru.ua1zbe.svxremote.proto.MsgParser
|
||||||
import ru.ua1zbe.svxremote.proto.ReflectorClient
|
import ru.ua1zbe.svxremote.proto.ReflectorClient
|
||||||
|
|
||||||
@@ -99,7 +100,7 @@ class SvxService : Service(), ReflectorClient.Callbacks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun startTx() {
|
fun startTx() {
|
||||||
engine.startCapture { packet -> client.sendAudio(packet) }
|
engine.startCapture(Prefs.micGain(this)) { packet -> client.sendAudio(packet) }
|
||||||
}
|
}
|
||||||
|
|
||||||
fun stopTx() {
|
fun stopTx() {
|
||||||
@@ -118,6 +119,8 @@ class SvxService : Service(), ReflectorClient.Callbacks {
|
|||||||
when (state) {
|
when (state) {
|
||||||
ReflectorClient.STATE_READY -> {
|
ReflectorClient.STATE_READY -> {
|
||||||
updateNotification(getString(R.string.notif_connected))
|
updateNotification(getString(R.string.notif_connected))
|
||||||
|
engine.rxBufferMs = Prefs.rxBufferMs(this)
|
||||||
|
engine.jitterFrames = (Prefs.rxJitterMs(this) / 20).coerceAtLeast(1)
|
||||||
engine.startDecoder()
|
engine.startDecoder()
|
||||||
}
|
}
|
||||||
ReflectorClient.STATE_DISCONNECTED -> {
|
ReflectorClient.STATE_DISCONNECTED -> {
|
||||||
|
|||||||
@@ -58,7 +58,12 @@ class OpusEngine(
|
|||||||
private var dbgOut = 0
|
private var dbgOut = 0
|
||||||
private var playStarted = false
|
private var playStarted = false
|
||||||
private var gateStart = 0L
|
private var gateStart = 0L
|
||||||
private val jitterTarget = 6 // ≈ 120 мс накапливаем до первого слива
|
private var lastRealPacketTime = 0L
|
||||||
|
// Настраивается из скрытых настроек звука (AudioSettingsActivity)
|
||||||
|
@Volatile
|
||||||
|
var rxBufferMs = 417 // буфер AudioTrack, мс (40000 байт ≈ 417 мс при 48 кГц)
|
||||||
|
@Volatile
|
||||||
|
var jitterFrames = 10 // сколько кадров накопить до первого слива (кадр = 20 мс)
|
||||||
private val configBuffers = ArrayList<ByteArray>()
|
private val configBuffers = ArrayList<ByteArray>()
|
||||||
private var configIdx = 0
|
private var configIdx = 0
|
||||||
|
|
||||||
@@ -88,7 +93,7 @@ class OpusEngine(
|
|||||||
OUT_SAMPLE_RATE,
|
OUT_SAMPLE_RATE,
|
||||||
AudioFormat.CHANNEL_OUT_MONO,
|
AudioFormat.CHANNEL_OUT_MONO,
|
||||||
AudioFormat.ENCODING_PCM_16BIT,
|
AudioFormat.ENCODING_PCM_16BIT,
|
||||||
maxOf(minBuf, 20000), // ~208 мс — буфер AudioTrack и есть джиттер-буфер
|
maxOf(minBuf, rxBufferMs * 96), // 96 байт/мс при 48 кГц моно 16 бит
|
||||||
AudioTrack.MODE_STREAM
|
AudioTrack.MODE_STREAM
|
||||||
) // play() включаем на первом выходном кадре — буфер успевает накопиться
|
) // play() включаем на первом выходном кадре — буфер успевает накопиться
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
@@ -204,7 +209,10 @@ class OpusEngine(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
player?.write(pcm, 0, pcm.size)
|
player?.write(pcm, 0, pcm.size)
|
||||||
onLevel(SRC_SPEAKER, pcmLevel(pcm))
|
// Уровень показываем только для реальных пакетов: во время
|
||||||
|
// скрытия потерь (conceal) шкала должна быть в нуле
|
||||||
|
val real = System.currentTimeMillis() - lastRealPacketTime < 400
|
||||||
|
onLevel(SRC_SPEAKER, if (real) pcmLevel(pcm) else 0f)
|
||||||
if (dbgOut < 5) {
|
if (dbgOut < 5) {
|
||||||
Log.d(TAG, "out ${pcm.size}B")
|
Log.d(TAG, "out ${pcm.size}B")
|
||||||
dbgOut++
|
dbgOut++
|
||||||
@@ -274,6 +282,7 @@ class OpusEngine(
|
|||||||
|
|
||||||
/** Подача одного Opus-пакета на декодер (с UDP-потока). */
|
/** Подача одного Opus-пакета на декодер (с UDP-потока). */
|
||||||
fun onAudioPacket(packet: ByteArray) {
|
fun onAudioPacket(packet: ByteArray) {
|
||||||
|
lastRealPacketTime = System.currentTimeMillis()
|
||||||
rxQueue.add(packet)
|
rxQueue.add(packet)
|
||||||
receivedAny = true
|
receivedAny = true
|
||||||
if (gateStart == 0L) gateStart = System.currentTimeMillis()
|
if (gateStart == 0L) gateStart = System.currentTimeMillis()
|
||||||
@@ -282,11 +291,11 @@ class OpusEngine(
|
|||||||
decoder?.let { feedDecoder(it, idx, rxQueue.poll() ?: packet) }
|
decoder?.let { feedDecoder(it, idx, rxQueue.poll() ?: packet) }
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Джиттер-гейт открыт: накопили кадры или вышло 80 мс с первого пакета. */
|
/** Джиттер-гейт открыт: накопили кадры или вышло 150 мс с первого пакета. */
|
||||||
private fun gateOpen(): Boolean {
|
private fun gateOpen(): Boolean {
|
||||||
if (playStarted) return true
|
if (playStarted) return true
|
||||||
if (rxQueue.size >= jitterTarget) return true
|
if (rxQueue.size >= jitterFrames) return true
|
||||||
return gateStart != 0L && System.currentTimeMillis() - gateStart >= 80
|
return gateStart != 0L && System.currentTimeMillis() - gateStart >= 150
|
||||||
}
|
}
|
||||||
|
|
||||||
fun onAudioFlush() {
|
fun onAudioFlush() {
|
||||||
@@ -394,7 +403,7 @@ class OpusEngine(
|
|||||||
// ---------- Захват (TX) ----------
|
// ---------- Захват (TX) ----------
|
||||||
|
|
||||||
/** Начать PTT: запустить запись и кодирование. */
|
/** Начать PTT: запустить запись и кодирование. */
|
||||||
fun startCapture(onPacket: (ByteArray) -> Unit) {
|
fun startCapture(micGain: Float = 1.0f, onPacket: (ByteArray) -> Unit) {
|
||||||
if (encoding) return
|
if (encoding) return
|
||||||
val enc = createEncoder()
|
val enc = createEncoder()
|
||||||
encoder = enc
|
encoder = enc
|
||||||
@@ -417,7 +426,7 @@ class OpusEngine(
|
|||||||
rec.startRecording()
|
rec.startRecording()
|
||||||
encoding = true
|
encoding = true
|
||||||
val t = Thread({
|
val t = Thread({
|
||||||
captureLoop(enc, rec, onPacket)
|
captureLoop(enc, rec, micGain, onPacket)
|
||||||
}, "svx-capture")
|
}, "svx-capture")
|
||||||
t.isDaemon = true
|
t.isDaemon = true
|
||||||
recThread = t
|
recThread = t
|
||||||
@@ -441,7 +450,7 @@ class OpusEngine(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun captureLoop(enc: MediaCodec, rec: AudioRecord, onPacket: (ByteArray) -> Unit) {
|
private fun captureLoop(enc: MediaCodec, rec: AudioRecord, micGain: Float, onPacket: (ByteArray) -> Unit) {
|
||||||
val pcmBuf = ByteBuffer.allocateDirect(FRAME_SIZE * 2).order(ByteOrder.LITTLE_ENDIAN)
|
val pcmBuf = ByteBuffer.allocateDirect(FRAME_SIZE * 2).order(ByteOrder.LITTLE_ENDIAN)
|
||||||
val micLevel = FloatArray(1)
|
val micLevel = FloatArray(1)
|
||||||
while (encoding) {
|
while (encoding) {
|
||||||
@@ -451,6 +460,14 @@ class OpusEngine(
|
|||||||
pcmBuf.limit(n)
|
pcmBuf.limit(n)
|
||||||
val pcm = ByteArray(n)
|
val pcm = ByteArray(n)
|
||||||
pcmBuf.get(pcm)
|
pcmBuf.get(pcm)
|
||||||
|
if (micGain != 1.0f) {
|
||||||
|
for (i in 0 until n step 2) {
|
||||||
|
val s = ((pcm[i + 1].toInt() shl 8) or (pcm[i].toInt() and 0xFF)).toShort()
|
||||||
|
val g = (s * micGain).toInt().coerceIn(-32768, 32767)
|
||||||
|
pcm[i] = (g and 0xFF).toByte()
|
||||||
|
pcm[i + 1] = ((g shr 8) and 0xFF).toByte()
|
||||||
|
}
|
||||||
|
}
|
||||||
micLevel[0] = pcmLevel(pcm)
|
micLevel[0] = pcmLevel(pcm)
|
||||||
onLevel(SRC_MIC, micLevel[0])
|
onLevel(SRC_MIC, micLevel[0])
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -136,4 +136,30 @@ object Prefs {
|
|||||||
fun setAprsCoords(context: Context, coords: String) {
|
fun setAprsCoords(context: Context, coords: String) {
|
||||||
sp(context).edit().putString("aprs_coords", coords.trim()).apply()
|
sp(context).edit().putString("aprs_coords", coords.trim()).apply()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Усиление микрофона (1.0 = без усиления). */
|
||||||
|
fun micGain(context: Context): Float =
|
||||||
|
sp(context).getFloat("mic_gain", 1.0f)
|
||||||
|
|
||||||
|
fun setMicGain(context: Context, gain: Float) {
|
||||||
|
sp(context).edit().putFloat("mic_gain", gain.coerceIn(0.5f, 5.0f)).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
// ---------- Скрытые настройки звука (AudioSettingsActivity) ----------
|
||||||
|
|
||||||
|
/** Буфер воспроизведения RX, мс. */
|
||||||
|
fun rxBufferMs(context: Context): Int =
|
||||||
|
sp(context).getInt("rx_buffer_ms", 417)
|
||||||
|
|
||||||
|
fun setRxBufferMs(context: Context, ms: Int) {
|
||||||
|
sp(context).edit().putInt("rx_buffer_ms", ms.coerceIn(100, 600)).apply()
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Накопление перед стартом воспроизведения, мс (кратно 20). */
|
||||||
|
fun rxJitterMs(context: Context): Int =
|
||||||
|
sp(context).getInt("rx_jitter_ms", 200)
|
||||||
|
|
||||||
|
fun setRxJitterMs(context: Context, ms: Int) {
|
||||||
|
sp(context).edit().putInt("rx_jitter_ms", ms.coerceIn(0, 400)).apply()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
127
app/src/main/res/layout/activity_audio_settings.xml
Normal file
127
app/src/main/res/layout/activity_audio_settings.xml
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:background="@color/bg">
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="vertical"
|
||||||
|
android:padding="20dp">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/audio_settings_title"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:textSize="20sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:layout_marginBottom="4dp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="@string/audio_settings_hint"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:textSize="13sp"
|
||||||
|
android:layout_marginBottom="20dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/audio_mic_gain"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lbl_mic_gain_value"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/seek_mic_gain"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:max="40"
|
||||||
|
android:layout_marginBottom="20dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/audio_rx_buffer"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lbl_rx_buffer_value"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/seek_rx_buffer"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:max="25"
|
||||||
|
android:layout_marginBottom="20dp" />
|
||||||
|
|
||||||
|
<LinearLayout
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:orientation="horizontal"
|
||||||
|
android:gravity="center_vertical">
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="@string/audio_jitter"
|
||||||
|
android:textColor="@color/text_primary"
|
||||||
|
android:textSize="15sp" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/lbl_jitter_value"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:textColor="@color/text_secondary"
|
||||||
|
android:textSize="14sp" />
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<SeekBar
|
||||||
|
android:id="@+id/seek_jitter"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:max="20"
|
||||||
|
android:layout_marginBottom="24dp" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/btn_audio_save"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="52dp"
|
||||||
|
android:text="@string/btn_save"
|
||||||
|
android:textColor="#0D1117"
|
||||||
|
android:background="@drawable/bg_primary_btn"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold" />
|
||||||
|
</LinearLayout>
|
||||||
|
</ScrollView>
|
||||||
@@ -218,7 +218,6 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="24dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:text="@string/app_version"
|
|
||||||
android:textColor="@color/text_secondary"
|
android:textColor="@color/text_secondary"
|
||||||
android:textSize="12sp" />
|
android:textSize="12sp" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|||||||
@@ -18,13 +18,18 @@
|
|||||||
<string name="pref_aprs_label">Метеостанции (APRS)</string>
|
<string name="pref_aprs_label">Метеостанции (APRS)</string>
|
||||||
<string name="pref_aprs_hint">Экспериментально: принимает метеостанции в радиусе 250 км. Последняя станция показывается вместо строки сервера на главном экране.</string>
|
<string name="pref_aprs_hint">Экспериментально: принимает метеостанции в радиусе 250 км. Последняя станция показывается вместо строки сервера на главном экране.</string>
|
||||||
<string name="pref_aprs_coords">Координаты (широта, долгота)</string>
|
<string name="pref_aprs_coords">Координаты (широта, долгота)</string>
|
||||||
<string name="pref_aprs_coords_hint">пусто = центр Санкт-Петербурга, например 59.95, 30.30</string>
|
<string name="pref_aprs_coords_hint">пусто = СПб, напр. 59.95, 30.30</string>
|
||||||
|
<string name="audio_settings_title">Настройки звука</string>
|
||||||
|
<string name="audio_settings_hint">Скрытые настройки: применяются при следующем подключении/передаче.</string>
|
||||||
|
<string name="audio_mic_gain">Усиление микрофона</string>
|
||||||
|
<string name="audio_rx_buffer">Буфер воспроизведения</string>
|
||||||
|
<string name="audio_jitter">Накопление перед стартом</string>
|
||||||
<string name="toast_node_joined">Подключился: %1$s%2$s</string>
|
<string name="toast_node_joined">Подключился: %1$s%2$s</string>
|
||||||
<string name="toast_node_left">Отключился: %1$s%2$s</string>
|
<string name="toast_node_left">Отключился: %1$s%2$s</string>
|
||||||
<string name="node_tg_suffix"> (группа %1$d)</string>
|
<string name="node_tg_suffix"> (группа %1$d)</string>
|
||||||
<string name="node_with_tg">%1$s — TG%2$d</string>
|
<string name="node_with_tg">%1$s — TG%2$d</string>
|
||||||
<string name="btn_save">Сохранить</string>
|
<string name="btn_save">Сохранить</string>
|
||||||
<string name="app_version">SVXhomyak — v1.0.5</string>
|
<string name="app_version_fmt">SVXhomyak — v%1$s</string>
|
||||||
<string name="saved">Сохранено</string>
|
<string name="saved">Сохранено</string>
|
||||||
<string name="pref_callsign_hint">например UA1ZBE</string>
|
<string name="pref_callsign_hint">например UA1ZBE</string>
|
||||||
|
|
||||||
@@ -47,7 +52,7 @@
|
|||||||
<string name="meter_rx">RX</string>
|
<string name="meter_rx">RX</string>
|
||||||
<string name="meter_mic">MIC</string>
|
<string name="meter_mic">MIC</string>
|
||||||
<string name="meter_idle">---</string>
|
<string name="meter_idle">---</string>
|
||||||
<string name="meter_db">-%1$d dB</string>
|
<string name="meter_db">+%1$d dB</string>
|
||||||
<string name="tg_badge">TG%1$d ▾</string>
|
<string name="tg_badge">TG%1$d ▾</string>
|
||||||
<string name="talker_last_none">Последний: —</string>
|
<string name="talker_last_none">Последний: —</string>
|
||||||
<string name="status_connecting">Подключение…</string>
|
<string name="status_connecting">Подключение…</string>
|
||||||
|
|||||||
Reference in New Issue
Block a user