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


C# AudioType类代码示例

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


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

示例1: AudioClipInfo

 public AudioClipInfo(AudioType type, string resourcename, string systemname, float initvolume, int maxSEcount = 16 )
 {
     ResourceName = resourcename;
     if (type == AudioType.SE)
     {
         ResourcePath = SEPath + resourcename;
     }
     else if (type == AudioType.BGM) {
         ResourcePath = BGMPath + resourcename;
     }
     SystemName = systemname;
     MaxSECount = maxSEcount;
     PlayingList = new List<SEInfo>(maxSEcount);
     StockList = new SortedList<int, SEInfo>(maxSEcount);
     InitVolume = initvolume;
     AttenuateRate = calcAttenuateRate();
     //Debug.Log("Att: " + AttenuateRate);
     for (int i = 0; i < MaxSECount; i++) {
         //Debug.LogFormat("InitVol:{0}",InitVolume);
         SEInfo seinfo = new SEInfo(i, 0f, InitVolume * Mathf.Pow(AttenuateRate, i));
         //SEInfo seinfo = new SEInfo(i, 0f, InitVolume);
         StockList.Add(seinfo.Index, seinfo);
         //Debug.Log("Vol: " + seinfo.Volume);
     }
     Loop = null;
 }
开发者ID:sgmtjp,项目名称:Git-SODATERUTOWER,代码行数:26,代码来源:SoundController.cs

示例2: PlayAudio

 public void PlayAudio(AudioType type)
 {
     foreach (var audio in AudioList.Where(audio => audio.type == type))
     {
         audio.Play();
     }
 }
开发者ID:TheWulo,项目名称:DontDoIt,代码行数:7,代码来源:AudioManager.cs

示例3: Playlist

 /**
 // \fn public Playlist(int id, string name, string filename, AudioType type)
 //
 // \brief Constructor.
 //
 // \author Simon Menetrey
 // \date 26.05.2014
 //
 // \param id       The identifier.
 // \param name     The name.
 // \param filename Filename of the file.
 // \param type     The type.
 **/
 public Playlist(int id, string name, string filename, AudioType type)
 {
     this.Id = id;
     this.Name = name;
     this.Filename = filename;
     this.Type = type;
     this.AudioFileList = new List<string>();
 }
开发者ID:psymon75,项目名称:WebradioManager,代码行数:21,代码来源:Playlist.cs

示例4: play

 public void play(AudioSource source, AudioType type)
 {
     if (canPlay (type)) {
         source.PlayOneShot (source.clip);
         audiosPlaying [type] = audiosPlaying [type] + 1;
         StartCoroutine (decrementAudiosPlaying (type, source.clip.length));
     }
 }
开发者ID:reqnux,项目名称:reqnux_TillDeath,代码行数:8,代码来源:AudioManager.cs

示例5: LocalSong

 /// <summary>
 /// Initializes a new instance of the <see cref="LocalSong"/> class.
 /// </summary>
 /// <param name="path">The path of the file.</param>
 /// <param name="audioType">The audio type.</param>
 /// <param name="duration">The duration of the song.</param>
 public LocalSong(string path, AudioType audioType, TimeSpan duration)
     : base(path, audioType, duration)
 {
     if (this.IsRemovable)
     {
         this.StreamingPath = this.OriginalPath;
     }
 }
开发者ID:dineshkummarc,项目名称:Espera,代码行数:14,代码来源:LocalSong.cs

示例6: VideoInfo

 private VideoInfo(int formatCode, VideoType videoType, int resolution, bool is3D, AudioType audioType, int audioBitrate)
 {
     this.FormatCode = formatCode;
     this.VideoType = videoType;
     this.Resolution = resolution;
     this.Is3D = is3D;
     this.AudioType = audioType;
     this.AudioBitrate = audioBitrate;
 }
开发者ID:remy22,项目名称:Youtube_downloader,代码行数:9,代码来源:VideoInfo.cs

示例7: AudioBinary

 public AudioBinary(byte[] audioBytes, AudioType audioType)
 {
     if (audioBytes == null || audioBytes.Length < 1)
     {
         throw new InvalidOperationException("AudioBytes must contain values.");
     }
     AudioBytes = audioBytes;
     AudioType = audioType;
 }
开发者ID:hoelter,项目名称:Salesforce-Meeting-Transcript,代码行数:9,代码来源:AudioBinary.cs

