Feature/audio system - #31
Merged
Merged
Conversation
�[38;2;145;155;170m 1�[0m �[38;2;220;223;228mオーディオシステムの実装(miniaudio + BGM/SE/3D音源)�[0m �[38;2;145;155;170m 2�[0m �[38;2;145;155;170m 3�[0m �[38;2;220;223;228m- AudioManager: miniaudio を pImpl でラップ。BGM クロスフェード(2スロット�[0m �[38;2;145;155;170m 4�[0m �[38;2;220;223;228m ping-pong)、アンビエントループ、2D/3D SE ワンショット再生に対応。�[0m �[38;2;145;155;170m 5�[0m �[38;2;220;223;228m BGM・SE・Ambient・マスターの音量を独立制御可能。�[0m �[38;2;145;155;170m 6�[0m �[38;2;220;223;228m- BiomeAudioSystem: バイオーム名(PLAINS〜AUTUMN 全9種)を BGM + アンビエント�[0m �[38;2;145;155;170m 7�[0m �[38;2;220;223;228m パスにマッピング。4秒クロスフェード、2秒デバウンスでフレームごとに更新。�[0m �[38;2;145;155;170m 8�[0m �[38;2;220;223;228m- SoundEmitter: 永続的な 3D 音源コンポーネント(モブ・環境オブジェクト向け)。�[0m �[38;2;145;155;170m 9�[0m �[38;2;220;223;228m Linear / InverseSquare 減衰を選択可能。�[0m �[38;2;145;155;170m 10�[0m �[38;2;220;223;228m- audio_impl.cpp: stb_vorbis + MINIAUDIO_IMPLEMENTATION の単一コンパイル単位。�[0m �[38;2;145;155;170m 11�[0m �[38;2;220;223;228m- engine.cpp に統合: リスナー更新、バイオームBGM切り替え、ブロック破壊・�[0m �[38;2;145;155;170m 12�[0m �[38;2;220;223;228m 設置・攻撃・被ダメージ・歩行(地面素材別)・水泳の SE トリガー。�[0m �[38;2;145;155;170m 13�[0m �[38;2;220;223;228m- CMakeLists: FetchContent で miniaudio 0.11.22 + stb を取得。�[0m �[38;2;145;155;170m 14�[0m �[38;2;220;223;228m- Player に isOnGround() アクセサを追加。�[0m �[38;2;145;155;170m 15�[0m �[38;2;145;155;170m 16�[0m �[38;2;220;223;228mCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>�[0m
�[38;2;145;155;170m 1�[0m �[38;2;220;223;228m音声アセットを .gitignore に追加、ダウンロードスクリプトを整備�[0m �[38;2;145;155;170m 2�[0m �[38;2;145;155;170m 3�[0m �[38;2;220;223;228mリポジトリ合計が 42 MB 超になるため assets/music/ と assets/sounds/ を�[0m �[38;2;145;155;170m 4�[0m �[38;2;220;223;228mGit 管理外にする。�[0m �[38;2;145;155;170m 5�[0m �[38;2;145;155;170m 6�[0m �[38;2;220;223;228m- scripts/download_assets.sh: 本番音声ファイルを tar.gz で取得する雛形。�[0m �[38;2;145;155;170m 7�[0m �[38;2;220;223;228m AUDIO_ARCHIVE_URL が未設定の場合はプレースホルダー生成にフォールバック。�[0m �[38;2;145;155;170m 8�[0m �[38;2;220;223;228m- scripts/gen_placeholder_assets.sh: python3 で無音 WAV を生成(開発用)。�[0m �[38;2;145;155;170m 9�[0m �[38;2;220;223;228m 全 31 ファイルを生成しても合計 ~2MB に収まる。�[0m �[38;2;145;155;170m 10�[0m �[38;2;145;155;170m 11�[0m �[38;2;220;223;228m評価者は `bash scripts/download_assets.sh` 一発でアセットを用意できる。�[0m �[38;2;145;155;170m 12�[0m �[38;2;145;155;170m 13�[0m �[38;2;220;223;228mCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>�[0m
URL を変数に代入するだけで済む構成に変更。 空のままにすれば無音プレースホルダーで自動補完。 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
�[38;2;145;155;170m 1�[0m �[38;2;220;223;228m音声ファイルの拡張子を自動解決(ogg/mp3/wav/flac に対応)�[0m �[38;2;145;155;170m 2�[0m �[38;2;145;155;170m 3�[0m �[38;2;220;223;228m- download_assets.sh: URL末尾から拡張子を自動取得してファイルを保存。�[0m �[38;2;145;155;170m 4�[0m �[38;2;220;223;228m 既存ファイルのチェックも拡張子非依存に変更。�[0m �[38;2;145;155;170m 5�[0m �[38;2;220;223;228m- gen_placeholder_assets.sh: stem.* が存在すれば生成をスキップ。�[0m �[38;2;145;155;170m 6�[0m �[38;2;220;223;228m- audio_manager.cpp: kSePaths → kSeStems(拡張子なし)に変更。�[0m �[38;2;145;155;170m 7�[0m �[38;2;220;223;228m resolveAudioPath() で ogg/mp3/wav/flac を順に探してヒットしたものを使用。�[0m �[38;2;145;155;170m 8�[0m �[38;2;220;223;228m- biome_audio_system.cpp: BGM/Ambient パスから .ogg を除去。�[0m �[38;2;145;155;170m 9�[0m �[38;2;145;155;170m 10�[0m �[38;2;220;223;228mURL に貼った音声ファイルの拡張子が何であっても動作する。�[0m �[38;2;145;155;170m 11�[0m �[38;2;145;155;170m 12�[0m �[38;2;220;223;228mCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>�[0m
�[38;2;145;155;170m 1�[0m �[38;2;220;223;228mfix(audio): placeholder marker system prevents re-download being skipped�[0m �[38;2;145;155;170m 2�[0m �[38;2;145;155;170m 3�[0m �[38;2;220;223;228mSilent WAVs generated by gen_placeholder_assets.sh now receive a�[0m �[38;2;145;155;170m 4�[0m �[38;2;220;223;228msibling .placeholder marker file. download_assets.sh respects the�[0m �[38;2;145;155;170m 5�[0m �[38;2;220;223;228mmarker: it overwrites placeholder WAVs when a URL is provided, but�[0m �[38;2;145;155;170m 6�[0m �[38;2;220;223;228mskips files that have no marker (i.e. real audio already in place).�[0m �[38;2;145;155;170m 7�[0m �[38;2;145;155;170m 8�[0m �[38;2;220;223;228mCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>�[0m
�[38;2;145;155;170m 1�[0m �[38;2;220;223;228mfeat(audio): add CC-licensed BGM for all 9 biomes from OpenGameArt�[0m �[38;2;145;155;170m 2�[0m �[38;2;145;155;170m 3�[0m �[38;2;220;223;228m- PLAINS: RPG Exploration Level 1 (HitCtrl, CC-BY 3.0)�[0m �[38;2;145;155;170m 4�[0m �[38;2;220;223;228m- DESERT: caravan / Desert theme (Loyalty Freak Music, CC0)�[0m �[38;2;145;155;170m 5�[0m �[38;2;220;223;228m- TUNDRA: Ice Shine Bells (hc, CC0)�[0m �[38;2;145;155;170m 6�[0m �[38;2;220;223;228m- ROCKY: Cave Theme (Brandon Morris, CC0)�[0m �[38;2;145;155;170m 7�[0m �[38;2;220;223;228m- SWAMP: Hazy Darkness Looping (Eric Matyas, CC-BY 3.0)�[0m �[38;2;145;155;170m 8�[0m �[38;2;220;223;228m- MOUNTAIN: DarkWinds orchestral (Zefz, CC-BY-SA 3.0)�[0m �[38;2;145;155;170m 9�[0m �[38;2;220;223;228m- CANYON: Birds and Wind - Ambient (Spring Spring, CC0)�[0m �[38;2;145;155;170m 10�[0m �[38;2;220;223;228m- SPRING: Flowerbed Fields (Zane Little Music, CC0)�[0m �[38;2;145;155;170m 11�[0m �[38;2;220;223;228m- AUTUMN: The Last Leaf of the Fall (HitCtrl, CC-BY 3.0)�[0m �[38;2;145;155;170m 12�[0m �[38;2;145;155;170m 13�[0m �[38;2;220;223;228mAlso normalize downloaded extension to lowercase to avoid case-sensitive�[0m �[38;2;145;155;170m 14�[0m �[38;2;220;223;228mfilesystem issues (e.g. .OGG → .ogg).�[0m �[38;2;145;155;170m 15�[0m �[38;2;145;155;170m 16�[0m �[38;2;220;223;228mCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>�[0m
�[38;2;145;155;170m 1�[0m �[38;2;220;223;228mfeat(audio): wire 3D positional sound for mob events�[0m �[38;2;145;155;170m 2�[0m �[38;2;145;155;170m 3�[0m �[38;2;220;223;228m- MobHurt: plays at hit zombie's position when player melee connects�[0m �[38;2;145;155;170m 4�[0m �[38;2;220;223;228m- MobExplode: plays at explosion origin when creeper detonates�[0m �[38;2;145;155;170m 5�[0m �[38;2;220;223;228m- MobGroan: periodic (3.5s) groan from nearest chasing/attacking�[0m �[38;2;145;155;170m 6�[0m �[38;2;220;223;228m zombie within 40 blocks (distance-attenuated via playSe3D)�[0m �[38;2;145;155;170m 7�[0m �[38;2;145;155;170m 8�[0m �[38;2;220;223;228mCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>�[0m
�[38;2;145;155;170m 1�[0m �[38;2;220;223;228mfeat(audio): add CC0 SE URLs for all 13 sound effects; fix WAV download bug�[0m
�[38;2;145;155;170m 2�[0m
�[38;2;145;155;170m 3�[0m �[38;2;220;223;228mSound effects (all CC0, OpenGameArt.org):�[0m
�[38;2;145;155;170m 4�[0m �[38;2;220;223;228m- footstep_grass/wood: grass_1.ogg (Delta12 Studio)�[0m
�[38;2;145;155;170m 5�[0m �[38;2;220;223;228m- footstep_stone/snow: snd_footsteps1.wav / tap_stone.wav (Spring Spring)�[0m
�[38;2;145;155;170m 6�[0m �[38;2;220;223;228m- footstep_sand: sand_footsteps_0.mp3�[0m
�[38;2;145;155;170m 7�[0m �[38;2;220;223;228m- attack: punch_1.ogg (Delta12 Studio)�[0m
�[38;2;145;155;170m 8�[0m �[38;2;220;223;228m- hurt: hurt_1.ogg (Delta12 Studio)�[0m
�[38;2;145;155;170m 9�[0m �[38;2;220;223;228m- swim: swim.ogg (Skippy Fish)�[0m
�[38;2;145;155;170m 10�[0m �[38;2;220;223;228m- block_break: small_rock_impact.wav (Spring Spring)�[0m
�[38;2;145;155;170m 11�[0m �[38;2;220;223;228m- block_place: tap_stone.wav (Spring Spring)�[0m
�[38;2;145;155;170m 12�[0m �[38;2;220;223;228m- mob_groan: 01_zombey.mp3 (saturn91.dev)�[0m
�[38;2;145;155;170m 13�[0m �[38;2;220;223;228m- mob_hurt: zombie_pain.ogg�[0m
�[38;2;145;155;170m 14�[0m �[38;2;220;223;228m- mob_explode: explosion1_0.ogg�[0m
�[38;2;145;155;170m 15�[0m
�[38;2;145;155;170m 16�[0m �[38;2;220;223;228mBug fix: fetch() was unconditionally deleting ${stem}.wav after download,�[0m
�[38;2;145;155;170m 17�[0m �[38;2;220;223;228mwhich erased real WAV files immediately after writing them. Now only�[0m
�[38;2;145;155;170m 18�[0m �[38;2;220;223;228mremoves the placeholder WAV when the downloaded format is not .wav.�[0m
�[38;2;145;155;170m 19�[0m
�[38;2;145;155;170m 20�[0m �[38;2;220;223;228mCo-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>�[0m
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mainプッシュ!!!!