We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b7b0f13 commit 2e2892aCopy full SHA for 2e2892a
firebase-vertexai/src/main/kotlin/com/google/firebase/vertexai/type/AudioHelper.kt
@@ -74,6 +74,8 @@ internal class AudioHelper(
74
if (released) return
75
if (data.isEmpty()) return
76
77
+ if (playbackTrack.playState == AudioTrack.PLAYSTATE_STOPPED) playbackTrack.play()
78
+
79
val result = playbackTrack.write(data, 0, data.size)
80
if (result > 0) return
81
if (result == 0) {
@@ -176,8 +178,6 @@ internal class AudioHelper(
176
178
AudioManager.AUDIO_SESSION_ID_GENERATE
177
179
)
180
- playbackTrack.play()
-
181
val bufferSize =
182
AudioRecord.getMinBufferSize(
183
16000,
0 commit comments