示例8: Audio

 public Audio(string name, string saveName, int matchScriptID)
 {
     Name = name;
     MatchScriptID = matchScriptID;
     SaveName = saveName;
     LengthMillis = AudioHelper.GetAudioLength(saveName);
     Length = AudioHelper.ConvertMillisToTime(LengthMillis);
     Type = AudioHelper.GetAudioType(saveName);
 }
开发者ID:oswellchan,项目名称:PowerPointLabs,代码行数:9,代码来源:Audio.cs

示例9: VideoInfo

 private VideoInfo(int formatCode, VideoType videoType, int resolution, bool is3D, AudioType audioType, int audioBitrate)
 {
     FormatCode = formatCode;
     VideoType = videoType;
     Resolution = resolution;
     Is3D = is3D;
     AudioType = audioType;
     AudioBitrate = audioBitrate;
 }
开发者ID:changwng,项目名称:MS.Youtube.Playlist.Downloader,代码行数:9,代码来源:VideoInfo.cs

示例10: AddNewData

        protected override int AddNewData()
        {
            m_audioType = DataManager.Generate<AudioType>();
            m_audioType.Name = m_textBox_name.Text;

            DataManager.AudioTypes.Add(m_audioType);

            return m_audioType.Id;
        }
开发者ID:ianeller-romey,项目名称:CompJS_TTTD,代码行数:9,代码来源:UserControl_AudioType.cs

示例11: CreateSongMock

        public static Mock<Song> CreateSongMock(string name = "Song", bool callBase = false, AudioType audioType = AudioType.Mp3, TimeSpan? duration = null)
        {
            if (duration == null)
            {
                duration = TimeSpan.Zero;
            }

            return new Mock<Song>(name, audioType, duration) { CallBase = callBase };
        }
开发者ID:nemoload,项目名称:Espera,代码行数:9,代码来源:Helpers.cs

示例12: YoutubeSong

        /// <summary>
        /// Initializes a new instance of the <see cref="YoutubeSong"/> class.
        /// </summary>
        /// <param name="path">The path of the song.</param>
        /// <param name="audioType">The audio type.</param>
        /// <param name="duration">The duration of the song.</param>
        /// <param name="isStreaming">if set to true, the song streams from YouTube, instead of downloading.</param>
        /// <exception cref="ArgumentNullException"><c>path</c> is null.</exception>
        public YoutubeSong(string path, AudioType audioType, TimeSpan duration, bool isStreaming)
            : base(path, audioType, duration)
        {
            this.IsStreaming = isStreaming;

            if (this.IsStreaming)
            {
                this.StreamingPath = this.OriginalPath;
            }
        }
开发者ID:dineshkummarc,项目名称:Espera,代码行数:18,代码来源:YoutubeSong.cs

示例13: GetLatestAudioSource

    public static AudioSource GetLatestAudioSource( AudioType audioType )
    {
        GameObject audioLayer = GetAudioLayer( audioType );

        AudioSource[] audioSources = audioLayer.GetComponents<AudioSource>() as AudioSource[];

        if( audioSources.Length > 0 )
            return audioSources[ audioSources.Length - 1 ];

        return audioLayer.AddComponent("AudioSource") as AudioSource;
    }
开发者ID:nolanfilter,项目名称:ProjectDeath,代码行数:11,代码来源:AudioAgent.cs

示例14: Play

 public static void Play( AudioClip clip, AudioType type )
 {
     if( type == AudioType.SFX ) {
         instance.audioSFX.PlayOneShot( clip, 1f);
     }
     else if( type == AudioType.Music && clip != instance.audioMusic.clip ) {
         instance.audioMusic.loop = true;
         instance.audioMusic.volume = 0.5f;
         instance.audioMusic.clip = clip;
         instance.audioMusic.Play();
     }
 }
开发者ID:PatriciaAE,项目名称:FUTBOLITO,代码行数:12,代码来源:AudioManager.cs

示例15: IsMuted

	public static bool IsMuted (AudioType audioType) {
		switch (audioType) {
		case AudioType.FX:
			return SettingsUtil.FXMuted;
		case AudioType.Music:
			return SettingsUtil.MusicMuted;
		case AudioType.VO:
			return SettingsUtil.VOMuted;
		default:
			throw new System.Collections.Generic.KeyNotFoundException();
		}
	}
开发者ID:imann24,项目名称:cs327-bestmobilegameever,代码行数:12,代码来源:AudioUtil.cs


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