修改图片

This commit is contained in:
2025-11-03 18:34:07 +08:00
parent f5377127ce
commit 520bc8e1bb
25 changed files with 159 additions and 0 deletions

6
.idea/AndroidProjectSystem.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AndroidProjectSystem">
<option name="providerId" value="com.android.tools.idea.GradleProjectSystem" />
</component>
</project>

10
.idea/deploymentTargetSelector.xml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="deploymentTargetSelector">
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
</SelectionState>
</selectionStates>
</component>
</project>

17
.idea/runConfigurations.xml generated Normal file
View File

@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RunConfigurationProducerService">
<option name="ignoredProducers">
<set>
<option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" />
<option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" />
<option value="com.intellij.execution.junit.PatternConfigurationProducer" />
<option value="com.intellij.execution.junit.TestInClassConfigurationProducer" />
<option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" />
<option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" />
<option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" />
</set>
</option>
</component>
</project>

6
.idea/vcs.xml generated Normal file
View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

View File

@@ -0,0 +1,77 @@
package com.xscm.moduleutil.rtc;
import java.util.HashMap;
import java.util.Map;
/**
* com.xscm.moduleutil.rtc
* qx
* 2025/11/3
* 声网声音管理类
*/
public class VolumeManager {
private static VolumeManager instance;
private Map<String, Integer> userMusicVolumeMap = new HashMap<>();
private Map<String, Integer> userPlayoutVolumeMap = new HashMap<>();
private Map<String, Boolean> userPlayoutBzMap = new HashMap<>();
private String currentUserId;
private VolumeManager() {}
public static VolumeManager getInstance() {
if (instance == null) {
synchronized (VolumeManager.class) {
if (instance == null) {
instance = new VolumeManager();
}
}
}
return instance;
}
public void setCurrentUserId(String userId) {
this.currentUserId = userId;
}
public void saveCurrentVolumes(int musicVolume, int playoutVolume) {
if (currentUserId != null) {
userMusicVolumeMap.put(currentUserId, musicVolume);
userPlayoutVolumeMap.put(currentUserId, playoutVolume);
}
}
public void clearCurrentVolumes() {
if (currentUserId != null) {
userMusicVolumeMap.remove(currentUserId);
userPlayoutVolumeMap.remove(currentUserId);
}
userPlayoutBzMap.clear();
}
public void saveBz(String userId, boolean bz){
userPlayoutBzMap.clear();
userPlayoutBzMap.put(userId, bz);
}
public boolean getBz(String userId){
Boolean bz = userPlayoutBzMap.get(userId);
if (bz == null) {
bz = true; // 默认值原唱 false 伴奏
}
return bz;
}
public int[] getUserVolumes(String userId) {
Integer musicVolume = userMusicVolumeMap.get(userId);
Integer playoutVolume = userPlayoutVolumeMap.get(userId);
if (musicVolume == null) {
musicVolume = 100; // 默认值
}
if (playoutVolume == null) {
playoutVolume = 50; // 默认值
}
return new int[]{musicVolume, playoutVolume};
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 858 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 738 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 556 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 692 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 646 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@@ -0,0 +1,26 @@
package com.example.moduletablayout;
import android.content.Context;
import androidx.test.platform.app.InstrumentationRegistry;
import androidx.test.ext.junit.runners.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();
assertEquals("com.example.moduletablayout", appContext.getPackageName());
}
}

View File

@@ -0,0 +1,17 @@
package com.example.moduletablayout;
import org.junit.Test;
import static org.junit.Assert.*;
/**
* Example local unit test, which will execute on the development machine (host).
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
public class ExampleUnitTest {
@Test
public void addition_isCorrect() {
assertEquals(4, 2 + 2);
}
}