Compare commits
No commits in common. "71c3e4eb1ca75fca47e9b2f783e1ac07ca78140a" and "e941da6f19680f5ca4eb91aa37d95ebe32de2773" have entirely different histories.
71c3e4eb1c
...
e941da6f19
8 changed files with 12 additions and 35 deletions
|
|
@ -97,15 +97,6 @@ kotlin {
|
|||
implementation("com.google.zxing:javase:3.5.4")
|
||||
}
|
||||
}
|
||||
targets.all {
|
||||
compilations.all {
|
||||
compileTaskProvider.configure {
|
||||
compilerOptions {
|
||||
freeCompilerArgs.add("-Xexpect-actual-classes")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
android {
|
||||
|
|
|
|||
|
|
@ -9,8 +9,6 @@ actual class SaveSettings actual constructor() {
|
|||
actual fun loadLastUsedDir(): String = settings.getString("last_dir", "/")
|
||||
actual fun saveLastUsedDir(lastDir: String) { settings["last_dir"] = lastDir }
|
||||
|
||||
actual fun saveWindowState(state: WindowState) {}
|
||||
actual fun loadWindowState(): WindowState {
|
||||
return WindowState(0,0,0,0)
|
||||
}
|
||||
actual fun saveWindowBounds(width: Int, height: Int, x: Int, y: Int) {}
|
||||
actual fun loadWindowBounds(): List<Int> = listOf(0, 0, 0, 0)
|
||||
}
|
||||
|
|
@ -4,7 +4,9 @@ import com.russhwolf.settings.Settings
|
|||
import com.russhwolf.settings.set
|
||||
import androidx.compose.ui.unit.DpSize
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.WindowPlacement
|
||||
import androidx.compose.ui.window.WindowState
|
||||
import androidx.compose.ui.window.WindowPosition
|
||||
|
||||
expect class SaveSettings() {
|
||||
val settings: Settings
|
||||
|
|
|
|||
|
|
@ -41,11 +41,7 @@ class POneStanzaLyrics {
|
|||
this.lyrics[stanzaNumber].split("\n").toMutableList()
|
||||
} else
|
||||
mutableListOf()
|
||||
if (result.isNotEmpty() && alternativeList.isNotEmpty()) {
|
||||
result.addAll(1, alternativeList) // overridedLyrics's index from 1 not 0
|
||||
} else {
|
||||
result.addAll(alternativeList )
|
||||
}
|
||||
return result
|
||||
}
|
||||
}
|
||||
|
|
@ -44,8 +44,8 @@ import androidx.compose.material.icons.filled.SettingsVoice
|
|||
import androidx.compose.material.icons.filled.Star
|
||||
import androidx.compose.material.icons.filled.Tonality
|
||||
import androidx.compose.material.icons.filled.Tune
|
||||
import androidx.compose.material.icons.automirrored.filled.VolumeUp
|
||||
import androidx.compose.material.icons.automirrored.filled.VolumeOff
|
||||
import androidx.compose.material.icons.filled.VolumeOff
|
||||
import androidx.compose.material.icons.filled.VolumeUp
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
|
|
@ -402,7 +402,7 @@ fun MidiControlPanel(
|
|||
|
||||
Column(horizontalAlignment = Alignment.CenterHorizontally) {
|
||||
Icon(
|
||||
imageVector = if (volume > 0) Icons.AutoMirrored.Filled.VolumeUp else Icons.AutoMirrored.Filled.VolumeOff,
|
||||
imageVector = if (volume > 0) Icons.Filled.VolumeUp else Icons.Filled.VolumeOff,
|
||||
contentDescription = null,
|
||||
modifier = Modifier.size(20.dp)
|
||||
)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import androidx.compose.foundation.lazy.rememberLazyListState
|
|||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.Book
|
||||
import androidx.compose.material.icons.filled.Menu
|
||||
import androidx.compose.material.icons.automirrored.filled.MenuBook
|
||||
import androidx.compose.material.icons.filled.MenuBook
|
||||
import androidx.compose.material.icons.filled.MusicNote
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.DrawerState
|
||||
|
|
@ -103,7 +103,7 @@ val midi = "whawyd3.mid"
|
|||
},
|
||||
icon = {
|
||||
val isIcon = when {
|
||||
isFfpm -> Icons.AutoMirrored.Filled.MenuBook
|
||||
isFfpm -> Icons.Filled.MenuBook
|
||||
isEws -> Icons.Filled.MusicNote
|
||||
isFF -> Icons.Filled.Book
|
||||
else -> Icons.Filled.Menu
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ import androidx.compose.runtime.setValue
|
|||
import cafe.adriel.voyager.core.model.ScreenModel
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.ExperimentalCoroutinesApi
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
import kotlinx.coroutines.flow.SharingStarted
|
||||
import kotlinx.coroutines.flow.StateFlow
|
||||
|
|
@ -59,7 +58,7 @@ class SharedScreenModel() : ScreenModel {
|
|||
private val _searchTitle = MutableStateFlow<String>("")
|
||||
val searchTitle: StateFlow<String> = _searchTitle.asStateFlow()
|
||||
|
||||
@OptIn(ExperimentalCoroutinesApi::class)
|
||||
@OptIn
|
||||
val filteredSongs: StateFlow<List<DrawerItem>> = searchTitle
|
||||
.mapLatest { currentTitle ->
|
||||
val searchTxt = if (currentTitle == "") "" else currentTitle.trim()
|
||||
|
|
|
|||
|
|
@ -1,11 +1,6 @@
|
|||
package mg.dot.feufaro.midi
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import kotlinx.coroutines.Dispatchers
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
import kotlinx.coroutines.Job
|
||||
import kotlinx.coroutines.SupervisorJob
|
||||
import kotlinx.coroutines.cancel
|
||||
import kotlinx.coroutines.delay
|
||||
import kotlinx.coroutines.launch
|
||||
import mg.dot.feufaro.FileRepository
|
||||
|
|
@ -43,8 +38,6 @@ actual class MediaPlayer actual constructor(
|
|||
private var currentGlobalVolume: Float = 0.8f
|
||||
|
||||
private var currentTempo: Float = 1.0f
|
||||
private val playerScope = CoroutineScope(Dispatchers.Default + SupervisorJob())
|
||||
private var abJob: Job? = null
|
||||
|
||||
init {
|
||||
try {
|
||||
|
|
@ -97,7 +90,6 @@ actual class MediaPlayer actual constructor(
|
|||
fun release() {
|
||||
sequencer?.close()
|
||||
synthetizer?.close()
|
||||
playerScope.cancel()
|
||||
}
|
||||
actual fun setVolume(level: Float) {
|
||||
try {
|
||||
|
|
@ -147,8 +139,7 @@ actual class MediaPlayer actual constructor(
|
|||
pointB = -1L
|
||||
}
|
||||
private fun startABMonitor() {
|
||||
abJob?.cancel()
|
||||
abJob = playerScope.launch {
|
||||
GlobalScope.launch {
|
||||
while(isLoopingAB) {
|
||||
val currentTick = sequencer?.tickPosition?: 0L
|
||||
if (currentTick >= pointB) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue