当前位置: 首页>>代码示例>>C#>>正文


C# IAudioService类代码示例

本文整理汇总了C#中IAudioService的典型用法代码示例。如果您正苦于以下问题:C# IAudioService类的具体用法?C# IAudioService怎么用?C# IAudioService使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


IAudioService类属于命名空间,在下文中一共展示了IAudioService类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: GetParser

        public static Parser<DoNotAwaitAction> GetParser(
            int indentLevel,
            IAudioService audioService,
            IDelayService delayService,
            ILoggerService loggerService,
            ISpeechService speechService)
        {
            if (indentLevel < 0)
            {
                throw new ArgumentException("indentLevel must be greater than or equal to 0.", "indentLevel");
            }

            audioService.AssertNotNull(nameof(audioService));
            delayService.AssertNotNull(nameof(delayService));
            loggerService.AssertNotNull(nameof(loggerService));
            speechService.AssertNotNull(nameof(speechService));

            return
                from _ in Parse.IgnoreCase("don't")
                from __ in HorizontalWhitespaceParser.Parser.AtLeastOnce()
                from ___ in Parse.IgnoreCase("wait:")
                from ____ in VerticalSeparationParser.Parser.AtLeastOnce()
                from actions in ActionListParser.GetParser(indentLevel + 1, audioService, delayService, loggerService, speechService)
                let child = new SequenceAction(actions)
                select new DoNotAwaitAction(
                    loggerService,
                    child);
        }
开发者ID:reactiveui-forks,项目名称:WorkoutWotch,代码行数:28,代码来源:DoNotAwaitActionParser.cs

示例2: QuestionViewModel

        public QuestionViewModel(IQuestionService questionService, 
                                    INavigationService navigationService,
                                    IBadgeService badgeService,
                                    ISettingsService settingsService,
                                    ILocalizationService localizationService,
                                    IAudioService audioService)
        {
            _questionService = questionService;
            _navigationService = navigationService;
            _badgeService = badgeService;
            _settingsService = settingsService;
            _localizationService = localizationService;
            _audioService = audioService;

            Messenger.Default.Register<Set>(this, Load);
            Messenger.Default.Register<CleanUp>(this, CallCleanUp);
#if DEBUG
            if (IsInDesignMode)
            {
                SelectedQuestion = new Question();

                BindQuestion(SelectedQuestion);

                ProgresLabel = "1/10";

                CorrectAnswers = 0;
                IncorrectAnswers = 0;
            }
#endif
        }
开发者ID:NatuLearn,项目名称:NumbersGame,代码行数:30,代码来源:QuestionViewModel.cs

示例3: Pong

 public Pong()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     audioService = new AudioService();
     Services.AddService(typeof(IAudioService), audioService);
 }
开发者ID:rumothy,项目名称:pong,代码行数:7,代码来源:Pong.cs

示例4: GameController

        public GameController(
            Game game,
            ICollisionDetectionService collisionDetectionService,
            IPlayerService playerService,
            IEnemyService enemyService,
            IInputService inputService,
            IHeadUpDisplayService headUpDisplayService,
            ITerrainService terrainService,
            IAudioService audioService)
            : base(game)
        {
            this.game = game;

            this.collisionDetectionService = collisionDetectionService;
            this.playerService = playerService;
            this.enemyService = enemyService;
            this.inputService = inputService;
            this.headUpDisplayService = headUpDisplayService;
            this.terrainService = terrainService;
            this.audioService = audioService;

            this.inputService.AnalogPauseChanged += delegate { this.isGamePaused = !this.isGamePaused; };
            this.inputService.PauseChanged += delegate { this.isGamePaused = !this.isGamePaused; };

            this.fadeEffect = "FadeIn";
        }
开发者ID:scenex,项目名称:SpaceFighter,代码行数:26,代码来源:GameController.cs

