Skip to content

Commit

Permalink
Added new translation Chinese Simplified and Traditional
Browse files Browse the repository at this point in the history
Visualizer improvements
New version 0.6.16 release
  • Loading branch information
fast4x committed Jan 5, 2024
1 parent 2efd6e4 commit fd89361
Show file tree
Hide file tree
Showing 13 changed files with 343 additions and 244 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,27 @@
</div>

## 🌐 Languages available
- **Arabic:** thanks to [Ahmad Al Juwaisri](https://crowdin.com/profile/juwaisri)
- **Bashkir:** thanks to [Shilave malay](https://crowdin.com/profile/Bash.boy)
- **Catalan:** thanks to [EMC_Translator](https://crowdin.com/profile/EMC_Translator)
- **Czech:** thanks to [@ikanakova](https://github.com/ikanakova)
- **Chinese Simplified:** thanks to [@SharkChan0622](https://github.com/SharkChan0622)
- **Chinese Traditional:** thanks to [@SharkChan0622](https://github.com/SharkChan0622)
- **Czech:** thanks to [@ikanakova](https://github.com/ikanakova) and [@JZITNIK-github](https://github.com/JZITNIK-github) and [Adam Kop](https://crowdin.com/profile/damianadam000)
- **English:** thanks to [@fast4x](https://github.com/fast4x)
- **Esperanto:** thanks to [@kjev666](https://github.com/kjev666)
- **French:** thanks to [@NEVARLeVrai](https://github.com/NEVARLeVrai)
- **German:** thanks to [@siggi1984](https://github.com/siggi1984)
- **German:** thanks to [Conk](https://crowdin.com/profile/conk) and [@siggi1984](https://github.com/siggi1984)
- **Greek:** thanks to [@Marinkas](https://github.com/Marinkas)
- **Italian:** thanks to [@fast4x](https://github.com/fast4x)
- **Indonesian:** thanks to [@teddysulaimanGL](https://github.com/teddysulaimanGL)
- **Odia:** thanks to [@Get100percent](https://github.com/Get100percent)
- **Polish:** thanks to [@roklc](https://github.com/roklc) and [@damianadam000](https://github.com/damianadam000)
- **Polish:** thanks to [@roklc](https://github.com/roklc) and [Fabian Urra](https://crowdin.com/profile/nsagcl)
- **Portuguese:** thanks to [@NEVARLeVrai](https://github.com/NEVARLeVrai)
- **Portuguese, Brazilian:** thanks to [@NEVARLeVrai](https://github.com/NEVARLeVrai)
- **Romanian:** thanks to [@OrangeZXZ](https://github.com/OrangeZxZ)
- **Russian:** thanks to [@siggi1984](https://github.com/siggi1984)
- **Spanish:** thanks to [@DanielSevillano](https://github.com/DanielSevillano)
- **Turkish:** thanks to [@abfreeman](https://github.com/abfreeman) and [@2010furs](https://github.com/2010furs)
- **Russian:** thanks to [Vladimir](https://crowdin.com/profile/vladimir15426) and [@siggi1984](https://github.com/siggi1984)
- **Spanish:** thanks to [@DanielSevillano](https://github.com/DanielSevillano) and [@DanielSevillano](https://github.com/DanielSevillano)
- **Turkish:** thanks to [@abfreeman](https://github.com/abfreeman) and [@2010furs](https://github.com/2010furs) and [Muha Aliss](https://crowdin.com/profile/muhaaliss)


## 🔤 Translations
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ android {
applicationId = "it.fast4x.rimusic"
minSdk = 21
targetSdk = 33
versionCode = 10
versionName = "0.6.15.1"
versionCode = 11
versionName = "0.6.16"
buildConfigField("String", "VERSION_NAME", "\"$versionName\"")
}

Expand Down
6 changes: 6 additions & 0 deletions app/src/main/kotlin/it/vfsfitvnm/vimusic/enums/Locales.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ package it.vfsfitvnm.vimusic.enums

enum class Languages {
System,
Arabic,
Bashkir,
Catalan,
English,
Esperanto,
ChineseSimplified,
ChineseTraditional,
Czech,
French,
FrenchEmo,
Expand All @@ -26,8 +29,11 @@ enum class Languages {
var code: String = "en"
get() = when (this) {
System -> "system"
Arabic -> "ar"
Bashkir -> "ba"
Catalan -> "ca"
ChineseSimplified -> "zh-CN"
ChineseTraditional -> "zh-TW"
English -> "en"
Esperanto -> "eo"
Italian -> "it"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,11 @@ fun ContentType(

VisualizerComputer.setupPermissions( LocalContext.current as Activity )
val audioComputer = VisualizerComputer()

Log.d("mediaItemEqualizer","EXTERNAL audioSession ${binder?.player?.audioSessionId}")
binder?.player?.audioSessionId?.let {

Log.d("mediaItemEqualizer","internal audioSession ${it}")
audioComputer.start(audioSessionId = it, onData = { data ->
Log.d("mediaItemEqualizer","onData amplitude ${data.amplitude} captureSize ${data.captureSize} rawWaveform ${data.rawWaveform} samplingRate ${data.samplingRate}")
visualizerData.value = data
})
}
Expand Down Expand Up @@ -278,7 +279,7 @@ fun ContentType(
//.background(colorPalette.overlay),
.background(Color.Black.copy(0.8f)),
data = visualizerData.value,
barCount = 16,
barCount = 32,
maxStackCount = 16
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,21 @@ class VisualizerComputer {
}

fun start(audioSessionId: Int = 0, onData: (VisualizerData) -> Unit) {
stop()
visualizer = Visualizer(audioSessionId).apply {
enabled = false // All configuration have to be done in a disabled state
captureSize = CAPTURE_SIZE
scalingMode = Visualizer.SCALING_MODE_NORMALIZED //Check
measurementMode = Visualizer.MEASUREMENT_MODE_NONE // Check
setDataCaptureListener(
visualizerCallback(onData),
Visualizer.getMaxCaptureRate(),
true,
true
)
enabled = true // Configuration is done, can enable now...
//stop()
if (visualizer == null) {
visualizer = Visualizer(audioSessionId).apply {
enabled = false // All configuration have to be done in a disabled state
captureSize = CAPTURE_SIZE
scalingMode = Visualizer.SCALING_MODE_NORMALIZED //Check
measurementMode = Visualizer.MEASUREMENT_MODE_NONE // Check
setDataCaptureListener(
visualizerCallback(onData),
Visualizer.getMaxCaptureRate(),
true,
true
)
enabled = true // Configuration is done, can enable now...
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import androidx.annotation.DrawableRes
import androidx.core.net.toUri
import androidx.core.os.bundleOf
import androidx.media3.common.Player
import androidx.media3.common.util.UnstableApi
import androidx.media3.datasource.cache.Cache
import it.vfsfitvnm.vimusic.Database
import it.vfsfitvnm.vimusic.R
Expand Down Expand Up @@ -48,6 +49,7 @@ class PlayerMediaBrowserService : MediaBrowserService(), ServiceConnection {
super.onDestroy()
}

@UnstableApi
override fun onServiceConnected(className: ComponentName, service: IBinder) {
if (service is PlayerService.Binder) {
bound = true
Expand Down Expand Up @@ -230,6 +232,7 @@ class PlayerMediaBrowserService : MediaBrowserService(), ServiceConnection {
override fun onSeekTo(pos: Long) = player.seekTo(pos)
override fun onSkipToQueueItem(id: Long) = player.seekToDefaultPosition(id.toInt())

@UnstableApi
override fun onPlayFromMediaId(mediaId: String?, extras: Bundle?) {
val data = mediaId?.split('/') ?: return
var index = 0
Expand Down
Loading

0 comments on commit fd89361

Please sign in to comment.