You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The reason the current code didn't work was that the SharedPreferences object is empty initially, because the preferences are in the XML file. This moves them into the SharedPreferences without overwriting user settings (the last "false" in there). I have committed a change to my repository that seems to fix this, and sets VICE as default with "fast (no cycle skipping)" resampling.
I also think that registering an onsharedpreferenceschangelistener on the SharedPreferences would be better than registering listeners to the actual preferences in SettingsActivity; an implementation of settings changelistener could just call DroidSoundPlugin.setOptions(prefs).
setOption() should be marked static in Java side, because for all plugins the effect seems to be statically implemented. At the limit the native code just stores things in global variables, rather than in some structure that would correspond to the Java-side instance. Therefore marking the method static is semantically more correct. This would allow not constructing plugin instances for DroidSoundPlugin.setOptions().
On PlayerActivity's onCreate(), if getLastNonConfigurationInstance() returns something, there is no call to DroidSoundPlugin.setOptions(). This is probably incorrect. Android application lifecycle chart says that the process has been killed and is starting again when onCreate call occurs, therefore natively cached settings must be lost.
The text was updated successfully, but these errors were encountered:
I think inserting this call into PlayerActivity's onCreate() will fix it:
The reason the current code didn't work was that the SharedPreferences object is empty initially, because the preferences are in the XML file. This moves them into the SharedPreferences without overwriting user settings (the last "false" in there). I have committed a change to my repository that seems to fix this, and sets VICE as default with "fast (no cycle skipping)" resampling.
The text was updated successfully, but these errors were encountered: