This commit is contained in:
Alexey Kuznetsov 2017-06-19 22:38:19 +03:00
commit e1082b320f
2 changed files with 6 additions and 4 deletions

View file

@ -286,8 +286,8 @@ public class MainActivity extends AppCompatActivity {
void updateHeader() {
File f = storage.getStoragePath();
long free = storage.getFree(f);
long sec = storage.average(free);
long free = Storage.getFree(f);
long sec = Storage.average(this, free);
TextView text = (TextView) findViewById(R.id.space_left);
text.setText(MainApplication.formatFree(this, free, sec));
}

View file

@ -428,7 +428,7 @@ public class RecordingActivity extends AppCompatActivity {
}
void setState(String s) {
long free = storage.getFree(storage.getTempRecording());
long free = Storage.getFree(storage.getTempRecording());
final SharedPreferences shared = PreferenceManager.getDefaultSharedPreferences(this);
@ -647,7 +647,7 @@ public class RecordingActivity extends AppCompatActivity {
if (stableRefresh || diff >= samples) {
stableRefresh = true;
rs.write(buffer, readSize);
rs.write(buffer, 0, readSize);
short[] dbBuf;
int readSizeUpdate;
@ -672,6 +672,8 @@ public class RecordingActivity extends AppCompatActivity {
if (readSizeLen > 0) {
dbBuffer = ShortBuffer.allocate(samplesUpdateStereo);
dbBuffer.put(dbBuf, readSizeUpdate, readSizeLen);
} else {
dbBuffer = null;
}
samplesTime += samples;