public IEnumerator NormalPriorityAudioPlayersCountPerSecondDoesNotExceedConstraint() { var audioService = new AudioService(); var testDefintion = GetTestDefinition(); testDefintion.AudioClip = GetTestClip(); audioService.SoundsPerSecond = 5; for (int i = 0; i < 10; i++) { audioService.Play(testDefintion); } yield return(new WaitForEndOfFrame()); var audioPlayers = GameObject.FindObjectsOfType <AudioPlayerBehavior>(); Assert.LessOrEqual(audioPlayers.Length, audioService.SoundsPerSecond); }
public IEnumerator PlayerGainsMaxVolumeInGivenTimeWhenFadeInSettingIsSet() { //This guy can sometimes fail due to Unity's behaviour. Please, re-run failed several times to ensure issue var audioService = new AudioService(); var testDefintion = GetTestDefinition(); testDefintion.AudioClip = GetTestClip(); var audioClipLength = testDefintion.AudioClip.length; testDefintion.Volume = 0.3f; testDefintion.FadesIn = true; testDefintion.FadeInEndPercentage = 0.5f; var player = audioService.Play(testDefintion); yield return(new WaitForSeconds(audioClipLength * testDefintion.FadeInEndPercentage * titbitLonger)); Assert.GreaterOrEqual(player.GetComponent <AudioSource>().volume, testDefintion.Volume); }
public async Task UpdateAudioTranscript_UpdatesTranscriptBlobMetadata() { // arrange var fakeBlobRepository = new FakeBlobRepository(); fakeBlobRepository.AddFakeBlob(AudioService.AudioBlobContainerName, "fakeuserid/fakeid"); var mockAudioTranscriptionService = new Mock <IAudioTranscriptionService>(); mockAudioTranscriptionService .Setup(m => m.GetAudioTranscriptFromCognitiveServicesAsync(It.IsAny <Stream>())) .ReturnsAsync("transcript"); var service = new AudioService(fakeBlobRepository, mockAudioTranscriptionService.Object, new Mock <IEventGridPublisherService>().Object); // act await service.UpdateAudioTranscriptAsync("fakeid", "fakeuserid"); // assert Assert.True(fakeBlobRepository.Blobs.Single().Blob.Metadata.ContainsKey(AudioService.TranscriptMetadataName)); Assert.Equal("transcript", fakeBlobRepository.Blobs.Single().Blob.Metadata[AudioService.TranscriptMetadataName]); }
private void InitializeCommands() { PlayAudioCommand = new RelayCommand <Audio>(audio => { AudioService.Play(audio); if (SelectedTabIndex == 0) { var searchControl = LocalSearchControl.GetForCurrentView(); if (searchControl != null && searchControl.IsFiltering) { AudioService.SetCurrentPlaylist((searchControl.Source.View).Cast <Audio>()); } else { AudioService.SetCurrentPlaylist(Tracks); } } else if (SelectedArtistAlbums != null) { AudioService.SetCurrentPlaylist(SelectedArtistAlbums.Where(a => !a.Tracks.IsNullOrEmpty()).SelectMany(a => a.Tracks).ToList()); } }); GoToAlbumCommand = new RelayCommand <AudioAlbum>(album => { MessengerInstance.Send(new NavigateToPageMessage() { Page = "/Local.LocalAlbumView", Parameters = new Dictionary <string, object>() { { "album", album } } }); }); RefreshCommand = new RelayCommand(() => { Refresh(); }); }
static async Task MainAsync(string[] args) { _client = new DiscordClient(new DiscordConfiguration { Token = Config.Token, TokenType = TokenType.Bot }); _client.UseVoiceNext(); var commandList = new CommandService().BuildCommandList(); var audioService = new AudioService(); var channelService = new ChannelService(_client); _client.MessageCreated += async e => { if (commandList.ContainsKey(e.Message.Content)) { var vnc = await channelService.JoinChannel(247175209767927810); await audioService.PlayAudio(vnc, commandList[e.Message.Content]); await channelService.LeaveChannel(e.Channel.Id); } if (e.Message.Content.Contains("!btubeaudio")) { var url = e.Message.Content.Split(' ') .ToList() .SingleOrDefault(x => x.Contains("http")); var vnc = await channelService.JoinChannel(247175209767927810); await audioService.PlayAudio(vnc, url); await channelService.LeaveChannel(e.Channel.Id); } }; await _client.ConnectAsync(); await Task.Delay(-1); }
/// <summary> /// 初始化框架层 /// </summary> /// <param name="initialize">初始化/反初始化</param> public static void InitFramework(bool initialize) { if (initialize) { NativeService.GetInstance(); IFSService.GetInstance(); AssetService.GetInstance(); ScheduleService.GetInstance(); EventService.GetInstance(); StateService.GetInstance(); HttpService.GetInstance(); UGUIRoot.GetInstance(); UIStateService.GetInstance(); SceneService.GetInstance(); UICommonService.GetInstance(); AudioService.GetInstance(); QualityService.GetInstance(); NetworkService.GetInstance(); NetAssetService.GetInstance(); } else { IFSService.DestroyInstance(); EventService.DestroyInstance(); StateService.DestroyInstance(); HttpService.DestroyInstance(); UIStateService.DestroyInstance(); SceneService.DestroyInstance(); UICommonService.DestroyInstance(); UGUIRoot.DestroyInstance(); AudioService.DestroyInstance(); NetworkService.DestroyInstance(); NativeService.DestroyInstance(); NetAssetService.DestroyInstance(); QualityService.DestroyInstance(); //最后 ScheduleService.DestroyInstance(); AssetService.GetInstance().Destroy(); AssetService.DestroyInstance(); } }
public BoardViewModel(GameConfig.BoardSettings boardSetting, BubbleView.Factory bubbleViewFactory, AudioService audioService) { _minBounds = boardSetting.Min; _maxBounds = boardSetting.Max; _maxSpawnExponent = boardSetting.InitialMaxSpawnExponent + 2; _minNumberOfBubbles = boardSetting.MinNumberOfBubbles; _explosionExponent = boardSetting.ExplosionExponent; _bubbleViewFactory = bubbleViewFactory; _audioService = audioService; _isInitialized = new ReactiveProperty <bool>().AddTo(Disposer); _isMerging = new ReactiveProperty <bool>().AddTo(Disposer); _currentTopGridY = new ReactiveProperty <int>().AddTo(Disposer); _bubbleViewModels = new ReactiveDictionary <Vector2Int, BubbleViewModel>().AddTo(Disposer); _mergeSubscriptionDisposer = new CompositeDisposable().AddTo(Disposer); _bubbleAddedSerialDisposable = new SerialDisposable().AddTo(Disposer); IsInitialized .IfTrue() .Subscribe(_ => UpdateConnectedToCeiling()).AddTo(Disposer); BubbleViewModels .ObserveAnyChange() .OncePerFrame() .Where(_ => IsInitialized.Value) .DelayFrame(1) .Subscribe(_ => OnBubblesCountChanged()).AddTo(Disposer); CurrentTopGridY .SkipLatestValueOnSubscribe() .Where(_ => IsInitialized.Value) .OncePerFrame() .Subscribe(OnCurrentTopYChanged).AddTo(Disposer); IsMerging .SkipLatestValueOnSubscribe() .IfFalse() .OncePerFrame() .Subscribe(_ => TriggerExplosions()) .AddTo(Disposer); }
private void Init() { //服务模块初始化 //NetService net = GetComponent<NetService>(); //net.InitSvc(); ResourcesService res = GetComponent <ResourcesService>(); res.InitSvc(); AudioService audio = GetComponent <AudioService>(); audio.InitSvc(); TimerService timer = GetComponent <TimerService>(); timer.InitSvc(); //业务系统初始化 LoginSystem login = GetComponent <LoginSystem>(); login.InitSys(); //进入登录场景并加载相应UI login.EnterLogin(); }
public void eac3tobatchfilewriteservice_has_no_disc_selected_error_when_no_disc_selected_test() { List <BluRayDiscInfo> discList = new List <BluRayDiscInfo>() { new BluRayDiscInfo() { Id = 1, IsSelected = false, BluRayPath = @"c:\temp\disc1" } }; EAC3ToConfiguration config = new EAC3ToConfiguration(); var directorySystemServiceMock = new Mock <IDirectorySystemService>(); directorySystemServiceMock.Setup(m => m.Exists(It.IsAny <string>())).Returns(true); IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new EncodeTemplate1EAC3ToOutputNamingService(audioService); IEAC3ToCommonRulesValidatorService eac3ToCommonRulesValidatorService = new EAC3ToCommonRulesValidatorService(config, directorySystemServiceMock.Object, discList); IEAC3ToBatchFileWriteService service = new EAC3ToBatchFileWriteService(config, directorySystemServiceMock.Object, discList, audioService, eac3ToOutputNamingService, eac3ToCommonRulesValidatorService); bool isValid = service.IsValid(); service.Errors[0].Description.Should().Be("No Disc was selected."); }
// I_UI_WINDOW public virtual void Init() { _safePlayerPrefs = Core.Instance.GetService <SafePlayerPrefs>(); Assert.AreNotEqual(null, _safePlayerPrefs); _playerManager = Core.Instance.GetService <PlayerManager>(); Assert.AreNotEqual(null, _playerManager); _gameManager = Core.Instance.GetService <GameManager>(); Assert.AreNotEqual(null, _gameManager); // _uiManager = Core.Instance.GetService <UIManager>(); Assert.AreNotEqual(null, _uiManager); _header = _uiManager.GetWindow(UIWindowEnum.HEADER) as Header; Assert.AreNotEqual(null, _header); _audioService = Core.Instance.GetService <AudioService>(); Assert.AreNotEqual(null, _audioService); }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); // Set our view from the "main" layout resource SetContentView(Resource.Layout.activity_debugaudio); // Initialize charts InitCharts(); // Start AudioService token = cancelTokenSource.Token; Task.Run(() => { //var audioService = new AudioService(); audioService = new AudioService(); audioService.samplesUpdated += AudioService_samplesUpdated; audioService.StartRecord(); }, token); }
public void remuxTemplate1EAC3ToOutputNamingService_can_set_chapter_name_test() { //given not extract for remux EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = true, RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate() { AudioType = "FLAC 5.1", SeriesName = "BatchGuy", SeasonNumber = "2", SeasonYear = "1978", Tag = "Guy", VideoResolution = "1080p", Medium = "Remux" } }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; //when i get the chapter name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new RemuxTemplate1EAC3ToOutputNamingService(audioService); string chapterName = service.GetChapterName(config, filesOutputPath, paddedEpisodeNumber, episodeName); //then chapter name should be based on the remux template chapterName.Should().Be("\"c:\\bluray\\BatchGuy 1978 S02E01 1080p Remux FLAC 5.1-Guy chapters.txt\""); }
public void remuxTemplate1EAC3ToOutputNamingService_can_set_video_name_and_series_name_only_test() { //given not extract for remux EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = true, RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate() { SeriesName = "BatchGuy" } }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; //when i get the video name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new RemuxTemplate1EAC3ToOutputNamingService(audioService); string videoName = service.GetVideoName(config, filesOutputPath, paddedEpisodeNumber, episodeName); //then video name should be based on the remux template videoName.Should().Be("\"c:\\bluray\\BatchGuy E01.mkv\""); }
public AudioSettingsController(SettingsModel settingsModel, AudioService audioService, DefaultSettingsConfig defaultSettingsConfig) { _settingsModel = settingsModel; _audioService = audioService; _defaultSettingsConfig = defaultSettingsConfig; _settingsModel.IsMusicMuted .Subscribe(isMuted => { var volume = isMuted ? 0 : defaultSettingsConfig.MusicVolume; _audioService.SetMusicVolume(volume); }) .AddTo(Disposer); _settingsModel.IsEffectsMuted .Subscribe(isMuted => { var volume = isMuted ? 0 : defaultSettingsConfig.EffectVolume; _audioService.SetEffectsVolume(volume); }) .AddTo(Disposer); }
private void InitializeCommands() { PlayAudioCommand = new RelayCommand <Audio>(audio => { AudioService.Play(audio); AudioService.SetCurrentPlaylist(Tracks); }); RefreshCommand = new RelayCommand(() => { CancelAsync(); if (SelectedRecommendation.Group != MainResources.RecommendationsMusicGroup) { LoadRecommendationsByTag(SelectedRecommendation.Key, _cancellationToken.Token); } else { LoadGeneralRecommendations(_cancellationToken.Token); } }); }
public void eacoutputservice_can_set_bluray_stream_test() { //given bluray folder and stream# string bluRayPath = "c:\\disc"; EAC3ToConfiguration config = new EAC3ToConfiguration(); BluRaySummaryInfo bluRaySummaryInfo = new BluRaySummaryInfo() { Eac3ToId = "1)", BluRayTitleInfo = new BluRayTitleInfo() { EpisodeNumber = "1" } }; IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new EncodeTemplate1EAC3ToOutputNamingService(audioService); //when I want the output IEAC3ToOutputService service = new EAC3ToOutputService(config, eac3ToOutputNamingService, bluRayPath, bluRaySummaryInfo); //then the bluray path/stream# is set string output = service.GetBluRayStreamPart(); output.Should().Contain(bluRayPath); output.Should().Contain("1)"); }
public void movieRemuxTemplate1EAC3ToOutputNamingService_can_set_subtitle_name_test() { //given not extract for remux BluRaySummaryInfo summary = new BluRaySummaryInfo() { IsSelected = true, RemuxFileNameForMovieTemplate = new EAC3ToRemuxFileNameTemplate() { AudioType = "FLAC 5.1", SeriesName = "BatchGuy", SeasonNumber = "2", SeasonYear = "1978", Tag = "Guy", VideoResolution = "1080p", Medium = "Remux", VideoFormat = "H.264" } }; EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = true, IfIsExtractForRemuxIsItForAMovie = true }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; //when i get the subtitle name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService); service.SetCurrentBluRaySummaryInfo(summary); BluRayTitleSubtitle subtitle = new BluRayTitleSubtitle() { Id = "11:", Language = "english" }; string subtitleName = service.GetSubtitleName(config, subtitle, filesOutputPath, paddedEpisodeNumber, episodeName); //then subtitle name should be based on the remux template subtitleName.Should().Be("\"c:\\bluray\\BatchGuy 1978 1080p Remux H.264 FLAC 5.1-Guy english01-11.sup\""); }
public void Init(CarBase car) { _audioService = Core.Instance.GetService <AudioService>(); Assert.AreNotEqual(null, _audioService); #region createing nitro audio emitter _audioService.CreateEmitterNitro(); #endregion _audioService.CreateEmitterNitroEmpty(); _playerCar = car; maxNitro = (float)Math.Round(NitroDuration / Time.fixedDeltaTime, 0); nitroPlus = (float)Math.Round(nitroMinus / NitroRecovery, 2); nitroDelayMax = (float)Math.Round(NitroDelay / Time.fixedDeltaTime, 0); m_rigidbody = GetComponent <Rigidbody>(); nitroCurrent = maxNitro; }
void Init() { //按顺序初始化模块 //服务模块 NetService net = GetComponent <NetService>(); net.InitNetService(); ResService res = GetComponent <ResService>(); res.InitRes(); AudioService audio = GetComponent <AudioService>(); audio.InitService(); //业务系统初始化 LoginSystem login = GetComponent <LoginSystem>(); login.Init(); //进入登录场景并加载相应UI login.EnterLogin(); }
public async Task ListAudioNotes_DoesNotReturnsSummariesForAnotherUser() { // arrange var fakeBlobRepository = new FakeBlobRepository(); var blob1 = new CloudBlockBlob(new Uri("https://fakeblobrepository/audio/fakeuserid1/fakeid1")); blob1.Metadata.Add(AudioService.TranscriptMetadataName, "transcript1"); fakeBlobRepository.AddFakeBlob(AudioService.AudioBlobContainerName, "fakeuserid1/fakeid1", blob1); var blob2 = new CloudBlockBlob(new Uri("https://fakeblobrepository/audio/fakeuserid2/fakeid2")); blob2.Metadata.Add(AudioService.TranscriptMetadataName, "transcript2"); fakeBlobRepository.AddFakeBlob(AudioService.AudioBlobContainerName, "fakeuserid2/fakeid2", blob2); var service = new AudioService(fakeBlobRepository, new Mock <IAudioTranscriptionService>().Object, new Mock <IEventGridPublisherService>().Object); // act var result = await service.ListAudioNotesAsync("fakeuserid1"); // assert Assert.Single(result); Assert.Equal("fakeid1", result.Single().Id); Assert.Equal("transcript1", result.Single().Preview); }
/// <summary> /// Downloads and converts a video to an audio file (Directly with the video ID) /// </summary> /// <param name="videoId">The video ID</param> /// <returns></returns> public string DownloadAudioById(string videoId) { hasFinishedDownloading = false; Video youTubeVideo; try { youTubeVideo = client.GetVideoAsync(videoId).GetAwaiter().GetResult(); } catch (ArgumentException) { MessageUtils.ModifyMessage(message, ":musical_note: That YouTube URL is invalid!").GetAwaiter() .GetResult(); hasFinishedDownloading = true; return(null); } //Do a search in our music directory using the EXACT title string searchResult = AudioService.SearchMusicDirectory(youTubeVideo.Title.RemoveIllegalChars(), downloadFileContainer); if (!string.IsNullOrWhiteSpace(searchResult)) { hasFinishedDownloading = true; //Set this to true anyway, so when disposing it doesn't delete the message return(searchResult); } if (youTubeVideo.Duration <= maxAudioTime) { return(DownloadAudio(youTubeVideo)); } MessageUtils.ModifyMessage(message, $":musical_note: Video succeeds max time of {maxAudioTime}") .GetAwaiter().GetResult(); return(null); }
public static async Task Initialize(DiscordClient client) { _client = client; _audioChannel = _client.Servers.FirstOrDefault().VoiceChannels.FirstOrDefault(); AudioService audioService = _client.GetService <AudioService>(); bool startLoop = _audioClient == null; _audioClient = await audioService.Join(_audioChannel); if (_songQueue == null) { _songQueue = new ConcurrentQueue <string>(); _nextSong = true; } #pragma warning disable CS4014 // Not awaited to allow for method to close if (startLoop) { DoWorkAsyncInfiniteLoop(); } #pragma warning restore CS4014 }
public void encodeTemplate1EAC3ToOutputNamingService_can_set_audio_name_when_not_extract_for_remux_test() { //given not extract for remux EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = false }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; BluRayTitleAudio audio = new BluRayTitleAudio() { Id = "13:", AudioType = EnumAudioType.DTSMA, Language = "english" }; //when i get the audio name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new EncodeTemplate1EAC3ToOutputNamingService(audioService); string audioName = service.GetAudioName(config, audio, filesOutputPath, paddedEpisodeNumber, episodeName); //then audio name should be hard coded for workflow audioName.Should().Be("\"c:\\bluray\\english01-13.dtsma\""); }
public void encodeTemplate1EAC3ToOutputNamingService_can_set_subtitle_name_when_not_extract_for_remux_test() { //given not extract for remux EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = false }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; BluRayTitleSubtitle subtitle = new BluRayTitleSubtitle() { Id = "3:", Language = "english" }; //when i get the subtitle name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new EncodeTemplate1EAC3ToOutputNamingService(audioService); string subtitleName = service.GetSubtitleName(config, subtitle, filesOutputPath, paddedEpisodeNumber, episodeName); //then subtitle name should be hard coded for workflow subtitleName.Should().Be("\"c:\\bluray\\english01-3.sup\""); }
public void movieRemuxTemplate1EAC3ToOutputNamingService_can_set_video_name_when_mpeg2_video_format_test() { //given not extract for remux BluRaySummaryInfo summary = new BluRaySummaryInfo() { IsSelected = true, RemuxFileNameForMovieTemplate = new EAC3ToRemuxFileNameTemplate() { AudioType = "FLAC 5.1", SeriesName = "BatchGuy", SeasonNumber = "2", SeasonYear = "1978", Tag = "Guy", VideoResolution = "1080p", VideoFormat = "MPEG-2" } }; EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = true, IfIsExtractForRemuxIsItForAMovie = true }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = string.Empty; //when i get the video name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new MovieRemuxTemplate1EAC3ToOutputNamingService(audioService); service.SetCurrentBluRaySummaryInfo(summary); string videoName = service.GetVideoName(config, filesOutputPath, paddedEpisodeNumber, episodeName); //then video name should be based on the remux template videoName.Should().Be("\"c:\\bluray\\BatchGuy 1978 1080p MPEG-2 FLAC 5.1-Guy.mkv\""); }
public void ToggleRecord() { AudioService.ToggleRecord(); if (AudioService.isRecording()) { micStatus.text = "Gravando..."; stopRecordingButton.gameObject.SetActive(true); startRecordingButton.gameObject.SetActive(false); playButton.interactable = false; stopButton.interactable = false; submitButton.interactable = false; } else { startRecordingButton.gameObject.SetActive(true); stopRecordingButton.gameObject.SetActive(false); if (AudioService.isRecorded()) { micStatus.text = "Gravação concluída"; playButton.interactable = true; stopButton.interactable = true; submitButton.interactable = true; } else { micStatus.text = "Aguardando gravação"; playButton.interactable = false; stopButton.interactable = false; submitButton.interactable = false; } } }
public void PatchPluginToAudioOutput(RemoteVstPlugin plugin, AudioOutputDevice device, int latency) { var audioService = new AudioService(); var ep = audioService.GetAudioEndpoint(device); if (ep == null) { throw new Exception( $"Unable to open audio device {device.Name} because the device (currently) doesn't exist"); } UnpatchPluginFromAudioOutput(); _outputDevice = new WasapiOut(ep, AudioClientShareMode.Shared, true, latency); _vstWaveProvider = new VSTStream(); _vstWaveProvider.pluginContext = plugin.PluginContext; _vstWaveProvider.SetWaveFormat(_outputDevice.OutputWaveFormat.SampleRate, _outputDevice.OutputWaveFormat.Channels); _outputDevice.Init(_vstWaveProvider); _outputDevice.Play(); }
public void remuxTemplate2EAC3ToOutputNamingService_can_set_log_name_test() { //given not extract for remux EAC3ToConfiguration config = new EAC3ToConfiguration() { IsExtractForRemux = true, RemuxFileNameTemplate = new EAC3ToRemuxFileNameTemplate() { SeriesName = "BatchGuy", SeasonNumber = "2", } }; string filesOutputPath = "c:\\bluray"; string paddedEpisodeNumber = "01"; string episodeName = "Episode 3"; //when i get the subtitle name IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService service = new RemuxTemplate2EAC3ToOutputNamingService(audioService); string logName = service.GetLogName(config, filesOutputPath, paddedEpisodeNumber, episodeName); //then subtitle name should be based on the remux template logName.Should().Be(" -log=\"c:\\bluray\\BatchGuy, S02E01 log.log\""); }
public void mkvmergeoutputservice_can_getmkvmergepathPart_Tests() { //given EAC3ToConfiguration config = new EAC3ToConfiguration() { MKVMergePath = "c:\\exe\\mkvmerge.exe" }; BluRaySummaryInfo bluRaySummaryInfo = new BluRaySummaryInfo() { Eac3ToId = "1)", BluRayTitleInfo = new BluRayTitleInfo() { EpisodeNumber = "1" } }; IAudioService audioService = new AudioService(); AbstractEAC3ToOutputNamingService eac3ToOutputNamingService = new RemuxTemplate1EAC3ToOutputNamingService(audioService); //when IMKVMergeOutputService mkvMergeOutputService = new MKVMergeOutputService(config, eac3ToOutputNamingService, @"c:\temp", bluRaySummaryInfo); var mkvmergepath = mkvMergeOutputService.GetMKVMergePathPart(); //then mkvmergepath.Should().Be("\"c:\\exe\\mkvmerge.exe\""); }
private void UpdateSelfExplanationItem(ExplanationItem item, bool uncheckAzureAudio, bool uncheckWatsonAudio) { // syncs the checkboxes based on available context (text) if (string.IsNullOrEmpty(item.CaptionText.Trim())) { item.IsVoice = false; item.IsCaption = false; if (!item.IsShortVersionIndicated) { item.IsCallout = false; } } if (item.IsShortVersionIndicated && string.IsNullOrEmpty(item.CalloutText.Trim())) { item.IsCallout = false; } if ((uncheckAzureAudio && AudioService.IsAzureVoiceSelectedForItem(item)) || (uncheckWatsonAudio && AudioService.IsWatsonVoiceSelectedForItem(item))) { item.IsVoice = false; item.VoiceLabel = string.Empty; } }
public static AudioService getInstance() { return _instance != null ? _instance : _instance = new AudioService(); }
public AudioServiceBinder( AudioService service ) { Rock.Mobile.Util.Debug.WriteLine( "AudioServiceBinder created" ); Service = service; }
protected override void Initialize() { #region IInputDeviceService inputDeviceService = new InputDeviceServiceComponent(this); inputDeviceService.UpdateOrder = 0; Components.Add(inputDeviceService); Services.AddService<IInputDeviceService>(inputDeviceService); #endregion #region IAudioService audioService = new AudioService(this, true); audioService.UpdateOrder = 10; Components.Add(audioService); Services.AddService<IAudioService>(audioService); #endregion #region IScreenService screenContainer = new ScreenContainer(this); screenContainer.BackgroundColor = Color.DimGray; screenContainer.UpdateOrder = 20; screenContainer.DrawOrder = 10; Components.Add(screenContainer); #endregion #region IPhysicsService // JigLibX ����������܂��B var physicsSystem = new PhysicsSystem(); // Freezing ��L���ɂ��܂��B physicsSystem.EnableFreezing = true; // CollisionSystem ����������܂��B physicsSystem.CollisionSystem = new CollisionSystemSAP(); // DetectFunctor ��o�^���܂��B physicsSystem.CollisionSystem.RegisterCollDetectFunctor(new CollDetectBoxCubicHeightmap()); physicsSystem.CollisionSystem.RegisterCollDetectFunctor(new CollDetectCapsuleCubicHeightmap()); // �� IPhysicsService ����������܂��B physicsService = new JigLibXAsyncPhysicsService(this, physicsSystem); // ICollisionShape ��o�^���܂��B physicsService.AddCollisionShape<IBoxCollisionShape, BoxCollisionShape>(); physicsService.AddCollisionShape<IMeshCollisionShape, MeshCollisionShape>(); physicsService.AddCollisionShape<ISlopeCollisionShape, SlopeCollisionShape>(); physicsService.AddCollisionShape<IPlaneCollisionShape, PlaneCollisionShape>(); physicsService.AddCollisionShape<ICubeHeightmapCollisionShape, CubeHeightmapCollisionShape>(); // �e�X�g�p�� ICollisionTester ��o�^���܂��B //physicsService.CollisionTester = new SampleCollisionTester(); // �� IPhysicsService ��T�[�r�X�o�^���܂��B Services.AddService<IPhysicsService>(physicsService); #endregion #region Debugs #if DEBUG InitializeDebugContent(); #endif #endregion base.Initialize(); audioService.SetVolume("Music", 0.1f); }