/// <summary> /// Initializes a new AudioManager class. /// </summary> /// <param name="audioInitializer">The AudioInitializer.</param> internal AudioManager(IAudioInitializer audioInitializer) { _audioEffectGroups = new List <AudioEffectGroup>(); var logger = LogManager.GetClassLogger(); if (audioInitializer == null) { logger.Warn("The specified audio initializer was null."); } else if (!audioInitializer.IsSupported) { logger.Warn("The specified AudioProvider is not supported."); } else { AudioInitializer = audioInitializer; _audioProvider = audioInitializer.Create(); _audioProvider.PlaybackChanged += PlaybackChanged; #if DEBUG var metadata = MetaDataReader.ReadMetaData(_audioProvider); if (metadata.ContainsKey("Name")) { logger.Info("Audiosystem initialized with {0}.", metadata["Name"]); } else { logger.Info("Audiosystem initialized with unknown."); } #endif } }
public void ShouldReturnDefaultValue() { var whales = "./resources/MetaDataWithDefault"; var metaDataReader = new MetaDataReader(); var metaData = metaDataReader.ReadMetaData(whales); var coreFileMetaData = new CoreFileMetaData(metaData.Core); var fieldMetaData = coreFileMetaData.Fields[Terms.datasetID]; }
public void ShouldReturnDefaultMetaData() { var whales = "./resources/whales"; var metaDataReader = new MetaDataReader(); var metaData = metaDataReader.ReadMetaData(whales); Assert.Equal("whales.txt", metaData.Core.Files.FirstOrDefault()); Assert.Equal("\\n", metaData.Core.LinesTerminatedBy); }