use of com.waz.api.AudioAssetForUpload in project wire-android by wireapp.
the class VoiceFilterController method approveAudio.
public void approveAudio() {
if (audioAssetForUpload == null) {
originalRecording.applyEffect(AudioEffect.NONE, new Asset.LoadCallback<AudioAssetForUpload>() {
@Override
public void onLoaded(AudioAssetForUpload audioAssetForUpload) {
VoiceFilterController.this.audioAssetForUpload = audioAssetForUpload;
approveAudio();
}
@Override
public void onLoadFailed() {
VoiceFilterController.this.audioAssetForUpload = originalRecording;
approveAudio();
}
});
return;
}
AudioAssetForUpload sendAudio = audioAssetForUpload;
/*
Null it to make it is not deleted during tearDown()...
*/
audioAssetForUpload = null;
for (RecordingObserver recordingObserver : recordingObservers) {
recordingObserver.sendRecording(sendAudio, appliedAudioEffect);
}
}
Aggregations