feat(engine,assetgen): synthesized SFX + kira AudioPlugin
- New solitaire_assetgen crate with gen_sfx binary: synthesizes five 44.1kHz mono 16-bit PCM WAVs (flip/place/deal/invalid/fanfare) from an LCG noise source + sine/square synths. Output committed under assets/audio/. - AudioPlugin (engine): embeds the WAVs via include_bytes!, decodes once with kira::StaticSoundData, plays on Draw / Move / NewGame / GameWon events. card_invalid is loaded but unused — wiring it needs a MoveRejectedEvent. - AudioManager kept on the main thread (NonSend) since cpal is !Send on some platforms; degrades gracefully if no audio device present. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
pub mod achievement_plugin;
|
||||
pub mod animation_plugin;
|
||||
pub mod audio_plugin;
|
||||
pub mod card_plugin;
|
||||
pub mod challenge_plugin;
|
||||
pub mod daily_challenge_plugin;
|
||||
@@ -27,6 +28,7 @@ pub use daily_challenge_plugin::{
|
||||
pub use progress_plugin::{LevelUpEvent, ProgressPlugin, ProgressResource, ProgressUpdate};
|
||||
pub use weekly_goals_plugin::{WeeklyGoalCompletedEvent, WeeklyGoalsPlugin};
|
||||
pub use animation_plugin::{AnimationPlugin, CardAnim};
|
||||
pub use audio_plugin::{AudioPlugin, AudioState, SoundLibrary};
|
||||
pub use card_plugin::{CardEntity, CardLabel, CardPlugin};
|
||||
pub use events::{
|
||||
AchievementUnlockedEvent, CardFlippedEvent, DrawRequestEvent, GameWonEvent, MoveRequestEvent,
|
||||
|
||||
Reference in New Issue
Block a user