示例#1
0
        public Sound2d(string file, DirectSound.Device device)
        {
            // 2d setup
            m_description2d = new DirectSound.BufferDescription();
            m_description2d.ControlEffects        = false;
            m_description2d.ControlVolume         = true;
            m_description2d.GlobalFocus           = true;
            m_description2d.ControlPositionNotify = true;

            m_secondaryBuffer = new DirectSound.SecondaryBuffer(file, m_description2d, device);

            m_notify = new DirectSound.Notify(m_secondaryBuffer);
        }
示例#2
0
        public Sound3d(string file, DirectSound.Device device)
        {
            m_description3d = new DirectSound.BufferDescription();
            m_description3d.ControlEffects        = false;
            m_description3d.GlobalFocus           = true;
            m_description3d.Control3D             = true;
            m_description3d.ControlVolume         = true;
            m_description3d.Guid3DAlgorithm       = DirectSound.DSoundHelper.Guid3DAlgorithmHrtfFull;
            m_description3d.ControlPositionNotify = true;

            m_secondaryBuffer = new DirectSound.SecondaryBuffer(file, m_description3d, device);

            m_buffer3d          = new DirectSound.Buffer3D(m_secondaryBuffer);
            m_buffer3d.Position = new SoundVector(0, 0, 1);
            m_buffer3d.Mode     = DirectSound.Mode3D.Normal;

            m_notify = new DirectSound.Notify(m_secondaryBuffer);
        }