Ejemplo n.º 1
0
        /// <summary>
        /// ネイティブのインスタンスからラッパー側のインスタンスを生成する。
        /// </summary>
        /// <param name="o"></param>
        /// <param name="type"></param>
        internal static SoundSource GenerateSoundSource(swig.SoundSource o, GenerationType type)
        {
            var p = o.GetPtr();

            var existing = GC.SoundSources.GetObject(p);

            existing = GenerateInternal(existing, o, type);
            if (existing != null)
            {
                return(existing);
            }

            var ret = new SoundSource(o);

            GC.SoundSources.AddObject(p, ret);
            return(ret);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 音を再生する。
        /// </summary>
        /// <param name="soundSource">音源</param>
        /// <returns>ID</returns>
        public int Play(SoundSource soundSource)
        {
            int ret = SwigObject.Play(soundSource.SwigObject);

            return(ret);
        }