Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,7 @@ internal constructor(
val receivedJson = webSession.incoming.receive().readBytes().toString(Charsets.UTF_8)
// TODO: Try to decode the json instead of string matching.
return if (receivedJson.contains("setupComplete")) {
LiveSession(
session = webSession,
backgroundDispatcher = backgroundDispatcher,
isRecording = false
)
LiveSession(session = webSession, backgroundDispatcher = backgroundDispatcher)
} else {
webSession.close()
throw GeminiConnectionHandshakeFailed()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ public class LiveSession
internal constructor(
private val session: ClientWebSocketSession?,
@Background private val backgroundDispatcher: CoroutineContext,
private var isRecording: Boolean,
private var audioHelper: AudioHelper? = null
) {

private val audioQueue = ConcurrentLinkedQueue<ByteArray>()
private val playBackQueue = ConcurrentLinkedQueue<ByteArray>()
private var startedReceiving = false
private var receiveChannel: Channel<Frame> = Channel()
private var isRecording: Boolean = false

private companion object {
val TAG = LiveSession::class.java.simpleName
Expand Down
Loading