feat: major engine overhaul - scene demo with lighting, sphere, ground
- Scene Demo: cube + sphere + ground plane with proper lighting - Audio: XAudio2 dynamic loading + WAV playback - Physics: expanded collision system - Renderer: improved pipeline with materials - UI: extended widget system - VisualScript: enhanced serializer + block interactions - ASM: optimized math/memory/profiling routines - Window: mouse input + scroll support
This commit is contained in:
1 parent
2653926d85
commit
0669d102ce
35 files changed
+1844
-314
No files matched your search
+14
-1
@@ -7,17 +7,30 @@
|
||||
#include <xaudio2.h>
|
||||
#include <stdint.h>
|
||||
|
||||
// 播放状态
|
||||
typedef enum {
|
||||
AUDIO_STOPPED = 0,
|
||||
AUDIO_PLAYING,
|
||||
AUDIO_PAUSED
|
||||
} AudioState;
|
||||
|
||||
struct AudioSystem;
|
||||
|
||||
// 音频源
|
||||
typedef struct {
|
||||
struct AudioSystem* system;
|
||||
IXAudio2SourceVoice* source;
|
||||
IXAudio2Voice* mastering;
|
||||
float volume;
|
||||
float pitch;
|
||||
int loop;
|
||||
AudioState state;
|
||||
uint8_t* audio_data;
|
||||
uint32_t audio_size;
|
||||
} AudioSource;
|
||||
|
||||
// 音频管理器
|
||||
typedef struct {
|
||||
typedef struct AudioSystem {
|
||||
IXAudio2* xaudio2;
|
||||
IXAudio2MasteringVoice* mastering_voice;
|
||||
} AudioSystem;
|
||||
|
||||
Reference in new issue
Block a user