stable decoder

This commit is contained in:
Alexey Kuznetsov 2019-07-05 20:45:14 +03:00
commit fcb66ecdf2
3 changed files with 8 additions and 12 deletions

View file

@ -53,6 +53,6 @@ android {
dependencies {
testImplementation 'junit:junit:4.12'
implementation 'com.github.axet:android-audio-library:1.0.164' // implementation project(':android-audio-library')
implementation 'com.github.axet:android-audio-library:1.0.165' // implementation project(':android-audio-library')
assets('com.google.android.exoplayer:exoplayer:2.7.3') { exclude group: 'com.android.support' }
}

View file

@ -101,20 +101,17 @@ public class SettingsActivity extends AppCompatSettingsThemeActivity implements
public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {
super.onSharedPreferenceChanged(sharedPreferences, key);
if (key.equals(AudioApplication.PREFERENCE_CONTROLS)) {
if (sharedPreferences.getBoolean(AudioApplication.PREFERENCE_CONTROLS, false)) {
if (sharedPreferences.getBoolean(AudioApplication.PREFERENCE_CONTROLS, false))
RecordingService.start(this);
} else {
RecordingService.stopService(this);
}
else
RecordingService.stop(this);
}
if (key.equals(AudioApplication.PREFERENCE_STORAGE)) {
if (key.equals(AudioApplication.PREFERENCE_STORAGE))
storage.migrateLocalStorageDialog(this);
}
if (key.equals(AudioApplication.PREFERENCE_RATE)) {
int sampleRate = Integer.parseInt(sharedPreferences.getString(AudioApplication.PREFERENCE_RATE, ""));
if (sampleRate != Sound.getValidRecordRate(Sound.getInMode(this), sampleRate)) {
if (sampleRate != Sound.getValidRecordRate(Sound.getInMode(this), sampleRate))
Toast.Error(this, "Not supported Hz");
}
}
}

View file

@ -102,10 +102,10 @@ public class RecordingService extends PersistentService {
start(context);
return;
}
stopService(context);
stop(context);
}
public static void stopService(Context context) {
public static void stop(Context context) {
stop(context, new Intent(context, RecordingService.class));
}
@ -126,7 +126,6 @@ public class RecordingService extends PersistentService {
}
};
optimization.create();
storage = new Storage(this);
}