-
Notifications
You must be signed in to change notification settings - Fork 0
feat(dsp): add experimental switch for lower and finer buffer size control #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,17 +13,23 @@ | |
| <me.timschneeberger.rootlessjamesdsp.preference.MaterialSeekbarPreference | ||
| android:key="@string/key_audioformat_buffersize" | ||
| android:title="@string/audio_format_buffer_size" | ||
| app:seekBarIncrement="128" | ||
| app:seekBarIncrement="2" | ||
| app:precision="0" | ||
| app:unit="@string/audio_format_buffer_size_unit" | ||
| app:labelMinWidth="120dp" | ||
| app:minValue="128" | ||
| app:minValue="2" | ||
| app:maxValue="16384" | ||
| app:defaultValue="@integer/default_audioformat_buffersize" | ||
| app:allowDividerAbove="false" | ||
| app:updatesContinuously="false" | ||
| app:showSeekBarValue="true" | ||
| app:iconSpaceReserved="false"/> | ||
|
Comment on lines
+16
to
26
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, find the XML file to confirm the hardcoded values
find . -name "app_audio_format_preferences.xml" -type fRepository: JSJ-Experiments/RootlessJamesDSP Length of output: 131 🏁 Script executed: # Find the SettingsAudioFormatFragment to verify the clamping logic
find . -name "SettingsAudioFormatFragment.kt" -type fRepository: JSJ-Experiments/RootlessJamesDSP Length of output: 180 🏁 Script executed: # Search for MaterialSeekbarPreference implementation
find . -name "*MaterialSeekbar*" -o -name "*Seekbar*" | grep -E "\.(kt|java)$"Repository: JSJ-Experiments/RootlessJamesDSP Length of output: 171 🏁 Script executed: # Read the XML file to confirm the hardcoded values
cat -n ./app/src/main/res/xml/app_audio_format_preferences.xmlRepository: JSJ-Experiments/RootlessJamesDSP Length of output: 4868 🏁 Script executed: # Read the SettingsAudioFormatFragment to check for change listeners and clamping
wc -l ./app/src/main/java/me/timschneeberger/rootlessjamesdsp/fragment/settings/SettingsAudioFormatFragment.ktRepository: JSJ-Experiments/RootlessJamesDSP Length of output: 184 🏁 Script executed: # Read the MaterialSeekbarPreference to see if minValue can be set dynamically
cat -n ./app/src/main/java/me/timschneeberger/rootlessjamesdsp/preference/MaterialSeekbarPreference.ktRepository: JSJ-Experiments/RootlessJamesDSP Length of output: 21634 🏁 Script executed: # Read the SettingsAudioFormatFragment to find the change listener and applyBufferSizeRange method
cat -n ./app/src/main/java/me/timschneeberger/rootlessjamesdsp/fragment/settings/SettingsAudioFormatFragment.ktRepository: JSJ-Experiments/RootlessJamesDSP Length of output: 8635 UI allows selecting invalid buffer sizes when "Allow low buffer sizes" is disabled. The seekbar is configured with The ♻️ Update applyBufferSizeRange() to dynamically set seekbar minimumprivate fun applyBufferSizeRange(allowLow: Boolean) {
val minValue = if (allowLow) {
Constants.AUDIO_BUFFER_MIN_LOW.toFloat()
} else {
Constants.AUDIO_BUFFER_MIN_DEFAULT.toFloat()
}
bufferSize?.setMin(minValue)
val currentValue = preferences.get<Float>(R.string.key_audioformat_buffersize)
if(currentValue < minValue) {
bufferSize?.setValue(minValue)
context?.sendLocalBroadcast(Intent(Constants.ACTION_SERVICE_HARD_REBOOT_CORE))
}
}🤖 Prompt for AI Agents |
||
| <me.timschneeberger.rootlessjamesdsp.preference.MaterialSwitchPreference | ||
| android:key="@string/key_audioformat_allow_low_samples" | ||
| android:defaultValue="@bool/default_audioformat_allow_low_samples" | ||
| android:title="@string/audio_format_allow_low_samples" | ||
| android:summary="@string/audio_format_allow_low_samples_summary" | ||
| app:iconSpaceReserved="false" /> | ||
| </PreferenceCategory> | ||
|
|
||
| <PreferenceCategory | ||
|
|
@@ -73,4 +79,4 @@ | |
| app:iconSpaceReserved="false"/> | ||
|
|
||
| </PreferenceCategory> | ||
| </PreferenceScreen> | ||
| </PreferenceScreen> | ||
Uh oh!
There was an error while loading. Please reload this page.