public static void Initialize() { _layers = new DrawingLayer[NUM_LAYERS]; for (int i = 0; i < _layers.Length; i++) { _layers[i] = new DrawingLayer(); } #if !XNATOUCH _embeddedSquidEffects = new SquidEffect[(int)EmbeddedSquidEffectType.SizeOfEnum]; _noEffect = new NoEffect(); #endif _isRendering = false; }
public static void Intialize() { _layers = new DrawingLayer[NUM_LAYERS]; _ignoreCamera = new bool[NUM_LAYERS]; for (int i = 0; i < _layers.Length; i++) { _layers[i] = new DrawingLayer(); } #if !REACH _embeddedIceEffects = new IceEffect[(int)EmbeddedIceEffectType.SizeOfEnum]; _noEffect = new NoEffect(); #endif _isRendering = false; }
/// <summary> /// Get the AudioRequest of the TTTAS word. Optionally request a recording of it if it does not already exist. /// </summary> public AudioRequest GetWord(string word, Effect effect = null) { if (string.IsNullOrWhiteSpace(word)) { communication.SendWarningMessage($"TTTAS Word Request of null or whitespace."); return(new AudioDelay(500)); } if (effect is null) { effect = new NoEffect(); } word = word.Trim().ToLowerInvariant(); if (word.EndsWith('.') || word.EndsWith(',')) { //Strip off trailing periods and commas. word = word[..^ 1];
public IActionResult Play( TTSRequest request) { if (string.IsNullOrEmpty(request.Voice) || string.IsNullOrEmpty(request.Pitch) || string.IsNullOrEmpty(request.Text)) { return(BadRequest()); } string user = request.User; if (string.IsNullOrEmpty(user)) { user = "******"; } Effect effect; if (string.IsNullOrEmpty(request.Effect) || request.Effect.ToLower() == "none") { effect = new NoEffect(); } else { effect = audioEffectSystem.SafeParse(request.Effect); } ttsHandler.HandleTTS( user: new Database.User() { AuthorizationLevel = Commands.AuthorizationLevel.Elevated, TwitchUserName = user, TTSVoicePreference = request.Voice.TranslateTTSVoice(), TTSPitchPreference = request.Pitch.TranslateTTSPitch(), TTSEffectsChain = effect.GetEffectsChain() }, message: request.Text, approved: true); return(Ok()); }