This commit is contained in:
isp
2024-09-12 22:25:39 -06:00
parent da7f342994
commit f47afb1aa2
2 changed files with 3 additions and 3 deletions

1
.idea/.name generated Normal file
View File

@@ -0,0 +1 @@
identify

View File

@@ -62,9 +62,8 @@ class SoundRecorder(
) )
audioRecord.startRecording() audioRecord.startRecording()
val thread = Thread { val thread = Thread {
var num_interactions = 0
var last_tstamp: Long = Instant.now().toEpochMilli() var last_tstamp: Long = Instant.now().toEpochMilli()
while (true) { while (true) {
if (Thread.interrupted()) { if (Thread.interrupted()) {
@@ -81,7 +80,7 @@ class SoundRecorder(
) )
chunk_index += 1; chunk_index += 1;
if (last_tstamp in MessageSender.messageLog) { if ((last_tstamp in MessageSender.messageLog) || (num_interactions == 0)) {
var tstamp: Long = Instant.now().toEpochMilli() var tstamp: Long = Instant.now().toEpochMilli()
val tstamp_buffer = ByteBuffer.allocate(Long.SIZE_BYTES) val tstamp_buffer = ByteBuffer.allocate(Long.SIZE_BYTES)
val tstamp_bytes = tstamp_buffer.putLong(tstamp).array() val tstamp_bytes = tstamp_buffer.putLong(tstamp).array()