diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d9eddcae..f63629126 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ #### What's Changed - Audio focus is no longer configurable +- Made the layout of album songs more similar to other songs #### Dev/Meta - Updated translations [Konstantin Tutsch -> German, cccClyde -> Chinese ] diff --git a/README.md b/README.md index daa3d0e65..a5a281200 100644 --- a/README.md +++ b/README.md @@ -39,15 +39,17 @@ I primarily built Auxio for myself, but you can use it too, I guess. ## Features - [ExoPlayer](https://exoplayer.dev/) based playback -- Customizable UI & Behavior +- Snappy UI derived from the latest Material Design guidelines +- Opinionated UX that prioritizes ease of use over edge cases +- Customizable behavior - Advanced media indexer that prioritizes correct metadata - Reliable playback state persistence - Full ReplayGain support (On MP3, MP4, FLAC, OGG, and OPUS) -- Material You (Android 12+ only) - Edge-to-edge - Embedded covers support - Search Functionality -- Audio/Headset focus +- Headset autoplay +- Stylish widgets that automatically adapt to their size - Completely private and offline - No rounded album covers (Unless you want them. Then you can.) diff --git a/app/build.gradle b/app/build.gradle index e93c5478e..ea9707d8c 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -30,6 +30,7 @@ android { release { minifyEnabled true + shrinkResources true proguardFiles getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro" } } diff --git a/app/src/main/java/org/oxycblt/auxio/detail/recycler/AlbumDetailAdapter.kt b/app/src/main/java/org/oxycblt/auxio/detail/recycler/AlbumDetailAdapter.kt index 2fd4252b4..cc7f31823 100644 --- a/app/src/main/java/org/oxycblt/auxio/detail/recycler/AlbumDetailAdapter.kt +++ b/app/src/main/java/org/oxycblt/auxio/detail/recycler/AlbumDetailAdapter.kt @@ -19,6 +19,7 @@ package org.oxycblt.auxio.detail.recycler import android.content.Context import androidx.core.view.isInvisible +import androidx.core.view.isVisible import androidx.recyclerview.widget.RecyclerView import org.oxycblt.auxio.IntegerTable import org.oxycblt.auxio.R @@ -171,14 +172,14 @@ private class AlbumSongViewHolder private constructor(private val binding: ItemA isInvisible = false } - binding.songTrackPlaceholder.isInvisible = true + binding.songTrackPlaceholder.isVisible = false } else { binding.songTrack.apply { textSafe = "" isInvisible = true } - binding.songTrackPlaceholder.isInvisible = false + binding.songTrackPlaceholder.isVisible = true } binding.songName.textSafe = item.resolvedName @@ -197,6 +198,7 @@ private class AlbumSongViewHolder private constructor(private val binding: ItemA binding.songName.isActivated = isHighlighted binding.songTrack.isActivated = isHighlighted binding.songTrackPlaceholder.isActivated = isHighlighted + binding.songTrackBg.isActivated = isHighlighted } companion object { diff --git a/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt b/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt index 0521103fd..ad51b0b15 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/system/PlaybackService.kt @@ -83,7 +83,7 @@ class PlaybackService : private lateinit var player: ExoPlayer private lateinit var mediaSession: MediaSessionCompat private lateinit var connector: PlaybackSessionConnector - private val audioProcessor = ReplayGainAudioProcessor() + private val replayGainProcessor = ReplayGainAudioProcessor() // Notification components private lateinit var notification: PlaybackNotification @@ -247,7 +247,7 @@ class PlaybackService : if (info.isSelected) { for (i in 0 until info.trackGroup.length) { if (info.isTrackSelected(i)) { - audioProcessor.applyReplayGain(info.trackGroup.getFormat(i).metadata) + replayGainProcessor.applyReplayGain(info.trackGroup.getFormat(i).metadata) break } } @@ -359,8 +359,8 @@ class PlaybackService : handler, audioListener, AudioCapabilities.DEFAULT_AUDIO_CAPABILITIES, - audioProcessor), - LibflacAudioRenderer(handler, audioListener, audioProcessor)) + replayGainProcessor), + LibflacAudioRenderer(handler, audioListener, replayGainProcessor)) } // Enable constant bitrate seeking so that certain MP3s/AACs are seekable diff --git a/app/src/main/java/org/oxycblt/auxio/playback/system/ReplayGainAudioProcessor.kt b/app/src/main/java/org/oxycblt/auxio/playback/system/ReplayGainAudioProcessor.kt index 1c648dd40..eeea74af2 100644 --- a/app/src/main/java/org/oxycblt/auxio/playback/system/ReplayGainAudioProcessor.kt +++ b/app/src/main/java/org/oxycblt/auxio/playback/system/ReplayGainAudioProcessor.kt @@ -211,17 +211,17 @@ class ReplayGainAudioProcessor : BaseAudioProcessor() { } } else { for (i in position until limit step 2) { - val sample = inputBuffer.getLeShort(i) + var sample = inputBuffer.getLeShort(i) // Clamp the values to the minimum and maximum values possible for the // encoding. This prevents issues where samples amplified beyond 1 << 16 // will end up becoming truncated during the conversion to a short, // resulting in popping. - val targetSample = + sample = (sample * volume) .toInt() .clamp(Short.MIN_VALUE.toInt(), Short.MAX_VALUE.toInt()) .toShort() - buffer.putLeShort(targetSample) + buffer.putLeShort(sample) } } diff --git a/app/src/main/res/color/sel_on_track_bg.xml b/app/src/main/res/color/sel_on_track_bg.xml new file mode 100644 index 000000000..cee50ef26 --- /dev/null +++ b/app/src/main/res/color/sel_on_track_bg.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/color/sel_track_bg.xml b/app/src/main/res/color/sel_track_bg.xml new file mode 100644 index 000000000..8eaa5f689 --- /dev/null +++ b/app/src/main/res/color/sel_track_bg.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ui_track_bg.xml b/app/src/main/res/drawable/ui_track_bg.xml new file mode 100644 index 000000000..4d557ed5b --- /dev/null +++ b/app/src/main/res/drawable/ui_track_bg.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/item_album_song.xml b/app/src/main/res/layout/item_album_song.xml index 895fbf08f..b61f651f9 100644 --- a/app/src/main/res/layout/item_album_song.xml +++ b/app/src/main/res/layout/item_album_song.xml @@ -5,6 +5,20 @@ xmlns:tools="http://schemas.android.com/tools" style="@style/Widget.Auxio.ItemLayout"> + + + + 16sp 18sp - 22sp + 12sp + 20sp + 2sp 2dp diff --git a/info/FAQ.md b/info/FAQ.md index 492be2061..8257a86b0 100644 --- a/info/FAQ.md +++ b/info/FAQ.md @@ -6,9 +6,13 @@ Auxio is available on the [F-Droid](https://f-droid.org/en/packages/org.oxycblt. Auxio is not and will never be on the play store due to it being a proprietary and draconian platform. #### Why ExoPlayer? -ExoPlayer is far more flexible than the native MediaPlayer API, which allows consistent behavior across devices & OEMs and the -ability to be extended to music sources outside of local files. You can read more about the benefits (and drawbacks) of ExoPlayer -[Here](https://exoplayer.dev/pros-and-cons.html). +Unlike the stock `MediaPlayer` API that most music apps use, ExoPlayer is independent from the android system's +audio framework. This allows for the following: +- Consistent behavior across devices and OS versions +- Features that are normally not possible with a normal audio stream (such as positive ReplayGain values) +- Playback to be (theoretically) be extended beyond local files in the future + +You can read more about the benefits (and drawbacks) of ExoPlayer [Here](https://exoplayer.dev/pros-and-cons.html). #### What formats does Auxio support? As per the [Supported ExoPlayer Formats](https://exoplayer.dev/supported-formats.html), Auxio supports @@ -19,6 +23,7 @@ of Android through the use of the ExoPlayer FLAC extension. This is probably caused by one of two reasons: 1. If other players like Phonograph, Retro Music, or Music Player GO load it correctly, then Auxio has a bug and it should be [reported](https://github.com/OxygenCobalt/Auxio/issues). 2. If the aforementioned players don't work, but players like Vanilla Music and VLC do, then it's a problem with the Media APIs that Auxio relies on. There is nothing I can do about it. + - I hope to mitigate these issues in the future by extracting metadata myself or adding Subsonic/SoundPod support, however this is extremely far off. #### I have a large library and Auxio takes really long to load it! This is expected since reading from the audio database takes awhile, especially with libraries containing 10k songs or more. @@ -27,13 +32,19 @@ This is expected since reading from the audio database takes awhile, especially This is a current limitation with the music loader. To remedy this, go to Settings -> Reload music whenever new songs are added. I hope to make the app rescan music on the fly eventually. +#### There should be one artist, but instead I get a bunch of "Artist & Collaborator" artists! +This likely means your tags are wrong. By default, Auxio will use the "album artist" tag for +grouping if present, falling back to the "artist" tag otherwise. If your music does not have +such a field, it will result in fragmented artists. The reason why Auxio does not simply parse +for separators and then extract artists that way is that it risks mangling artists that don't +actually have collaborators, such as "Black Country, New Road" becoming "Black Country". + #### ReplayGain isn't working on my music! This is for a couple reason: -- Auxio doesn't extract ReplayGain tags for your format. +- Auxio doesn't extract ReplayGain tags for your format. This is a problem on ExoPlayer's end and should be +investigated there. - Auxio doesn't recognize your ReplayGain tags. This is usually because of a non-standard tag like ID3v2's `RVAD` or an unrecognized name. -- Your tags use a ReplayGain value higher than 0. Due to technical limitations, Auxio does not support this right now, -but I can work on it if the demand for this is sufficient. #### What is dynamic ReplayGain? Dynamic ReplayGain is a quirk setting based off the FooBar2000 plugin that dynamically switches from track gain to album diff --git a/info/LICENSES.md b/info/LICENSES.md index 568a76005..6be91b8ac 100644 --- a/info/LICENSES.md +++ b/info/LICENSES.md @@ -4,5 +4,6 @@ Auxio uses a number of third-party libraries, which are listed below with their | Library Name | Author(s) | Purpose | License | |--------------|-----------|---------|---------| | [ExoPlayer](https://github.com/google/ExoPlayer) | [Google](https://github.com/google) | Music Playback | Apache-2.0 | -| [Coil](https://github.com/coil-kt/coil) | [coil-kt](https://github.com/coil-kt) | Image Loading | Apache-2.0 | -| [ktlint](https://github.com/pinterest/ktlint) | [Pinterest](https://github.com/pinterest) | Code Formatting | MIT | +| [Coil](https://github.com/coil-kt/coil) | [Square](https://github.com/coil-kt) | Image Loading | Apache-2.0 | +| [Spotless](https://github.com/diffplug/spotless) | [CiffPlug](https://github.com/diffplug) | Formatting | Apache-2.0 | +| [ktfmt](https://github.com/facebookincubator/ktfmt) | [Meta](https://github.com/facebookincubator) | Formatting | Apache-2.0 |