Files
GameOfMoon/Audio/scripts/create_placeholder_audio.sh
Rocky 514ed09825 首次提交: 时间囚笼游戏完整版本
- 实现了完整的Android游戏框架 (Kotlin + Jetpack Compose)
- 科技暗黑风格UI设计与终端风格界面组件
- 完整的故事系统 (主线+支线剧情)
- 固定底部操作区布局,解决选择按钮可见性问题
- 集成Gemini AI智能对话支持
- 游戏状态管理与存档系统
- 动态天气系统与角色状态跟踪
- 支持离线游戏,兼容Android 11+
2025-08-22 10:07:03 -07:00

80 lines
2.8 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/bash
# 创建占位音频文件用于测试
# 这些是无声的音频文件,确保系统可以正常加载
echo "🎵 创建占位音频文件..."
TARGET_DIR="app/src/main/res/raw"
mkdir -p "$TARGET_DIR"
# 创建无声音频文件函数 (使用ffmpeg)
create_silent_audio() {
local filename=$1
local duration=$2
local description=$3
echo "📄 创建: $filename ($description) - ${duration}"
# 检查是否有ffmpeg
if command -v ffmpeg &> /dev/null; then
ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono -t $duration -q:a 9 -acodec mp3 "$TARGET_DIR/$filename" -y 2>/dev/null
if [ $? -eq 0 ]; then
echo "✅ 已创建: $filename"
else
echo "❌ 创建失败: $filename"
fi
else
# 如果没有ffmpeg创建一个空文件作为占位符
touch "$TARGET_DIR/$filename"
echo "⚠️ 创建空文件: $filename (需要替换为真实音频)"
fi
}
echo ""
echo "🎼 创建背景音乐占位符..."
create_silent_audio "ambient_mystery.mp3" 120 "神秘氛围音乐"
create_silent_audio "electronic_tension.mp3" 90 "电子紧张音乐"
create_silent_audio "orchestral_revelation.mp3" 150 "管弦乐启示"
create_silent_audio "epic_finale.mp3" 180 "史诗终章"
echo ""
echo "🌟 创建环境音效占位符..."
create_silent_audio "ventilation_soft.mp3" 30 "通风系统音效"
create_silent_audio "heart_monitor.mp3" 15 "心率监控音效"
create_silent_audio "reactor_hum.mp3" 45 "反应堆嗡鸣"
create_silent_audio "space_silence.mp3" 60 "太空寂静"
echo ""
echo "⛈️ 创建天气音效占位符..."
create_silent_audio "wind_gentle.mp3" 30 "微风音效"
create_silent_audio "rain_light.mp3" 45 "小雨音效"
create_silent_audio "storm_cyber.mp3" 30 "电子风暴"
create_silent_audio "solar_storm.mp3" 30 "太阳风暴"
echo ""
echo "🔘 创建UI音效占位符..."
create_silent_audio "button_click.mp3" 0.5 "按钮点击音效"
create_silent_audio "notification_beep.mp3" 1 "通知提示音效"
create_silent_audio "error_alert.mp3" 2 "错误警报音效"
echo ""
echo "🎭 创建事件音效占位符..."
create_silent_audio "discovery_chime.mp3" 2 "发现音效"
create_silent_audio "time_distortion.mp3" 3 "时间扭曲音效"
create_silent_audio "oxygen_leak_alert.mp3" 3 "氧气泄漏警报"
echo ""
echo "✅ 占位音频文件创建完成!"
echo ""
echo "📂 文件位置: $TARGET_DIR"
echo "📋 已创建 18 个占位音频文件"
echo ""
echo "🚀 现在你可以:"
echo " 1. 编译并测试音频系统: ./gradlew assembleDebug"
echo " 2. 稍后使用真实音频文件替换这些占位符"
echo " 3. 使用 ./audio_rename.sh 自动替换下载的音频"
echo ""
echo "💡 提示: 占位符是无声的,用于测试系统功能。"
echo " 下载真实音频后,音频体验会更好!"