Refactor audio module to use built-in music and sound effect identifiers
- Introduced BuiltInMusicModule and BuiltInSfxModule to replace RetailMusicModule and RetailSfxModule. - Updated RetailAssetRegistry and SharewareAssetRegistry to utilize the new built-in modules. - Removed deprecated MusicKey and SfxKey classes, replacing them with Music and SoundEffect enums for better clarity and maintainability. - Adjusted music and sound effect resolution methods to align with the new structure. - Updated audio playback methods in WolfAudio and FlutterAudioAdapter to accept the new Music and SoundEffect types. - Refactored tests to accommodate changes in audio event handling and ensure compatibility with the new identifiers. Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
@@ -8,8 +8,8 @@ class FlutterAudioAdapter implements EngineAudio {
|
||||
FlutterAudioAdapter(this.wolf3d);
|
||||
|
||||
@override
|
||||
void playLevelMusic(WolfLevel level) {
|
||||
wolf3d.audio.playLevelMusic(level);
|
||||
void playLevelMusic(Music music) {
|
||||
wolf3d.audio.playLevelMusic(music);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -23,8 +23,13 @@ class FlutterAudioAdapter implements EngineAudio {
|
||||
}
|
||||
|
||||
@override
|
||||
void playSoundEffect(int sfxId) {
|
||||
wolf3d.audio.playSoundEffect(sfxId);
|
||||
void playSoundEffect(SoundEffect effect) {
|
||||
wolf3d.audio.playSoundEffect(effect);
|
||||
}
|
||||
|
||||
@override
|
||||
void playSoundEffectId(int sfxId) {
|
||||
wolf3d.audio.playSoundEffectId(sfxId);
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user