示例5: MainViewModel

        public MainViewModel(
            IAudioService audioService,
            ICalibrationService calibrationService,
            IDictionaryService dictionaryService,
            IKeyStateService keyStateService,
            ISuggestionStateService suggestionService,
            ICapturingStateManager capturingStateManager,
            ILastMouseActionStateManager lastMouseActionStateManager,
            IInputService inputService,
            IKeyboardOutputService keyboardOutputService,
            IMouseOutputService mouseOutputService,
            IWindowManipulationService mainWindowManipulationService,
            List<INotifyErrors> errorNotifyingServices)
        {
            this.audioService = audioService;
            this.calibrationService = calibrationService;
            this.dictionaryService = dictionaryService;
            this.keyStateService = keyStateService;
            this.suggestionService = suggestionService;
            this.capturingStateManager = capturingStateManager;
            this.lastMouseActionStateManager = lastMouseActionStateManager;
            this.inputService = inputService;
            this.keyboardOutputService = keyboardOutputService;
            this.mouseOutputService = mouseOutputService;
            this.mainWindowManipulationService = mainWindowManipulationService;
            this.errorNotifyingServices = errorNotifyingServices;

            calibrateRequest = new InteractionRequest<NotificationWithCalibrationResult>();
            SelectionMode = SelectionModes.Key;

            InitialiseKeyboard(mainWindowManipulationService);
            AttachScratchpadEnabledListener();
            AttachKeyboardSupportsCollapsedDockListener(mainWindowManipulationService);
            AttachKeyboardSupportsSimulateKeyStrokesListener();
        }
开发者ID:breebchi,项目名称:OptiKey,代码行数:35,代码来源:MainViewModel.cs

示例6: DuplicatesDetectorService

 public DuplicatesDetectorService(IModelService modelService, IAudioService audioService, IFingerprintCommandBuilder fingerprintCommandBuilder, IQueryFingerprintService queryFingerprintService)
 {
     this.modelService = modelService;
     this.audioService = audioService;
     this.fingerprintCommandBuilder = fingerprintCommandBuilder;
     this.queryFingerprintService = queryFingerprintService;
 }
开发者ID:RonAlimi,项目名称:soundfingerprinting,代码行数:7,代码来源:DuplicatesDetectorService.cs

示例7: GetParser

        public static Parser<IAction> GetParser(
            int indentLevel,
            IAudioService audioService,
            IDelayService delayService,
            ILoggerService loggerService,
            ISpeechService speechService)
        {
            if (indentLevel < 0)
            {
                throw new ArgumentException("indentLevel must be greater than or equal to 0.", "indentLevel");
            }

            audioService.AssertNotNull(nameof(audioService));
            delayService.AssertNotNull(nameof(delayService));
            loggerService.AssertNotNull(nameof(loggerService));
            speechService.AssertNotNull(nameof(speechService));

            return BreakActionParser.GetParser(delayService, speechService)
                .Or<IAction>(MetronomeActionParser.GetParser(audioService, delayService, loggerService))
                .Or<IAction>(PrepareActionParser.GetParser(delayService, speechService))
                .Or<IAction>(SayActionParser.GetParser(speechService))
                .Or<IAction>(WaitActionParser.GetParser(delayService))
                .Or<IAction>(DoNotAwaitActionParser.GetParser(indentLevel, audioService, delayService, loggerService, speechService))
                .Or<IAction>(ParallelActionParser.GetParser(indentLevel, audioService, delayService, loggerService, speechService))
                .Or<IAction>(SequenceActionParser.GetParser(indentLevel, audioService, delayService, loggerService, speechService));
        }
开发者ID:reactiveui-forks,项目名称:WorkoutWotch,代码行数:26,代码来源:ActionParser.cs

示例8: MainWindow

        public MainWindow(
            IAudioService audioService,
            IDictionaryService dictionaryService,
            IInputService inputService)
        {
            InitializeComponent();

            this.audioService = audioService;
            this.dictionaryService = dictionaryService;
            this.inputService = inputService;

            managementWindowRequest = new InteractionRequest<NotificationWithServices>();

            //Setup key binding (Alt-C and Shift-Alt-C) to open settings
            InputBindings.Add(new KeyBinding
            {
                Command = new DelegateCommand(RequestManagementWindow),
                Modifiers = ModifierKeys.Alt,
                Key = Key.M
            });
            InputBindings.Add(new KeyBinding
            {
                Command = new DelegateCommand(RequestManagementWindow),
                Modifiers = ModifierKeys.Shift | ModifierKeys.Alt,
                Key = Key.M
            });

            Title = string.Format(Properties.Resources.WINDOW_TITLE, DiagnosticInfo.AssemblyVersion);
        }
开发者ID:ninehundred1,项目名称:OptiKey,代码行数:29,代码来源:MainWindow.xaml.cs

