Skip to content

Commit 4686d06

Browse files
committed
修改demo中对讲调用
Change-Id: Ie33e916efa760049ccf979abb4dca56fe46d40c1
1 parent 22fae34 commit 4686d06

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

sdkdemo/src/main/java/com/tencent/iot/explorer/link/demo/video/preview/VideoPreviewActivity.kt

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,11 @@ class VideoPreviewActivity : VideoBaseActivity(), EventView, TextureView.Surface
140140
presenter.getEventsData(Date())
141141
tv_event_status.visibility = View.VISIBLE
142142
tv_event_status.setText(R.string.loading)
143-
// audioRecordUtil = AudioRecordUtil(this, "${it.productId}/${presenter.getDeviceName()}", 16000, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT)
143+
audioRecordUtil = AudioRecordUtil(this, "${it.productId}/${presenter.getDeviceName()}", 16000, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT)
144144
// //变调可以传入pitch参数
145145
// audioRecordUtil = AudioRecordUtil(this, "${it.productId}/${presenter.getDeviceName()}", 16000, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, -6)
146146
// 变调可以传入pitch参数
147-
audioRecordUtil = AudioRecordUtil(this, "${it.productId}/${presenter.getDeviceName()}", 16000, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, 0, this)
147+
// audioRecordUtil = AudioRecordUtil(this, "${it.productId}/${presenter.getDeviceName()}", 16000, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, 0, this)
148148
audioRecordUtil.recordSpeakFlv(true)
149149
}
150150

@@ -445,7 +445,7 @@ class VideoPreviewActivity : VideoBaseActivity(), EventView, TextureView.Surface
445445
layout_video_preview?.addView(v_preview, 0)
446446

447447
player = IjkMediaPlayer()
448-
player._setApmStatus(true)
448+
// player._setApmStatus(true)
449449
player?.let {
450450
val url = urlPrefix + suffix
451451
it.reset()
@@ -593,7 +593,7 @@ class VideoPreviewActivity : VideoBaseActivity(), EventView, TextureView.Surface
593593
CommonUtils.refreshVideoList(this@VideoPreviewActivity, filePath)
594594
}
595595

596-
player?._setApmStatus(false);
596+
// player?._setApmStatus(false);
597597
player?.release()
598598

599599
countDownLatchs.clear()
@@ -737,14 +737,14 @@ class VideoPreviewActivity : VideoBaseActivity(), EventView, TextureView.Surface
737737
}
738738

739739
override fun onReadPlayerPcmByte(): ByteArray? {
740-
val data = ByteArray(10240)
741-
val len = player._getPcmData(data)
742-
return if (len > 0) {
743-
val playerBytes = ByteArray(len)
744-
System.arraycopy(data, 0, playerBytes, 0, len);
745-
playerBytes
746-
} else {
747-
null
748-
}
740+
// val data = ByteArray(10240)
741+
// val len = player._getPcmData(data)
742+
// return if (len > 0) {
743+
// val playerBytes = ByteArray(len)
744+
// System.arraycopy(data, 0, playerBytes, 0, len);
745+
// playerBytes
746+
// } else {
747+
return null
748+
// }
749749
}
750750
}

0 commit comments

Comments
 (0)