コード例 #1
0
            int AddWave(int address)
            {
                if (savedSamples.Contains(address))
                {
                    return(6 + savedSamples.IndexOf(address));
                }
                savedSamples.Add(address);

                float[] ieee  = GBSamples.PCM4ToFloat(address);
                short[] pcm16 = FloatToPCM16(ieee);
                return((int)sf2.AddSample(pcm16, string.Format("Wave 0x{0:X7}", address), true, 0, 7040, 69, 0));
            }
コード例 #2
0
        public void Init(byte ownerIdx, Note note, ADSR env, int address)
        {
            Init(ownerIdx, note, env);

            sample = GBSamples.PCM4ToFloat(address);
        }