交友小黑屋礼物价格1,酒吧房性别,vap mp4播放声音设置0.04f。
This commit is contained in:
@@ -219,11 +219,11 @@ class RoomPrivateFragment(var mRoomInfoResp: RoomInfoResp?) :
|
|||||||
// 设置 padding(左、上、右、下)
|
// 设置 padding(左、上、右、下)
|
||||||
itemImage.setPadding(paddingPx, paddingPx, paddingPx, paddingPx)
|
itemImage.setPadding(paddingPx, paddingPx, paddingPx, paddingPx)
|
||||||
itemImage.tag = showList[0].gift_id
|
itemImage.tag = showList[0].gift_id
|
||||||
Glide.with(itemImage!!)
|
Glide.with(itemImage)
|
||||||
.load(showList[0].base_image)
|
.load(showList[0].base_image)
|
||||||
.into(itemImage)
|
.into(itemImage)
|
||||||
itemImage.visibility = View.VISIBLE
|
itemImage.visibility = View.VISIBLE
|
||||||
giftTViewList[idx].visibility = View.INVISIBLE
|
giftTViewList[idx].visibility = View.VISIBLE
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressLint("SetTextI18n")
|
@SuppressLint("SetTextI18n")
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ class RoomPubWheatView : BaseWheatView {
|
|||||||
|
|
||||||
private var iv_tag_type: ImageView? = null
|
private var iv_tag_type: ImageView? = null
|
||||||
var iv_custom_gift: ImageView? = null
|
var iv_custom_gift: ImageView? = null
|
||||||
|
var iv_shutup: ImageView? = null
|
||||||
private var hostTv: TextView? = null
|
private var hostTv: TextView? = null
|
||||||
private var tv_time: TextView? = null
|
private var tv_time: TextView? = null
|
||||||
private var ll_bottom: LinearLayout? = null
|
private var ll_bottom: LinearLayout? = null
|
||||||
@@ -64,6 +65,7 @@ class RoomPubWheatView : BaseWheatView {
|
|||||||
ivYueT = findViewById(R.id.iv_yue_t)
|
ivYueT = findViewById(R.id.iv_yue_t)
|
||||||
ivLiaoT = findViewById(R.id.iv_liao_t)
|
ivLiaoT = findViewById(R.id.iv_liao_t)
|
||||||
iv_gift = findViewById(R.id.iv_gift)
|
iv_gift = findViewById(R.id.iv_gift)
|
||||||
|
iv_shutup = findViewById(R.id.iv_shutup)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,6 +88,7 @@ class RoomPubWheatView : BaseWheatView {
|
|||||||
tv_time?.visibility = View.INVISIBLE
|
tv_time?.visibility = View.INVISIBLE
|
||||||
ll_bottom?.visibility = View.INVISIBLE
|
ll_bottom?.visibility = View.INVISIBLE
|
||||||
iv_custom_gift?.visibility = View.GONE
|
iv_custom_gift?.visibility = View.GONE
|
||||||
|
iv_shutup?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
"10" -> {
|
"10" -> {
|
||||||
@@ -94,12 +97,14 @@ class RoomPubWheatView : BaseWheatView {
|
|||||||
tv_time?.visibility = View.INVISIBLE
|
tv_time?.visibility = View.INVISIBLE
|
||||||
ll_bottom?.visibility = View.INVISIBLE
|
ll_bottom?.visibility = View.INVISIBLE
|
||||||
iv_custom_gift?.visibility = View.GONE
|
iv_custom_gift?.visibility = View.GONE
|
||||||
|
iv_shutup?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
else -> {
|
else -> {
|
||||||
tv_time?.visibility = View.INVISIBLE
|
tv_time?.visibility = View.INVISIBLE
|
||||||
ll_bottom?.visibility = View.INVISIBLE
|
ll_bottom?.visibility = View.INVISIBLE
|
||||||
iv_custom_gift?.visibility = View.GONE
|
iv_custom_gift?.visibility = View.GONE
|
||||||
|
iv_shutup?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -142,6 +147,8 @@ class RoomPubWheatView : BaseWheatView {
|
|||||||
tv_time?.text = "00:00"
|
tv_time?.text = "00:00"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
iv_shutup?.setImageResource(if (bean.sex == "1") R.mipmap.icon_sex_1 else R.mipmap.icon_sex_0)
|
||||||
|
iv_shutup?.visibility = View.VISIBLE
|
||||||
if (TextUtils.isEmpty(bean.dress)) {
|
if (TextUtils.isEmpty(bean.dress)) {
|
||||||
mIvFrame.stopAll()
|
mIvFrame.stopAll()
|
||||||
mIvFrame.visibility = INVISIBLE
|
mIvFrame.visibility = INVISIBLE
|
||||||
@@ -153,7 +160,13 @@ class RoomPubWheatView : BaseWheatView {
|
|||||||
|
|
||||||
private val pitNumberText: String
|
private val pitNumberText: String
|
||||||
get() {
|
get() {
|
||||||
return pitNumber+"号麦"
|
return if (pitNumber == "9") {
|
||||||
|
""
|
||||||
|
} else if (pitNumber == "10") {
|
||||||
|
""
|
||||||
|
}else{
|
||||||
|
pitNumber+"号麦"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun handleOffState(bean: RoomPitBean) {
|
private fun handleOffState(bean: RoomPitBean) {
|
||||||
@@ -165,6 +178,7 @@ class RoomPubWheatView : BaseWheatView {
|
|||||||
mIvFrame.stopAll()
|
mIvFrame.stopAll()
|
||||||
mIvFrame.visibility = GONE
|
mIvFrame.visibility = GONE
|
||||||
mIvRipple.visibility = GONE
|
mIvRipple.visibility = GONE
|
||||||
|
iv_shutup?.visibility = View.GONE
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun stopAndClearAnimation() {
|
private fun stopAndClearAnimation() {
|
||||||
|
|||||||
@@ -145,21 +145,21 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintGuide_percent="0.66" />
|
app:layout_constraintGuide_percent="0.6" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/guide_line_h_4"
|
android:id="@+id/guide_line_h_4"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintGuide_percent="0.78" />
|
app:layout_constraintGuide_percent="0.72" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.Guideline
|
<androidx.constraintlayout.widget.Guideline
|
||||||
android:id="@+id/guide_line_h_5"
|
android:id="@+id/guide_line_h_5"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal"
|
android:orientation="horizontal"
|
||||||
app:layout_constraintGuide_percent="0.89" />
|
app:layout_constraintGuide_percent="0.82" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/iv_gift_1"
|
android:id="@+id/iv_gift_1"
|
||||||
|
|||||||
@@ -145,23 +145,25 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"/>
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
<!-- 麦克风状态 - 头像框右下角 -->
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_shutup"
|
||||||
|
android:layout_width="@dimen/dp_12"
|
||||||
|
android:layout_height="@dimen/dp_12"
|
||||||
|
android:layout_marginEnd="@dimen/dp_3"
|
||||||
|
android:layout_marginBottom="@dimen/dp_3"
|
||||||
|
android:src="@mipmap/room_microphone_off"
|
||||||
|
android:visibility="gone"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/riv"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/riv"
|
||||||
|
app:layout_goneMarginBottom="@dimen/dp_10"
|
||||||
|
app:layout_goneMarginEnd="@dimen/dp_10"
|
||||||
|
tools:visibility="visible" />
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
<!-- 麦克风状态 - 头像框右下角 -->
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/iv_shutup"
|
|
||||||
android:layout_width="@dimen/dp_16"
|
|
||||||
android:layout_height="@dimen/dp_16"
|
|
||||||
android:layout_marginEnd="@dimen/dp_2"
|
|
||||||
android:layout_marginBottom="@dimen/dp_2"
|
|
||||||
android:src="@mipmap/room_microphone_off"
|
|
||||||
android:visibility="gone"
|
|
||||||
app:layout_constraintBottom_toTopOf="@id/tv_name"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_goneMarginBottom="@dimen/dp_10"
|
|
||||||
app:layout_goneMarginEnd="@dimen/dp_10"
|
|
||||||
tools:visibility="visible" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
BIN
MainModule/src/main/res/mipmap-hdpi/icon_sex_0.png
Normal file
BIN
MainModule/src/main/res/mipmap-hdpi/icon_sex_0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 631 B |
BIN
MainModule/src/main/res/mipmap-hdpi/icon_sex_1.png
Normal file
BIN
MainModule/src/main/res/mipmap-hdpi/icon_sex_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 624 B |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_sex_0.png
Normal file
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_sex_0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 770 B |
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_sex_1.png
Normal file
BIN
MainModule/src/main/res/mipmap-xhdpi/icon_sex_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 768 B |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_sex_0.png
Normal file
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_sex_0.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_sex_1.png
Normal file
BIN
MainModule/src/main/res/mipmap-xxhdpi/icon_sex_1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
@@ -99,6 +99,12 @@ class AudioPlayer(val player: AnimPlayer) {
|
|||||||
val bufferSize = AudioTrack.getMinBufferSize(sampleRate, channelConfig, AudioFormat.ENCODING_PCM_16BIT)
|
val bufferSize = AudioTrack.getMinBufferSize(sampleRate, channelConfig, AudioFormat.ENCODING_PCM_16BIT)
|
||||||
val audioTrack = AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, channelConfig, AudioFormat.ENCODING_PCM_16BIT, bufferSize, AudioTrack.MODE_STREAM)
|
val audioTrack = AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, channelConfig, AudioFormat.ENCODING_PCM_16BIT, bufferSize, AudioTrack.MODE_STREAM)
|
||||||
this.audioTrack = audioTrack
|
this.audioTrack = audioTrack
|
||||||
|
|
||||||
|
// 2. 同步更新 AudioTrack 的音量(核心:调用 setStereoVolume)
|
||||||
|
audioTrack.takeIf { it.state == AudioTrack.STATE_INITIALIZED }?.apply {
|
||||||
|
// 左右声道设为相同值,兼容单/双声道场景
|
||||||
|
setStereoVolume(0.04f, 0.04f)
|
||||||
|
}
|
||||||
val state = audioTrack.state
|
val state = audioTrack.state
|
||||||
if (state != AudioTrack.STATE_INITIALIZED) {
|
if (state != AudioTrack.STATE_INITIALIZED) {
|
||||||
release()
|
release()
|
||||||
|
|||||||
Reference in New Issue
Block a user