• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# IAudioService类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: PlayerService

 public PlayerService(Game game, IInputService inputService, IAudioService audioService, IPlayerFactory playerFactory, ITerrainService terrainService)
     : base(game)
 {
     this.inputService = inputService;
     this.audioService = audioService;
     this.playerFactory = playerFactory;
     this.terrainService = terrainService;
 }
开发者ID:scenex,项目名称:SpaceFighter,代码行数:8,代码来源:PlayerService.cs


示例17: FingerprintService

 public FingerprintService(
     IAudioService audioService,
     IFingerprintDescriptor fingerprintDescriptor,
     IWaveletDecomposition waveletDecomposition)
 {
     this.waveletDecomposition = waveletDecomposition;
     this.fingerprintDescriptor = fingerprintDescriptor;
     this.audioService = audioService;
 }
开发者ID:eugentorica,项目名称:soundfingerprinting,代码行数:9,代码来源:FingerprintService.cs


示例18: MKVMergeDefaultSettingsService

 public MKVMergeDefaultSettingsService(EAC3ToConfiguration eac3toConfiguration, ApplicationSettings applicationSettings, BluRaySummaryInfo bluRaySummaryInfo, 
     IMKVMergeLanguageService languageService, IAudioService audioService)
 {
     _eac3toConfiguration = eac3toConfiguration;
     _applicationSettings = applicationSettings;
     _bluRaySummaryInfo = bluRaySummaryInfo;
     _languageService = languageService;
     _audioService = audioService;
 }
开发者ID:yaboy58,项目名称:BatchGuy,代码行数:9,代码来源:MKVMergeDefaultSettingsService.cs


示例19: 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 = "secondsToRead">Milliseconds to gather</param>
        /// <param name = "startAtSecond">Starting millisecond</param>
        /// <returns>Music samples</returns>
        public static float[] GetTrackSamples(Track track, IAudioService proxy, int sampleRate, int secondsToRead, int startAtSecond)
        {
            if (track == null || track.Path == null)
            {
                return null;
            }

            return proxy.ReadMonoFromFile(track.Path, sampleRate, secondsToRead, startAtSecond);
        }
开发者ID:jorik041,项目名称:soundfingerprinting,代码行数:18,代码来源:TrackHelper.cs


示例20: EAC3ToBatchFileWriteService

 public EAC3ToBatchFileWriteService(EAC3ToConfiguration eac3toConfiguration, IDirectorySystemService directorySystemService, List<BluRayDiscInfo> bluRayDiscInfo, IAudioService audioService, AbstractEAC3ToOutputNamingService eac3ToOutputNamingService, IEAC3ToCommonRulesValidatorService eac3ToCommonRulesValidatorService)
 {
     _bluRayDiscInfoList = bluRayDiscInfo;
     _eac3toConfiguration = eac3toConfiguration;
     _directorySystemService = directorySystemService;
     _audioService = audioService;
     _eac3ToOutputNamingService = eac3ToOutputNamingService;
     _eac3ToCommonRulesValidatorService = eac3ToCommonRulesValidatorService;
     _errors = new ErrorCollection();
 }
开发者ID:yaboy58,项目名称:BatchGuy,代码行数:10,代码来源:EAC3ToBatchFileWriteService.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# IAudioSource类代码示例发布时间:2022-05-24
下一篇:
C# IAttributesCollection类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap