From 0077d460f1db9fc801ed8ece63daa0bdfd103831 Mon Sep 17 00:00:00 2001 From: Sean Fausett Date: Wed, 3 Mar 2010 08:04:43 +0000 Subject: [PATCH] Cosmetic changes. Reduced DirectSound volume to 50%. --HG-- extra : convert_revision : svn%3Affd33b8c-2492-42e0-bdc5-587b920b7d6d/trunk%4042217 --- Library/DirectSound.cs | 4 +++- Library/DirectSoundInterop.cs | 2 +- Library/Silverlight/Properties/AssemblyInfo.cs | 3 ++- Library/Wpf/Properties/AssemblyInfo.cs | 3 ++- Library/Xna/Properties/AssemblyInfo.cs | 3 ++- Virtu/MachineSettings.cs | 12 ++++++------ Virtu/Silverlight/Properties/AssemblyInfo.cs | 3 ++- Virtu/Video.cs | 8 ++++---- Virtu/Wpf/Properties/AssemblyInfo.cs | 3 ++- Virtu/Xna/Properties/AssemblyInfo.cs | 3 ++- 10 files changed, 26 insertions(+), 18 deletions(-) diff --git a/Library/DirectSound.cs b/Library/DirectSound.cs index a2da0c8..daa520e 100644 --- a/Library/DirectSound.cs +++ b/Library/DirectSound.cs @@ -67,7 +67,7 @@ private void Initialize() GCHandleHelpers.Pin(new WaveFormat(_sampleRate, _sampleChannels, _sampleBits), waveFormat => { - BufferDescription description = new BufferDescription(BufferCapabilities.CtrlPositionNotify, BlockCount * _sampleSize, waveFormat); + BufferDescription description = new BufferDescription(BufferCapabilities.CtrlPositionNotify | BufferCapabilities.CtrlVolume, BlockCount * _sampleSize, waveFormat); _device.CreateSoundBuffer(description, out _buffer, IntPtr.Zero); }); ClearBuffer(); @@ -78,6 +78,8 @@ private void Initialize() }; ((IDirectSoundNotify)_buffer).SetNotificationPositions(positionEvents.Length, positionEvents); + _buffer.SetVolume(-1500); // 50 % + _buffer.Play(0, 0, BufferPlay.Looping); } diff --git a/Library/DirectSoundInterop.cs b/Library/DirectSoundInterop.cs index b7244d3..722c524 100644 --- a/Library/DirectSoundInterop.cs +++ b/Library/DirectSoundInterop.cs @@ -9,7 +9,7 @@ namespace Jellyfish.Library public sealed partial class DirectSound { [Flags] - private enum BufferCapabilities { PrimaryBuffer = 0x00000001, CtrlPositionNotify = 0x00000100, StickyFocus = 0x00004000, GlobalFocus = 0x00008000 } + private enum BufferCapabilities { PrimaryBuffer = 0x00000001, CtrlVolume = 0x00000080, CtrlPositionNotify = 0x00000100, StickyFocus = 0x00004000, GlobalFocus = 0x00008000 } [Flags] private enum BufferLock { None = 0x00000000, FromWriteCursor = 0x00000001, EntireBuffer = 0x00000002 } diff --git a/Library/Silverlight/Properties/AssemblyInfo.cs b/Library/Silverlight/Properties/AssemblyInfo.cs index 555a0ec..e429c70 100644 --- a/Library/Silverlight/Properties/AssemblyInfo.cs +++ b/Library/Silverlight/Properties/AssemblyInfo.cs @@ -8,11 +8,12 @@ [assembly: AssemblyDescription("Common Library")] [assembly: AssemblyProduct("Jellyfish.Library.Silverlight")] [assembly: AssemblyCompany("Digital Jellyfish Design Ltd")] -[assembly: AssemblyCopyright("Copyright © 2009 Digital Jellyfish Design Ltd")] +[assembly: AssemblyCopyright("Copyright © 2009-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett")] [assembly: AssemblyVersion("0.1.0.0")] [assembly: AssemblyFileVersion("0.1.0.0")] +[assembly: AssemblyInformationalVersion("0.1.0.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Library/Wpf/Properties/AssemblyInfo.cs b/Library/Wpf/Properties/AssemblyInfo.cs index a8f2e30..b564d21 100644 --- a/Library/Wpf/Properties/AssemblyInfo.cs +++ b/Library/Wpf/Properties/AssemblyInfo.cs @@ -8,11 +8,12 @@ [assembly: AssemblyDescription("Common Library")] [assembly: AssemblyProduct("Jellyfish.Library.Wpf")] [assembly: AssemblyCompany("Digital Jellyfish Design Ltd")] -[assembly: AssemblyCopyright("Copyright © 2009 Digital Jellyfish Design Ltd")] +[assembly: AssemblyCopyright("Copyright © 2009-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett")] [assembly: AssemblyVersion("0.1.0.0")] [assembly: AssemblyFileVersion("0.1.0.0")] +[assembly: AssemblyInformationalVersion("0.1.0.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Library/Xna/Properties/AssemblyInfo.cs b/Library/Xna/Properties/AssemblyInfo.cs index c1e32ec..7133da5 100644 --- a/Library/Xna/Properties/AssemblyInfo.cs +++ b/Library/Xna/Properties/AssemblyInfo.cs @@ -14,13 +14,14 @@ [assembly: AssemblyProduct("Jellyfish.Library.Xna")] #endif [assembly: AssemblyCompany("Digital Jellyfish Design Ltd")] -[assembly: AssemblyCopyright("Copyright © 2009 Digital Jellyfish Design Ltd")] +[assembly: AssemblyCopyright("Copyright © 2009-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett")] [assembly: AssemblyVersion("0.1.0.0")] #if WINDOWS [assembly: AssemblyFileVersion("0.1.0.0")] #endif +[assembly: AssemblyInformationalVersion("0.1.0.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Virtu/MachineSettings.cs b/Virtu/MachineSettings.cs index b5354d3..c26d6c0 100644 --- a/Virtu/MachineSettings.cs +++ b/Virtu/MachineSettings.cs @@ -38,7 +38,7 @@ public MachineSettings() }; Video = new VideoSettings { - IsFullScreen = false, IsMonochrome = false, ScannerModes = ScannerModes.None, + IsFullScreen = false, IsMonochrome = false, ScannerOptions = ScannerOptions.None, Color = new ColorSettings { Black = 0x000000, @@ -172,8 +172,8 @@ public void Deserialize(Stream stream) Video = new VideoSettings { IsFullScreen = (bool)video.Attribute("IsFullScreen"), - IsMonochrome = (bool)video.Attribute("IsMonochrome"), - ScannerModes = (ScannerModes)Enum.Parse(typeof(ScannerModes), (string)video.Attribute("ScannerModes"), true), + IsMonochrome = (bool)video.Attribute("IsMonochrome"), + ScannerOptions = (ScannerOptions)Enum.Parse(typeof(ScannerOptions), (string)video.Attribute("ScannerOptions"), true), Color = new ColorSettings { Black = (uint)color.Attribute("Black"), @@ -269,7 +269,7 @@ public void Serialize(Stream stream) new XElement(ns + "Video", new XAttribute("IsFullScreen", Video.IsFullScreen), new XAttribute("IsMonochrome", Video.IsMonochrome), - new XAttribute("ScannerModes", Video.ScannerModes), + new XAttribute("ScannerOptions", Video.ScannerOptions), new XElement(ns + "Color", new XAttribute("Black", Video.Color.Black), new XAttribute("DarkBlue", Video.Color.DarkBlue), @@ -378,13 +378,13 @@ public sealed class ColorSettings } [Flags] - public enum ScannerModes { None = 0x0, AppleII = 0x1, Pal = 0x2 } // defaults to AppleIIe, Ntsc + public enum ScannerOptions { None = 0x0, AppleII = 0x1, Pal = 0x2 } // defaults to AppleIIe, Ntsc public sealed class VideoSettings { public bool IsFullScreen { get; set; } public bool IsMonochrome { get; set; } - public ScannerModes ScannerModes { get; set; } + public ScannerOptions ScannerOptions { get; set; } public ColorSettings Color { get; set; } }; } diff --git a/Virtu/Silverlight/Properties/AssemblyInfo.cs b/Virtu/Silverlight/Properties/AssemblyInfo.cs index 980bc38..4c466ab 100644 --- a/Virtu/Silverlight/Properties/AssemblyInfo.cs +++ b/Virtu/Silverlight/Properties/AssemblyInfo.cs @@ -8,11 +8,12 @@ [assembly: AssemblyDescription("Apple IIe Emulator")] [assembly: AssemblyProduct("Jellyfish.Virtu.Silverlight")] [assembly: AssemblyCompany("Digital Jellyfish Design Ltd")] -[assembly: AssemblyCopyright("Copyright © 1995-2009 Digital Jellyfish Design Ltd")] +[assembly: AssemblyCopyright("Copyright © 1995-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett & Nick Westgate")] [assembly: AssemblyVersion("0.7.0.0")] [assembly: AssemblyFileVersion("0.7.0.0")] +[assembly: AssemblyInformationalVersion("0.7.0.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Virtu/Video.cs b/Virtu/Video.cs index 9b8baea..564b20a 100644 --- a/Virtu/Video.cs +++ b/Virtu/Video.cs @@ -108,7 +108,7 @@ public int ReadFloatingBus() else { address |= _memory.IsVideoPage2 ? 0x0800 : 0x0400; - if (((_scannerModes & ScannerModes.AppleII) != 0) && (hCount < HCountLeaveHBlank)) + if (((_scannerOptions & ScannerOptions.AppleII) != 0) && (hCount < HCountLeaveHBlank)) { address |= 0x1000; } @@ -976,8 +976,8 @@ private void UpdateSettings() _colorPalette[ColorDHiresE] = settings.Color.Yellow; _colorPalette[ColorDHiresF] = settings.Color.White; - _scannerModes = settings.ScannerModes; - if ((_scannerModes & ScannerModes.Pal) != 0) + _scannerOptions = settings.ScannerOptions; + if ((_scannerOptions & ScannerOptions.Pal) != 0) { _vCountPreset = VCountPresetPal; _vLineLeaveVBlank = VLineLeaveVBlankPal; @@ -1022,6 +1022,6 @@ private void UpdateSettings() private int _cyclesPerFlash; private int _vCountPreset; private int _vLineLeaveVBlank; - private ScannerModes _scannerModes; + private ScannerOptions _scannerOptions; } } diff --git a/Virtu/Wpf/Properties/AssemblyInfo.cs b/Virtu/Wpf/Properties/AssemblyInfo.cs index 6ff3f60..ab776a9 100644 --- a/Virtu/Wpf/Properties/AssemblyInfo.cs +++ b/Virtu/Wpf/Properties/AssemblyInfo.cs @@ -9,11 +9,12 @@ [assembly: AssemblyDescription("Apple IIe Emulator")] [assembly: AssemblyProduct("Jellyfish.Virtu.Wpf")] [assembly: AssemblyCompany("Digital Jellyfish Design Ltd")] -[assembly: AssemblyCopyright("Copyright © 1995-2009 Digital Jellyfish Design Ltd")] +[assembly: AssemblyCopyright("Copyright © 1995-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett & Nick Westgate")] [assembly: AssemblyVersion("0.7.0.0")] [assembly: AssemblyFileVersion("0.7.0.0")] +[assembly: AssemblyInformationalVersion("0.7.0.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)] diff --git a/Virtu/Xna/Properties/AssemblyInfo.cs b/Virtu/Xna/Properties/AssemblyInfo.cs index 8f1e9f0..eb52d5e 100644 --- a/Virtu/Xna/Properties/AssemblyInfo.cs +++ b/Virtu/Xna/Properties/AssemblyInfo.cs @@ -12,13 +12,14 @@ [assembly: AssemblyProduct("Jellyfish.Virtu.Xna")] #endif [assembly: AssemblyCompany("Digital Jellyfish Design Ltd")] -[assembly: AssemblyCopyright("Copyright © 1995-2009 Digital Jellyfish Design Ltd")] +[assembly: AssemblyCopyright("Copyright © 1995-2010 Digital Jellyfish Design Ltd")] [assembly: AssemblyComment("Developed by Sean Fausett & Nick Westgate")] [assembly: AssemblyVersion("0.7.0.0")] #if WINDOWS [assembly: AssemblyFileVersion("0.7.0.0")] #endif +[assembly: AssemblyInformationalVersion("0.7.0.0")] [assembly: CLSCompliant(false)] [assembly: ComVisible(false)]