Commit cb2f21ad authored by mistermad's avatar mistermad

- Added "undo" button in Elicitation mode

- Modifying existing "undo" buttons to ImageButton
- Support phone screens in Elicitation mode
- Added a heading in the summary of segments of the mode Respeaking and Translating
- Logs will only work in debug mode
parent 132407ab
......@@ -6,11 +6,11 @@ android {
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "org.getalp.ligaikuma"
minSdkVersion 16
minSdkVersion 14
targetSdkVersion 25
multiDexEnabled = true
versionCode 1
versionName "1.0"
versionCode 2
versionName "2.0"
//testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
......
......@@ -49,7 +49,6 @@ public class Aikuma extends android.app.Application {
private static SharedPreferences preferences;
private static List<Language> languages;
public static Context appContext = null;
/**
......
......@@ -45,6 +45,7 @@ import com.google.android.gms.common.GooglePlayServicesUtil;
import com.musicg.wave.Wave;
import org.apache.commons.io.FileUtils;
import org.getalp.ligaikuma.lig_aikuma.lig_aikuma.BuildConfig;
import org.getalp.ligaikuma.lig_aikuma.lig_aikuma.R;
import org.getalp.ligaikuma.lig_aikuma.model.Recording;
import org.getalp.ligaikuma.lig_aikuma.service.GoogleCloudService;
......@@ -108,7 +109,7 @@ public class MainActivity extends ListActivity {
googleAuthToken = settings.getString(AikumaSettings.SETTING_AUTH_TOKEN_KEY, null);
googleIdToken = settings.getString(AikumaSettings.SETTING_ID_TOKEN_KEY, null);
googleAPIScope = AikumaSettings.getScope();
Log.i(TAG, "Account: " + emailAccount + ", scope: " + googleAPIScope);
if(BuildConfig.DEBUG)Log.i(TAG, "Account: " + emailAccount + ", scope: " + googleAPIScope);
AikumaSettings.setUserId(emailAccount);
showUserAccount(emailAccount, null);
......@@ -158,7 +159,7 @@ public class MainActivity extends ListActivity {
try {
updateRecordingView(Recording.read(verName, ownerId, recordingId));
} catch (IOException e) {
Log.e(TAG, e.getMessage());
if(BuildConfig.DEBUG)Log.e(TAG, e.getMessage());
}
}
}
......@@ -169,7 +170,7 @@ public class MainActivity extends ListActivity {
try {
Recording.indexAll();
} catch (IOException e) {
Log.e(TAG, e.getMessage());
if(BuildConfig.DEBUG)Log.e(TAG, e.getMessage());
}
//TODO: Update existing files
......@@ -204,7 +205,7 @@ public class MainActivity extends ListActivity {
super.onResume();
List<Recording> recordings = Recording.readAll();
Log.i(TAG, "num: " +recordings.size());
if(BuildConfig.DEBUG)Log.i(TAG, "num: " +recordings.size());
// Filter the recordings for originals
originals = new ArrayList<Recording>();
......@@ -213,7 +214,7 @@ public class MainActivity extends ListActivity {
originals.add(recording);
}
}
Log.i(TAG, "original num: " + originals.size());
if(BuildConfig.DEBUG)Log.i(TAG, "original num: " + originals.size());
adapter = new RecordingArrayAdapter(this, originals);
/*
......@@ -221,9 +222,8 @@ public class MainActivity extends ListActivity {
adapter.getFilter().filter(searchView.getQuery());
}*/
setListAdapter(adapter);
if (listViewState != null) {
if (listViewState != null)
getListView().onRestoreInstanceState(listViewState);
}
MainActivity.locationDetector.start();
}
......@@ -269,7 +269,7 @@ public class MainActivity extends ListActivity {
private void checkDate() {
Calendar calendar = Calendar.getInstance();
int year = calendar.get(Calendar.YEAR);
Log.i(TAG, "year: " + year);
if(BuildConfig.DEBUG)Log.i(TAG, "year: " + year);
if(year < 2000) {
new AlertDialog.Builder(this)
.setTitle("Set the current date correctly")
......@@ -293,8 +293,7 @@ public class MainActivity extends ListActivity {
* @param message String to display
*/
public void showProgressDialog(String message) {
progressDialog =
ProgressDialog.show(this, "Update", message);
progressDialog = ProgressDialog.show(this, "Update", message);
}
/**
......@@ -321,10 +320,7 @@ public class MainActivity extends ListActivity {
public void showUserAccount(String userId, String token) {
TextView userIdView = (TextView) findViewById(R.id.userIdView);
if(userId != null) {
if(token != null)
userIdView.setTextColor(Color.BLACK);
else
userIdView.setTextColor(Color.GRAY);
userIdView.setTextColor((token != null)?Color.BLACK:Color.GRAY);
userIdView.setText(userId);
} else {
userIdView.setText("");
......@@ -356,7 +352,6 @@ public class MainActivity extends ListActivity {
new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
// TODO Auto-generated method stub
if(!hasFocus) {
searchMenuItem.collapseActionView();
//searchView.setQuery("", false);
......@@ -369,7 +364,6 @@ public class MainActivity extends ListActivity {
new SearchView.OnQueryTextListener() {
@Override
public boolean onQueryTextSubmit(String query) {
// TODO Auto-generated method stub
adapter.getFilter().filter(query);
searchView.clearFocus();
return true;
......@@ -377,7 +371,6 @@ public class MainActivity extends ListActivity {
@Override
public boolean onQueryTextChange(String newText) {
// TODO Auto-generated method stub
adapter.getFilter().filter(newText);
return true;
}
......@@ -402,7 +395,7 @@ public class MainActivity extends ListActivity {
AikumaSettings.getCurrentUserId());
syncIntent.putExtra(GoogleCloudService.TOKEN_KEY,
AikumaSettings.getCurrentUserToken());
syncIntent.putExtra("forceSync", forceSync);
syncIntent.putExtra("forceSync", true);
startService(syncIntent);
}
} else {
......@@ -454,7 +447,7 @@ public class MainActivity extends ListActivity {
public void getAccountToken() {
int statusCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if (statusCode == ConnectionResult.SUCCESS) {
Log.i(TAG, "getAccountToken");
if(BuildConfig.DEBUG)Log.i(TAG, "getAccountToken");
//TODO: Sign-out, Sign-in with other accounts
if(AikumaSettings.getCurrentUserId() == null)
......@@ -507,8 +500,7 @@ public class MainActivity extends ListActivity {
AikumaSettings.setUserId(emailAccount);
showUserAccount(emailAccount, null);
menuBehaviour.setSignInState(true);
settings.edit().putString(
AikumaSettings.SETTING_OWNER_ID_KEY, emailAccount).commit();
settings.edit().putString(AikumaSettings.SETTING_OWNER_ID_KEY, emailAccount).commit();
if (Aikuma.isDeviceOnline()) {
new GetTokenTask(emailAccount, googleAPIScope,
......@@ -623,12 +615,11 @@ public class MainActivity extends ListActivity {
AikumaSettings.setUserToken(googleAuthToken);
AikumaSettings.setUserIdToken(googleIdToken);
} catch (IOException e) {
// TODO Auto-generated catch block
Log.e(TAG, e.getMessage());
if(BuildConfig.DEBUG)Log.e(TAG, e.getMessage());
return false;
}
Log.i(TAG, "access token: " + googleAuthToken);
Log.i(TAG, "identity token: " + googleIdToken);
if(BuildConfig.DEBUG)Log.i(TAG, "access token: " + googleAuthToken);
if(BuildConfig.DEBUG)Log.i(TAG, "identity token: " + googleIdToken);
return true;
}
......@@ -659,7 +650,7 @@ public class MainActivity extends ListActivity {
// Show the user some UI through the activity.
handleException(userRecoverableException);
} catch (GoogleAuthException fatalException) {
Log.e(TAG, "Unrecoverable error " + fatalException.getMessage());
if(BuildConfig.DEBUG)Log.e(TAG, "Unrecoverable error " + fatalException.getMessage());
}
}
}
......@@ -736,14 +727,14 @@ public class MainActivity extends ListActivity {
builder.setTitle("Import audio file");
if(mFileList == null) {
Log.e("importfile", "Showing file picker before loading the file list");
if(BuildConfig.DEBUG)Log.e("importfile", "Showing file picker before loading the file list");
dialog = builder.create();
return dialog;
}
builder.setItems(mFileList, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
mChosenFile = mFileList[which];
Log.i("importfile", "mChosenFile: " + mChosenFile);
if(BuildConfig.DEBUG)Log.i("importfile", "mChosenFile: " + mChosenFile);
mPath = new File(mPath, mChosenFile);
if (mPath.isDirectory()) {
loadFileList(mPath, ".wav");
......
......@@ -9,6 +9,7 @@ import java.util.Locale;
import java.util.Map;
import java.util.Random;
import org.getalp.ligaikuma.lig_aikuma.lig_aikuma.BuildConfig;
import org.getalp.ligaikuma.lig_aikuma.lig_aikuma.R;
import org.getalp.ligaikuma.lig_aikuma.model.Language;
import org.getalp.ligaikuma.lig_aikuma.model.RecordingLig;
......@@ -28,7 +29,6 @@ import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
//import android.support.v4.app.DialogFragment
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
......@@ -63,13 +63,13 @@ public class ModeSelection extends Activity implements OnClickListener{
if(AikumaSettings.getCurrentUserId() == null) {
Random r = new Random();
AikumaSettings.setUserId(Integer.toString(r.nextInt()));
Log.i(TAG, AikumaSettings.getCurrentUserId());
if(BuildConfig.DEBUG)Log.i(TAG, AikumaSettings.getCurrentUserId());
}
// DEBUG
Map<String,?> mapPrefs = settings.getAll();
for(String key : mapPrefs.keySet())
Log.i(TAG, "DEBUG - Shared Preferences - " + key + " -> " + mapPrefs.get(key));
if(BuildConfig.DEBUG)Log.i(TAG, "DEBUG - Shared Preferences - " + key + " -> " + mapPrefs.get(key));
// hides the action bar instead of removing it
// getActionBar().hide();
......@@ -101,7 +101,6 @@ public class ModeSelection extends Activity implements OnClickListener{
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
switch (v.getId()) {
// DONE add a button for respeaking and link to the corresponding activity
// DONE create a selection view with 2 buttons: one for recording and one for importing audio
......@@ -114,7 +113,7 @@ public class ModeSelection extends Activity implements OnClickListener{
// TODO then adapt the summary view to allow the edition and playing of every segment
case R.id.button_mode_respeak:
startActivity(new Intent(ModeSelection.this, RespeakingSelection.class));
Log.i(TAG, "Mode respeaking selected; view id: " + v.getId());
if(BuildConfig.DEBUG)Log.i(TAG, "Mode respeaking selected; view id: " + v.getId());
break;
case R.id.button_mode_record:
startActivity(new Intent(ModeSelection.this, RecordingMetadataLig.class));
......@@ -124,15 +123,15 @@ public class ModeSelection extends Activity implements OnClickListener{
intent.putExtra(TRANSLATE_MODE, true);
startActivity(intent);
// startActivity(new Intent(ModeSelection.this, TranslationSelection.class));
Log.i(TAG, "Mode translation selected; view id: " + v.getId());
if(BuildConfig.DEBUG)Log.i(TAG, "Mode translation selected; view id: " + v.getId());
break;
case R.id.mainElicitBtn:
startActivity(new Intent(ModeSelection.this, ElicitationMode.class));
Log.i(TAG, "Mode elicitation selected; view id: " + v.getId());
if(BuildConfig.DEBUG)Log.i(TAG, "Mode elicitation selected; view id: " + v.getId());
break;
case R.id.mainCheckBtn:
startActivity(new Intent(ModeSelection.this, CheckMode.class));
Log.i(TAG, "Mode verification selected; view id: " + v.getId());
if(BuildConfig.DEBUG)Log.i(TAG, "Mode verification selected; view id: " + v.getId());
break;
// case R.id.button_mode_slct_old_aikuma:
// startActivity(new Intent(this,MainActivity.class));
......@@ -175,30 +174,30 @@ public class ModeSelection extends Activity implements OnClickListener{
builder.setView(ll)
// .setMessage("A session has been saved, would you like to retrieve it?")
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Log.i(TAG,"yes, retrieve the session");
if(BuildConfig.DEBUG)Log.i(TAG,"yes, retrieve the session");
retrieveSession();
}
})
.setNegativeButton("No, but keep files", new DialogInterface.OnClickListener() {
.setNegativeButton(R.string.no_but_keep_files, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Log.i(TAG,"no don't retrieve the session but keep files");
if(BuildConfig.DEBUG)Log.i(TAG,"no don't retrieve the session but keep files");
prefsUserSession = getSharedPreferences(getString(R.string.userSession), MODE_PRIVATE);
//clear sharedPrefs
ed.clear();
ed.commit();
}
})
.setNeutralButton("No, and erase files", new DialogInterface.OnClickListener() {
.setNeutralButton(R.string.no_and_erase_files, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Log.i(TAG,"no don't retrieve the session and erase files");
if(BuildConfig.DEBUG)Log.i(TAG,"no don't retrieve the session and erase files");
//remove files
eraseFiles();
//clear sharedPrefs
......@@ -212,7 +211,7 @@ public class ModeSelection extends Activity implements OnClickListener{
public void retrieveSession() {
String mode = prefsUserSession.getString(getString(R.string.sessionMode), null);
Log.d(TAG, "mode retrieval: "+mode);
if(BuildConfig.DEBUG)Log.d(TAG, "mode retrieval: "+mode);
Intent intent;
if (mode.compareToIgnoreCase(CheckTranscription.TAG) == 0) {
intent = new Intent(getActivity(), CheckTranscription.class);
......@@ -243,14 +242,14 @@ public class ModeSelection extends Activity implements OnClickListener{
* ThumbRespeakActivityLig / respeaking ----------> Respeaking / null
* "" / translation ----------> Translation / null
*/
String mode = prefsUserSession.getString(getString(R.string.sessionMode), "undefined");
String submode = prefsUserSession.getString(getString(R.string.session_submode), "undefined");
String mode = prefsUserSession.getString(getString(R.string.sessionMode), getString(R.string.undefined));
String submode = prefsUserSession.getString(getString(R.string.session_submode), getString(R.string.undefined));
String modeDialog = null, submodeDialog = null;
if (mode.compareToIgnoreCase(CheckWordVariant.TAG) == 0 || mode.compareTo(CheckTranscription.TAG) == 0) {
modeDialog = "Check mode";
modeDialog = getString(R.string.check_mode);
submodeDialog = (mode.compareToIgnoreCase(CheckWordVariant.TAG) == 0) ? CheckWordVariant.TAG : CheckTranscription.TAG;
} else if (mode.compareToIgnoreCase(RecordElicitation.TAG) == 0) {
modeDialog = "Elicitation";
modeDialog = getString(R.string.elicitation);
if (submode.compareToIgnoreCase("text") == 0) { submodeDialog = "text"; }
else if (submode.compareToIgnoreCase("image") == 0) { submodeDialog = "image"; }
else if (submode.compareToIgnoreCase("video") == 0) { submodeDialog = "video"; }
......@@ -268,7 +267,7 @@ public class ModeSelection extends Activity implements OnClickListener{
// TODO parsing fails...
((TextView) ll.findViewById(R.id.session_date)).setText(new SimpleDateFormat("dd/MM/yyyy at HH:mm",Locale.FRANCE).format(date));
} catch (ParseException e) {
Log.e(TAG, ""+e);
if(BuildConfig.DEBUG)Log.e(TAG, ""+e);
((TextView) ll.findViewById(R.id.session_date)).setText(prefsUserSession.getString(getString(R.string.sessionDate), "undefined"));
}
......@@ -284,19 +283,19 @@ public class ModeSelection extends Activity implements OnClickListener{
File savedFile;
String savedMode = prefsUserSession.getString(getString(R.string.sessionMode), null);
String savedSubmode = prefsUserSession.getString(getString(R.string.session_submode), "undefined");
Log.d(TAG, "saved mode: "+savedMode);
Log.d(TAG, "saved submode: "+savedSubmode);
if(BuildConfig.DEBUG)Log.d(TAG, "saved mode: "+savedMode);
if(BuildConfig.DEBUG)Log.d(TAG, "saved submode: "+savedSubmode);
/*Check Mode*/
if (savedMode.compareToIgnoreCase(CheckWordVariant.TAG) == 0 || savedMode.compareTo(CheckTranscription.TAG) == 0) {
savedFile = new File(prefsUserSession.getString(getString(R.string.sessionCheckExportFile),"undefined"));
Log.d(TAG, "saved file: "+savedFile);
if(BuildConfig.DEBUG)Log.d(TAG, "saved file: "+savedFile);
savedFile.delete();
Log.i(TAG, "saved file erased: "+savedFile);
if(BuildConfig.DEBUG)Log.i(TAG, "saved file erased: "+savedFile);
/*Elicitation Mode*/
} else if (savedMode.compareToIgnoreCase(RecordElicitation.TAG) == 0) {
Log.d(TAG, "saved submode: "+savedSubmode);
if(BuildConfig.DEBUG)Log.d(TAG, "saved submode: "+savedSubmode);
String idDevice = Aikuma.getDeviceId();
String savedDate = prefsUserSession.getString(getString(R.string.sessionDate), "");
Language savedRecordLang = new Language(prefsUserSession.getString(getString(R.string.language_name), ""),
......@@ -305,21 +304,25 @@ public class ModeSelection extends Activity implements OnClickListener{
savedRecordLang.getCode() + "_" + idDevice;
//erase linker
File savedTextFile = new File(FileIO.getOwnerPath()+"/recordings/"+name + "/" + name + "_linker.txt");
Log.d(TAG, "saved linker file: "+savedTextFile);
if(BuildConfig.DEBUG)Log.d(TAG, "saved linker file: "+savedTextFile);
savedTextFile.delete();
Log.i(TAG, "saved file erased: "+savedTextFile);
if(BuildConfig.DEBUG)Log.i(TAG, "saved file erased: "+savedTextFile);
//erase metadata and audio files
int savedProgress = prefsUserSession.getInt(getString(R.string.currentLine), 0);
Log.d(TAG, "saved progress: "+savedProgress);
if(BuildConfig.DEBUG)Log.d(TAG, "saved progress: "+savedProgress);
for (int i=savedProgress; i>=0; i--) {
File savedMetadataFile = new File(FileIO.getOwnerPath()+"/recordings/"+name + "/" + name + "_" + i + RecordingLig.METADATA_SUFFIX);
File savedWavFile = new File(FileIO.getOwnerPath()+"/recordings/"+name + "/" + name + "_" + i +".wav");
Log.d(TAG, "saved metadata file: "+savedMetadataFile);
Log.d(TAG, "saved metadata file: "+savedWavFile);
if(BuildConfig.DEBUG) {
Log.d(TAG, "saved metadata file: " + savedMetadataFile);
Log.d(TAG, "saved metadata file: " + savedWavFile);
}
savedMetadataFile.delete();
savedWavFile.delete();
Log.i(TAG, "saved metadata file erased: "+savedMetadataFile);
Log.i(TAG, "saved audio erased: "+savedWavFile);
if(BuildConfig.DEBUG) {
Log.i(TAG, "saved metadata file erased: "+savedMetadataFile);
Log.i(TAG, "saved audio erased: "+savedWavFile);
}
}
/*Respeaking or Translating Mode*/
......
......@@ -34,8 +34,7 @@ public class Audio {
*/
public static void playThroughEarpiece(Activity activity, boolean toSetMode) {
AudioManager audioManager = getAudioManager(activity);
if(toSetMode)
audioManager.setMode(AudioManager.MODE_IN_CALL);
if(toSetMode) audioManager.setMode(AudioManager.MODE_IN_CALL);
audioManager.setSpeakerphoneOn(false);
}
......
......@@ -6,6 +6,7 @@ package org.getalp.ligaikuma.lig_aikuma.audio;
import android.util.Log;
import org.getalp.ligaikuma.lig_aikuma.lig_aikuma.BuildConfig;
import org.getalp.ligaikuma.lig_aikuma.model.Recording;
import org.getalp.ligaikuma.lig_aikuma.model.Segments;
import org.getalp.ligaikuma.lig_aikuma.model.Segments.Segment;
......@@ -191,7 +192,7 @@ public class InterleavedPlayer extends Player {
private class OriginalMarkerReachedListener extends
MarkedPlayer.OnMarkerReachedListener {
public void onMarkerReached(MarkedPlayer p) {
Log.i("release", "original onMarker reached, completedOnce = " + completedOnce);
if(BuildConfig.DEBUG)Log.i("release", "original onMarker reached, completedOnce = " + completedOnce);
original.pause();
playRespeaking();
}
......@@ -204,7 +205,7 @@ public class InterleavedPlayer extends Player {
private class RespeakingMarkerReachedListener extends
MarkedPlayer.OnMarkerReachedListener {
public void onMarkerReached(MarkedPlayer p) {
Log.i("release", "respeaking onMarker reached, completedOnce = " + completedOnce);
if(BuildConfig.DEBUG)Log.i("release", "respeaking onMarker reached, completedOnce = " + completedOnce);
respeaking.pause();
if(!completedOnce) {
advanceOriginalSegment();
......
......@@ -196,11 +196,11 @@ public class MarkedPlayer extends SimplePlayer
}
/* For later debugging
* (This is commented out because of too many logs)
Log.i(TAG, "notification marker position msec: " +
if(debug)Log.i(TAG, "notification marker position msec: " +
getNotificationMarkerPositionMsec() +
"\ngetCurentMsec(): " + getCurrentMsec());
Log.i(TAG, "notification marker position sample: " +
if(debug)Log.i(TAG, "notification marker position sample: " +
msecToSample(getNotificationMarkerPositionMsec()) +
"\ngetCurentMsec() as sample: " +
msecToSample(getCurrentMsec()));
......@@ -225,7 +225,7 @@ public class MarkedPlayer extends SimplePlayer
*/
private Thread notificationMarkerLoop;
private static final String TAG = "MarkedPlayer";
//private static final String TAG = "MarkedPlayer";
private static int count = 0;
//////////////////////////////////////////////////////////////////////////
......
......@@ -8,6 +8,7 @@ import android.media.AudioManager;
import android.media.MediaPlayer;
import android.util.Log;
import org.getalp.ligaikuma.lig_aikuma.lig_aikuma.BuildConfig;
import org.getalp.ligaikuma.lig_aikuma.model.Recording;
import java.io.File;
......@@ -40,11 +41,11 @@ public class SimplePlayer extends Player implements Sampler
setRecording(recording);
mediaPlayer = new MediaPlayer();
mediaPlayer.setAudioStreamType((playThroughSpeaker)?AudioManager.STREAM_MUSIC:AudioManager.STREAM_VOICE_CALL);
Log.i("SimplePlayer", "Media Player - data source: " + recording.getFile().getCanonicalPath());
if(BuildConfig.DEBUG)Log.i("SimplePlayer", "Media Player - data source: " + recording.getFile().getCanonicalPath());
mediaPlayer.setDataSource(recording.getFile().getCanonicalPath());
Log.i("SimplePlayer", "Media Player - preparing...");
if(BuildConfig.DEBUG)Log.i("SimplePlayer", "Media Player - preparing...");
mediaPlayer.prepare();
Log.i("SimplePlayer", "Media Player - sample rate: " + recording.getSampleRate());
if(BuildConfig.DEBUG)Log.i("SimplePlayer", "Media Player - sample rate: " + recording.getSampleRate());
setSampleRate(recording.getSampleRate());
}
......
......@@ -19,7 +19,7 @@ public interface AudioHandler {
* @param justChanged Whether the caller has just changed
* from silence to audio.
*/
public void audioTriggered(short[] buffer, boolean justChanged);
void audioTriggered(short[] buffer, boolean justChanged);
/**
* The caller has detected silent audio.
......@@ -28,5 +28,5 @@ public interface AudioHandler {
* @param justChanged Whether the caller has just changed
* from audio to silence.
*/
public void silenceTriggered(short[] buffer, boolean justChanged);
void silenceTriggered(short[] buffer, boolean justChanged);
}
......@@ -17,6 +17,6 @@ public interface AudioListener {
*
* @param buffer An array of samples.
*/
public void onBufferFull(short[] buffer);
void onBufferFull(short[] buffer);
}
......@@ -7,6 +7,7 @@ package org.getalp.ligaikuma.lig_aikuma.audio.record;
import android.util.Log;
import org.getalp.ligaikuma.lig_aikuma.audio.Sampler;
import org.getalp.ligaikuma.lig_aikuma.lig_aikuma.BuildConfig;
import org.getalp.ligaikuma.lig_aikuma.model.Recording;
import org.getalp.ligaikuma.lig_aikuma.model.Segments;
......@@ -38,8 +39,7 @@ public class Mapper {
private Long originalStartOfSegment = 0L;
private Long originalEndOfSegment;
private Long respeakingStartOfSegment = 0L;