mirror of
https://github.com/digital-jellyfish/Virtu.git
synced 2024-06-13 23:29:28 +00:00
Cosmetic changes.
Reduced DirectSound volume to 50%. --HG-- extra : convert_revision : svn%3Affd33b8c-2492-42e0-bdc5-587b920b7d6d/trunk%4042217
This commit is contained in:
parent
5d44f5292f
commit
0077d460f1
|
@ -67,7 +67,7 @@ private void Initialize()
|
||||||
|
|
||||||
GCHandleHelpers.Pin(new WaveFormat(_sampleRate, _sampleChannels, _sampleBits), waveFormat =>
|
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);
|
_device.CreateSoundBuffer(description, out _buffer, IntPtr.Zero);
|
||||||
});
|
});
|
||||||
ClearBuffer();
|
ClearBuffer();
|
||||||
|
@ -78,6 +78,8 @@ private void Initialize()
|
||||||
};
|
};
|
||||||
((IDirectSoundNotify)_buffer).SetNotificationPositions(positionEvents.Length, positionEvents);
|
((IDirectSoundNotify)_buffer).SetNotificationPositions(positionEvents.Length, positionEvents);
|
||||||
|
|
||||||
|
_buffer.SetVolume(-1500); // 50 %
|
||||||
|
|
||||||
_buffer.Play(0, 0, BufferPlay.Looping);
|
_buffer.Play(0, 0, BufferPlay.Looping);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ namespace Jellyfish.Library
|
||||||
public sealed partial class DirectSound
|
public sealed partial class DirectSound
|
||||||
{
|
{
|
||||||
[Flags]
|
[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]
|
[Flags]
|
||||||
private enum BufferLock { None = 0x00000000, FromWriteCursor = 0x00000001, EntireBuffer = 0x00000002 }
|
private enum BufferLock { None = 0x00000000, FromWriteCursor = 0x00000001, EntireBuffer = 0x00000002 }
|
||||||
|
|
|
@ -8,11 +8,12 @@
|
||||||
[assembly: AssemblyDescription("Common Library")]
|
[assembly: AssemblyDescription("Common Library")]
|
||||||
[assembly: AssemblyProduct("Jellyfish.Library.Silverlight")]
|
[assembly: AssemblyProduct("Jellyfish.Library.Silverlight")]
|
||||||
[assembly: AssemblyCompany("Digital Jellyfish Design Ltd")]
|
[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: AssemblyComment("Developed by Sean Fausett")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.1.0.0")]
|
[assembly: AssemblyVersion("0.1.0.0")]
|
||||||
[assembly: AssemblyFileVersion("0.1.0.0")]
|
[assembly: AssemblyFileVersion("0.1.0.0")]
|
||||||
|
[assembly: AssemblyInformationalVersion("0.1.0.0")]
|
||||||
|
|
||||||
[assembly: CLSCompliant(false)]
|
[assembly: CLSCompliant(false)]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
@ -8,11 +8,12 @@
|
||||||
[assembly: AssemblyDescription("Common Library")]
|
[assembly: AssemblyDescription("Common Library")]
|
||||||
[assembly: AssemblyProduct("Jellyfish.Library.Wpf")]
|
[assembly: AssemblyProduct("Jellyfish.Library.Wpf")]
|
||||||
[assembly: AssemblyCompany("Digital Jellyfish Design Ltd")]
|
[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: AssemblyComment("Developed by Sean Fausett")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.1.0.0")]
|
[assembly: AssemblyVersion("0.1.0.0")]
|
||||||
[assembly: AssemblyFileVersion("0.1.0.0")]
|
[assembly: AssemblyFileVersion("0.1.0.0")]
|
||||||
|
[assembly: AssemblyInformationalVersion("0.1.0.0")]
|
||||||
|
|
||||||
[assembly: CLSCompliant(false)]
|
[assembly: CLSCompliant(false)]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
@ -14,13 +14,14 @@
|
||||||
[assembly: AssemblyProduct("Jellyfish.Library.Xna")]
|
[assembly: AssemblyProduct("Jellyfish.Library.Xna")]
|
||||||
#endif
|
#endif
|
||||||
[assembly: AssemblyCompany("Digital Jellyfish Design Ltd")]
|
[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: AssemblyComment("Developed by Sean Fausett")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.1.0.0")]
|
[assembly: AssemblyVersion("0.1.0.0")]
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
[assembly: AssemblyFileVersion("0.1.0.0")]
|
[assembly: AssemblyFileVersion("0.1.0.0")]
|
||||||
#endif
|
#endif
|
||||||
|
[assembly: AssemblyInformationalVersion("0.1.0.0")]
|
||||||
|
|
||||||
[assembly: CLSCompliant(false)]
|
[assembly: CLSCompliant(false)]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
@ -38,7 +38,7 @@ public MachineSettings()
|
||||||
};
|
};
|
||||||
Video = new VideoSettings
|
Video = new VideoSettings
|
||||||
{
|
{
|
||||||
IsFullScreen = false, IsMonochrome = false, ScannerModes = ScannerModes.None,
|
IsFullScreen = false, IsMonochrome = false, ScannerOptions = ScannerOptions.None,
|
||||||
Color = new ColorSettings
|
Color = new ColorSettings
|
||||||
{
|
{
|
||||||
Black = 0x000000,
|
Black = 0x000000,
|
||||||
|
@ -172,8 +172,8 @@ public void Deserialize(Stream stream)
|
||||||
Video = new VideoSettings
|
Video = new VideoSettings
|
||||||
{
|
{
|
||||||
IsFullScreen = (bool)video.Attribute("IsFullScreen"),
|
IsFullScreen = (bool)video.Attribute("IsFullScreen"),
|
||||||
IsMonochrome = (bool)video.Attribute("IsMonochrome"),
|
IsMonochrome = (bool)video.Attribute("IsMonochrome"),
|
||||||
ScannerModes = (ScannerModes)Enum.Parse(typeof(ScannerModes), (string)video.Attribute("ScannerModes"), true),
|
ScannerOptions = (ScannerOptions)Enum.Parse(typeof(ScannerOptions), (string)video.Attribute("ScannerOptions"), true),
|
||||||
Color = new ColorSettings
|
Color = new ColorSettings
|
||||||
{
|
{
|
||||||
Black = (uint)color.Attribute("Black"),
|
Black = (uint)color.Attribute("Black"),
|
||||||
|
@ -269,7 +269,7 @@ public void Serialize(Stream stream)
|
||||||
new XElement(ns + "Video",
|
new XElement(ns + "Video",
|
||||||
new XAttribute("IsFullScreen", Video.IsFullScreen),
|
new XAttribute("IsFullScreen", Video.IsFullScreen),
|
||||||
new XAttribute("IsMonochrome", Video.IsMonochrome),
|
new XAttribute("IsMonochrome", Video.IsMonochrome),
|
||||||
new XAttribute("ScannerModes", Video.ScannerModes),
|
new XAttribute("ScannerOptions", Video.ScannerOptions),
|
||||||
new XElement(ns + "Color",
|
new XElement(ns + "Color",
|
||||||
new XAttribute("Black", Video.Color.Black),
|
new XAttribute("Black", Video.Color.Black),
|
||||||
new XAttribute("DarkBlue", Video.Color.DarkBlue),
|
new XAttribute("DarkBlue", Video.Color.DarkBlue),
|
||||||
|
@ -378,13 +378,13 @@ public sealed class ColorSettings
|
||||||
}
|
}
|
||||||
|
|
||||||
[Flags]
|
[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 sealed class VideoSettings
|
||||||
{
|
{
|
||||||
public bool IsFullScreen { get; set; }
|
public bool IsFullScreen { get; set; }
|
||||||
public bool IsMonochrome { get; set; }
|
public bool IsMonochrome { get; set; }
|
||||||
public ScannerModes ScannerModes { get; set; }
|
public ScannerOptions ScannerOptions { get; set; }
|
||||||
public ColorSettings Color { get; set; }
|
public ColorSettings Color { get; set; }
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,12 @@
|
||||||
[assembly: AssemblyDescription("Apple IIe Emulator")]
|
[assembly: AssemblyDescription("Apple IIe Emulator")]
|
||||||
[assembly: AssemblyProduct("Jellyfish.Virtu.Silverlight")]
|
[assembly: AssemblyProduct("Jellyfish.Virtu.Silverlight")]
|
||||||
[assembly: AssemblyCompany("Digital Jellyfish Design Ltd")]
|
[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: AssemblyComment("Developed by Sean Fausett & Nick Westgate")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.7.0.0")]
|
[assembly: AssemblyVersion("0.7.0.0")]
|
||||||
[assembly: AssemblyFileVersion("0.7.0.0")]
|
[assembly: AssemblyFileVersion("0.7.0.0")]
|
||||||
|
[assembly: AssemblyInformationalVersion("0.7.0.0")]
|
||||||
|
|
||||||
[assembly: CLSCompliant(false)]
|
[assembly: CLSCompliant(false)]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
@ -108,7 +108,7 @@ public int ReadFloatingBus()
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
address |= _memory.IsVideoPage2 ? 0x0800 : 0x0400;
|
address |= _memory.IsVideoPage2 ? 0x0800 : 0x0400;
|
||||||
if (((_scannerModes & ScannerModes.AppleII) != 0) && (hCount < HCountLeaveHBlank))
|
if (((_scannerOptions & ScannerOptions.AppleII) != 0) && (hCount < HCountLeaveHBlank))
|
||||||
{
|
{
|
||||||
address |= 0x1000;
|
address |= 0x1000;
|
||||||
}
|
}
|
||||||
|
@ -976,8 +976,8 @@ private void UpdateSettings()
|
||||||
_colorPalette[ColorDHiresE] = settings.Color.Yellow;
|
_colorPalette[ColorDHiresE] = settings.Color.Yellow;
|
||||||
_colorPalette[ColorDHiresF] = settings.Color.White;
|
_colorPalette[ColorDHiresF] = settings.Color.White;
|
||||||
|
|
||||||
_scannerModes = settings.ScannerModes;
|
_scannerOptions = settings.ScannerOptions;
|
||||||
if ((_scannerModes & ScannerModes.Pal) != 0)
|
if ((_scannerOptions & ScannerOptions.Pal) != 0)
|
||||||
{
|
{
|
||||||
_vCountPreset = VCountPresetPal;
|
_vCountPreset = VCountPresetPal;
|
||||||
_vLineLeaveVBlank = VLineLeaveVBlankPal;
|
_vLineLeaveVBlank = VLineLeaveVBlankPal;
|
||||||
|
@ -1022,6 +1022,6 @@ private void UpdateSettings()
|
||||||
private int _cyclesPerFlash;
|
private int _cyclesPerFlash;
|
||||||
private int _vCountPreset;
|
private int _vCountPreset;
|
||||||
private int _vLineLeaveVBlank;
|
private int _vLineLeaveVBlank;
|
||||||
private ScannerModes _scannerModes;
|
private ScannerOptions _scannerOptions;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
[assembly: AssemblyDescription("Apple IIe Emulator")]
|
[assembly: AssemblyDescription("Apple IIe Emulator")]
|
||||||
[assembly: AssemblyProduct("Jellyfish.Virtu.Wpf")]
|
[assembly: AssemblyProduct("Jellyfish.Virtu.Wpf")]
|
||||||
[assembly: AssemblyCompany("Digital Jellyfish Design Ltd")]
|
[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: AssemblyComment("Developed by Sean Fausett & Nick Westgate")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.7.0.0")]
|
[assembly: AssemblyVersion("0.7.0.0")]
|
||||||
[assembly: AssemblyFileVersion("0.7.0.0")]
|
[assembly: AssemblyFileVersion("0.7.0.0")]
|
||||||
|
[assembly: AssemblyInformationalVersion("0.7.0.0")]
|
||||||
|
|
||||||
[assembly: CLSCompliant(false)]
|
[assembly: CLSCompliant(false)]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
|
@ -12,13 +12,14 @@
|
||||||
[assembly: AssemblyProduct("Jellyfish.Virtu.Xna")]
|
[assembly: AssemblyProduct("Jellyfish.Virtu.Xna")]
|
||||||
#endif
|
#endif
|
||||||
[assembly: AssemblyCompany("Digital Jellyfish Design Ltd")]
|
[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: AssemblyComment("Developed by Sean Fausett & Nick Westgate")]
|
||||||
|
|
||||||
[assembly: AssemblyVersion("0.7.0.0")]
|
[assembly: AssemblyVersion("0.7.0.0")]
|
||||||
#if WINDOWS
|
#if WINDOWS
|
||||||
[assembly: AssemblyFileVersion("0.7.0.0")]
|
[assembly: AssemblyFileVersion("0.7.0.0")]
|
||||||
#endif
|
#endif
|
||||||
|
[assembly: AssemblyInformationalVersion("0.7.0.0")]
|
||||||
|
|
||||||
[assembly: CLSCompliant(false)]
|
[assembly: CLSCompliant(false)]
|
||||||
[assembly: ComVisible(false)]
|
[assembly: ComVisible(false)]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user