Compare commits
No commits in common. "855fb714dab46fbf7d06f825e7044979efaaf21d" and "18dd99407755e7ee433087bc3ecc7bb7157a50ab" have entirely different histories.
855fb714da
...
18dd994077
92
src/lib.rs
92
src/lib.rs
|
@ -692,12 +692,10 @@ fn events(
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(SystemSet, Clone, Hash, Debug, PartialEq, Eq)]
|
#[derive(SystemSet, Clone, Hash, Debug, PartialEq, Eq)]
|
||||||
pub enum SynthizerSets {
|
pub enum SynthizerSystems {
|
||||||
First,
|
|
||||||
UpdateHandles,
|
UpdateHandles,
|
||||||
UpdateProperties,
|
UpdateProperties,
|
||||||
UpdateState,
|
UpdateState,
|
||||||
Last,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Resource)]
|
#[derive(Resource)]
|
||||||
|
@ -758,42 +756,70 @@ impl Plugin for SynthizerPlugin {
|
||||||
.init_resource::<LastAudio>()
|
.init_resource::<LastAudio>()
|
||||||
.insert_resource(defaults)
|
.insert_resource(defaults)
|
||||||
.add_event::<SynthizerEvent>()
|
.add_event::<SynthizerEvent>()
|
||||||
.add_systems(
|
.add_system(sync_config.in_base_set(CoreSet::PreUpdate))
|
||||||
(sync_config, swap_buffers, change_panner_strategy)
|
.add_system(
|
||||||
.in_set(SynthizerSets::First)
|
swap_buffers
|
||||||
.in_base_set(CoreSet::PreUpdate),
|
|
||||||
)
|
|
||||||
.configure_set(SynthizerSets::First.before(SynthizerSets::UpdateHandles))
|
|
||||||
.add_systems(
|
|
||||||
(add_source_handle, add_generator, add_sound_without_source)
|
|
||||||
.in_base_set(CoreSet::PostUpdate)
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
.in_set(SynthizerSets::UpdateHandles),
|
.before(SynthizerSystems::UpdateHandles),
|
||||||
)
|
)
|
||||||
.configure_set(SynthizerSets::UpdateHandles.before(SynthizerSets::UpdateProperties))
|
.add_system(
|
||||||
.add_systems(
|
change_panner_strategy
|
||||||
(
|
|
||||||
update_listener,
|
|
||||||
update_source_properties,
|
|
||||||
update_sound_properties,
|
|
||||||
)
|
|
||||||
.in_base_set(CoreSet::PostUpdate)
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
.in_set(SynthizerSets::UpdateProperties),
|
.before(SynthizerSystems::UpdateHandles),
|
||||||
)
|
)
|
||||||
.configure_set(
|
.add_system(
|
||||||
SynthizerSets::UpdateProperties
|
add_source_handle
|
||||||
.before(SynthizerSets::UpdateState)
|
|
||||||
.after(TransformSystem::TransformPropagate),
|
|
||||||
)
|
|
||||||
.add_systems(
|
|
||||||
(update_source_playback_state, update_sound_playback_state)
|
|
||||||
.in_base_set(CoreSet::PostUpdate)
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
.in_set(SynthizerSets::UpdateState),
|
.in_set(SynthizerSystems::UpdateHandles)
|
||||||
|
.before(SynthizerSystems::UpdateProperties),
|
||||||
)
|
)
|
||||||
.configure_set(SynthizerSets::UpdateState.before(SynthizerSets::Last))
|
.add_system(
|
||||||
.add_systems(
|
add_generator
|
||||||
(remove_sound, events)
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
.in_set(SynthizerSets::Last)
|
.in_set(SynthizerSystems::UpdateHandles)
|
||||||
.in_base_set(CoreSet::PostUpdate),
|
.before(SynthizerSystems::UpdateProperties),
|
||||||
|
)
|
||||||
|
.add_system(
|
||||||
|
add_sound_without_source
|
||||||
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
|
.in_set(SynthizerSystems::UpdateHandles)
|
||||||
|
.before(SynthizerSystems::UpdateProperties),
|
||||||
|
)
|
||||||
|
.add_system(
|
||||||
|
update_listener
|
||||||
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
|
.in_set(SynthizerSystems::UpdateProperties)
|
||||||
|
.after(TransformSystem::TransformPropagate)
|
||||||
|
.before(SynthizerSystems::UpdateState),
|
||||||
|
)
|
||||||
|
.add_system(
|
||||||
|
update_source_properties
|
||||||
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
|
.in_set(SynthizerSystems::UpdateProperties)
|
||||||
|
.after(TransformSystem::TransformPropagate)
|
||||||
|
.before(SynthizerSystems::UpdateState),
|
||||||
|
)
|
||||||
|
.add_system(
|
||||||
|
update_sound_properties
|
||||||
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
|
.in_set(SynthizerSystems::UpdateProperties)
|
||||||
|
.before(SynthizerSystems::UpdateState),
|
||||||
|
)
|
||||||
|
.add_system(
|
||||||
|
update_source_playback_state
|
||||||
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
|
.in_set(SynthizerSystems::UpdateState),
|
||||||
|
)
|
||||||
|
.add_system(
|
||||||
|
update_sound_playback_state
|
||||||
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
|
.in_set(SynthizerSystems::UpdateState),
|
||||||
|
)
|
||||||
|
.add_system(remove_sound.in_base_set(CoreSet::PostUpdate))
|
||||||
|
.add_system(
|
||||||
|
events
|
||||||
|
.in_base_set(CoreSet::PostUpdate)
|
||||||
|
.after(SynthizerSystems::UpdateState),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user