示例9: connect

        public void connect(String url, IAudioServiceCallBack callback, EventHandler openedEvt = null, EventHandler faultEvt = null) //url = "net.tcp://localhost:8080/AudioService"
        {
            try
            {
                 duplex = new DuplexChannelFactory<IAudioService>(callback, new NetTcpBinding(),
                     new EndpointAddress(url));
                
                 service = duplex.CreateChannel();
                 channel = (ICommunicationObject)service;
                 IClientChannel c = (IClientChannel)channel;
                 c.OperationTimeout = TimeSpan.FromSeconds(5);
                 
                 channel.Opened += new EventHandler(delegate(object o, EventArgs e)
                    {
                        Console.WriteLine("Connection ok!");
                    });

                if(openedEvt != null)
                 channel.Opened += openedEvt;
                if(faultEvt != null)
                 channel.Faulted += faultEvt;
                 channel.Faulted += new EventHandler(delegate(object o, EventArgs e)
                    {
                        Console.WriteLine("Connection lost");
                    });

            }
            catch (Exception e)
            {
                Console.WriteLine("Connection error: " + e.Message);
            }
        }
开发者ID:kaizadj,项目名称:ebu-radio-production,代码行数:32,代码来源:AudioServiceConnection.cs

示例10: EventSettingItem

 public EventSettingItem(EventSettingsViewModel eventSettingsViewModel, EventSetting eventSetting, IAudioService audioService, ISettingsService settingsService)
 {
     this.eventSettingsViewModel = eventSettingsViewModel;
     EventSetting = eventSetting;
     this.audioService = audioService;
     this.settingsService = settingsService;
 }
开发者ID:pjmagee,项目名称:swtor-caster,代码行数:7,代码来源:EventSettingItem.cs

示例11: GetTrackSamples

 /// <summary>
 ///   Get track samples
 /// </summary>
 /// <param name = "track">Track from which to gather samples</param>
 /// <param name = "proxy">Proxy used in gathering samples</param>
 /// <param name = "sampleRate">Sample rate used in gathering samples</param>
 /// <param name = "milliseconds">Milliseconds to gather</param>
 /// <param name = "startmilliseconds">Starting millisecond</param>
 /// <returns></returns>
 public static float[] GetTrackSamples(Track track, IAudioService proxy, int sampleRate, int milliseconds, int startmilliseconds)
 {
     if (track == null || track.Path == null)
         return null;
     //read 5512 Hz, Mono, PCM, with a specific audioService
     return proxy.ReadMonoFromFile(track.Path, sampleRate, milliseconds, startmilliseconds);
 }
开发者ID:eugentorica,项目名称:soundfingerprinting,代码行数:16,代码来源:TrackHelper.cs

示例12: WinMisc

        public WinMisc(IFingerprintCommandBuilder fingerprintCommandBuilder, IAudioService audioService)
        {
            this.fingerprintCommandBuilder = fingerprintCommandBuilder;
            this.audioService = audioService;

            InitializeComponent();
            Icon = Resources.Sound;
        }
开发者ID:RonAlimi,项目名称:soundfingerprinting,代码行数:8,代码来源:WinMisc.cs

示例13: UsingServices

 public IQueryCommand UsingServices(IModelService modelService, IAudioService audioService)
 {
     this.modelService = modelService;
     createFingerprintMethod = () => fingerprintingMethodFromSelector()
                                         .WithFingerprintConfig(FingerprintConfiguration)
                                         .UsingServices(audioService);
     return this;
 }
开发者ID:AddictedCS,项目名称:soundfingerprinting,代码行数:8,代码来源:QueryCommand.cs

示例14: AudioAction

        public AudioAction(IAudioService audioService, string audioName)
        {
            Ensure.ArgumentNotNull(audioService, nameof(audioService));
            Ensure.ArgumentNotNull(audioName, nameof(audioName));

            this.audioService = audioService;
            this.audioName = audioName;
        }
开发者ID:gregjones60,项目名称:WorkoutWotch,代码行数:8,代码来源:AudioAction.cs

示例15: AudioAction

        public AudioAction(IAudioService audioService, string audioName)
        {
            audioService.AssertNotNull(nameof(audioService));
            audioName.AssertNotNull(nameof(audioName));

            this.audioService = audioService;
            this.audioName = audioName;
        }
开发者ID:reactiveui-forks,项目名称:WorkoutWotch,代码行数:8,代码来源:AudioAction.cs


注:本文中的IAudioService类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。