@ -6,7 +6,8 @@ using UnityEngine;
public class AudioManager : MonoBehaviour
{
private const int MaxChannels = 1 2 8 ; // Should match MAX_CHANNELS in sound.h
private const int MaxVirtualChannels = 1 0 2 4 ; // Should match MAX_CHANNELS in q_sound.h
private const int MaxRealChannels = 1 2 8 ; // Should match MAX_DYNAMIC_CHANNELS in q_sound.h
private FMOD . System fmodSystem ;
public FMOD . System FmodSystem = > fmodSystem ;
@ -79,7 +80,10 @@ public class AudioManager : MonoBehaviour
Debug . Log ( $"[FMOD] Using output type: {output}" ) ;
result = fmodSystem . init ( MaxChannels , FMOD . INITFLAGS . NORMAL , IntPtr . Zero ) ;
result = fmodSystem . setSoftwareChannels ( MaxRealChannels ) ;
CheckFmodResult ( result , "FMOD.System.setSoftwareChannels" ) ;
result = fmodSystem . init ( MaxVirtualChannels , FMOD . INITFLAGS . NORMAL , IntPtr . Zero ) ;
CheckFmodResult ( result , "FMOD.System.init" ) ;
}