Skip to content

Commit

Permalink
Merge branch 'feature/audioManager' of https://github.com/2024FALL-SW…
Browse files Browse the repository at this point in the history
  • Loading branch information
jihu0331 committed Dec 18, 2024
2 parents dfb3d18 + d483d4d commit 69ed32a
Show file tree
Hide file tree
Showing 18 changed files with 566 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Assets/SWPPT3/Audio.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

282 changes: 282 additions & 0 deletions Assets/SWPPT3/Audio/Main Mixer.mixer
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!245 &-7782965340529449611
AudioMixerSnapshotController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Pause
m_AudioMixer: {fileID: 24100000}
m_SnapshotID: 3b9b50b27b7c8004e8b5b1c72f2dd437
m_FloatValues:
6fd4b7dd90a6d8242b01b6357d638fd2: 1662
m_TransitionOverrides: {}
--- !u!244 &-7046891184290018333
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: 6ea18d5ffed88474a88243c769e9d813
m_EffectName: Receive
m_MixLevel: 3a58e306ecf794e45a8a7383ef633972
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!244 &-5234471723836616451
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: 69719d8567b3b9d47a4a8f80ac395907
m_EffectName: Echo
m_MixLevel: 9c60f9ff50b593146b79ef8507bd70ea
m_Parameters:
- m_ParameterName: Delay
m_GUID: a73eaa91c6e03994cb3f4912899cb7d3
- m_ParameterName: Decay
m_GUID: 43a932c357d33494cafeaf2f70d2abd5
- m_ParameterName: Max channels
m_GUID: 925dd2ec4bb255f45af1ddf716804dcb
- m_ParameterName: Drymix
m_GUID: dc5d85fa54607004492bb9b63e4a605d
- m_ParameterName: Wetmix
m_GUID: 84a46e13d800219468b6db3c0a4e11b2
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!245 &-2790486170780066718
AudioMixerSnapshotController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: InGame
m_AudioMixer: {fileID: 24100000}
m_SnapshotID: 926dfb56251efab4f92e7b51dc6a2897
m_FloatValues:
6fd4b7dd90a6d8242b01b6357d638fd2: 22000
m_TransitionOverrides: {}
--- !u!241 &24100000
AudioMixerController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Main Mixer
m_OutputGroup: {fileID: 0}
m_MasterGroup: {fileID: 24300002}
m_Snapshots:
- {fileID: 24500006}
- {fileID: -2790486170780066718}
- {fileID: -7782965340529449611}
- {fileID: 8965369088542882735}
m_StartSnapshot: {fileID: 24500006}
m_SuspendThreshold: -80
m_EnableSuspend: 1
m_UpdateMode: 0
m_ExposedParameters: []
m_AudioMixerGroupViews:
- guids:
- f0bc4a1fbf5524141ac4929b7b2c4e89
- c31e8f9fccc55c0458dade055fc73626
- 2ed001b5d370c394893a7a3a7e4f8d68
- 0f7575c671626fc4c927bf98bb034464
name: View
m_CurrentViewIndex: 0
m_TargetSnapshot: {fileID: 24500006}
--- !u!243 &24300002
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Master
m_AudioMixer: {fileID: 24100000}
m_GroupID: f0bc4a1fbf5524141ac4929b7b2c4e89
m_Children:
- {fileID: 5682932974379708709}
- {fileID: 8353370623410917508}
- {fileID: 5262991910792081931}
m_Volume: 198acfab3b8fbd64ca7ddfe80647ad4d
m_Pitch: aa55e3e3897ca2c44b30c3ff72a108ed
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 24400004}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &24400004
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: d23fa962e8eb125489b5cd0b5ea2ee2d
m_EffectName: Attenuation
m_MixLevel: 94c37833e90274342a26179e7aa6964d
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!245 &24500006
AudioMixerSnapshotController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Snapshot
m_AudioMixer: {fileID: 24100000}
m_SnapshotID: f7339f585cc39a74391dc399074639c4
m_FloatValues:
6fd4b7dd90a6d8242b01b6357d638fd2: 22000
m_TransitionOverrides: {}
--- !u!244 &689200265556805595
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: f9bb7a2dfaff99641985e399cf98ea43
m_EffectName: Attenuation
m_MixLevel: 2697858039f95af499f1a98586224a35
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!244 &2297278035422026974
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: f8bd66b1ad3023446a69a939cb4fc117
m_EffectName: Send
m_MixLevel: 1dff3318bded9db468fac1583390180a
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!243 &5262991910792081931
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: InGameSFX
m_AudioMixer: {fileID: 24100000}
m_GroupID: 2ed001b5d370c394893a7a3a7e4f8d68
m_Children: []
m_Volume: 55863588bf18c4f4da1e09e6e756361f
m_Pitch: af9952d34344b18479123094b72a282f
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 6851217633261995677}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &5263435330316612309
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: 4e18553dc8a023e408699d44372633b0
m_EffectName: Attenuation
m_MixLevel: c965718e1c645f7418d3645c390f218e
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!243 &5682932974379708709
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: BGM
m_AudioMixer: {fileID: 24100000}
m_GroupID: c31e8f9fccc55c0458dade055fc73626
m_Children: []
m_Volume: c8db532a28c9f2b4b8b2f8b1ceb3dc03
m_Pitch: 3db883a0b8c898f4eafb41d499586e3e
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 5263435330316612309}
- {fileID: 7224702664202602091}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!244 &6851217633261995677
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: dc66a09f22d75074fae724d55f1e4c5d
m_EffectName: Attenuation
m_MixLevel: f1c5efbc9c0004e46801c5ff5ae51303
m_Parameters: []
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!244 &7224702664202602091
AudioMixerEffectController:
m_ObjectHideFlags: 3
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name:
m_EffectID: 37e3893bc87730543bcc12b092658b84
m_EffectName: Lowpass Simple
m_MixLevel: 010ce7e22b73be448b03ac3dd8897e3e
m_Parameters:
- m_ParameterName: Cutoff freq
m_GUID: 6fd4b7dd90a6d8242b01b6357d638fd2
m_SendTarget: {fileID: 0}
m_EnableWetMix: 0
m_Bypass: 0
--- !u!243 &8353370623410917508
AudioMixerGroupController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: UISFX
m_AudioMixer: {fileID: 24100000}
m_GroupID: 0f7575c671626fc4c927bf98bb034464
m_Children: []
m_Volume: c6aaeee74f906f94e8c4d65f2bf10aa9
m_Pitch: a1fce34020e8f2f429f14a457ea833c0
m_Send: 00000000000000000000000000000000
m_Effects:
- {fileID: 689200265556805595}
m_UserColorIndex: 0
m_Mute: 0
m_Solo: 0
m_BypassEffects: 0
--- !u!245 &8965369088542882735
AudioMixerSnapshotController:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: Lobby
m_AudioMixer: {fileID: 24100000}
m_SnapshotID: ef0e32e26e292514c836f93bca93bf80
m_FloatValues:
6fd4b7dd90a6d8242b01b6357d638fd2: 22000
m_TransitionOverrides: {}
8 changes: 8 additions & 0 deletions Assets/SWPPT3/Audio/Main Mixer.mixer.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Assets/SWPPT3/Scenes/Stage1test.unity.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Assets/SWPPT3/Scripts/Main/AudioLogic.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions Assets/SWPPT3/Scripts/Main/AudioLogic/AudioCamera.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
namespace SWPPT3.Main.AudioLogic
{
public class AudioCamera
{

}
}
3 changes: 3 additions & 0 deletions Assets/SWPPT3/Scripts/Main/AudioLogic/AudioCamera.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions Assets/SWPPT3/Scripts/Main/AudioLogic/AudioPlayer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
using UnityEngine;

namespace SWPPT3.Main.AudioLogic
{
[RequireComponent(typeof(AudioSource))]
public abstract class AudioPlayer : MonoBehaviour
{
[SerializeField]
private AudioSource _audioSource;

protected AudioSource AudioSource => _audioSource;

public void SetVolume(float volume)
{
AudioSource.volume = volume;
}

private void OnValidate()
{
_audioSource = GetComponent<AudioSource>();
}
}
}
11 changes: 11 additions & 0 deletions Assets/SWPPT3/Scripts/Main/AudioLogic/AudioPlayer.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 69ed32a

Please sign in to comment.