protected override void SetDescriptionFlags(ref Microsoft.DirectX.DirectSound.BufferDescription desc) { desc.ControlFrequency = true; desc.ControlPan = true; desc.ControlVolume = true; base.SetDescriptionFlags(ref desc); }
/// <summary> /// Creates a new JSong. /// </summary> /// <param name="filePath">The filepath for the JSong.</param> public JSong(string filePath, Microsoft.DirectX.DirectSound.Device audioDevice) { Microsoft.DirectX.DirectSound.BufferDescription desc = new Microsoft.DirectX.DirectSound.BufferDescription(); if (JfxCompatible) { desc.ControlEffects = true; desc.ControlFrequency = true; desc.ControlPan = true; desc.ControlVolume = true; desc.Control3D = true; } else { desc.ControlEffects = false; desc.ControlVolume = true; desc.Control3D = true; } music = new Microsoft.DirectX.DirectSound.SecondaryBuffer(desc, audioDevice); music.Volume = properties.Volume; CurrentState = MediaStates.Playing; }