Cosmetic changes.

Reduced DirectSound volume to 50%.

--HG--
extra : convert_revision : svn%3Affd33b8c-2492-42e0-bdc5-587b920b7d6d/trunk%4042217
This commit is contained in:
Sean Fausett 2010-03-03 08:04:43 +00:00
parent 5d44f5292f
commit 0077d460f1
10 changed files with 26 additions and 18 deletions

View File

@ -67,7 +67,7 @@ namespace Jellyfish.Library
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 @@ namespace Jellyfish.Library
};
((IDirectSoundNotify)_buffer).SetNotificationPositions(positionEvents.Length, positionEvents);
_buffer.SetVolume(-1500); // 50 %
_buffer.Play(0, 0, BufferPlay.Looping);
}

View File

@ -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 }

View File

@ -8,11 +8,12 @@ using Jellyfish.Library;
[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)]

View File

@ -8,11 +8,12 @@ using Jellyfish.Library;
[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)]

View File

@ -14,13 +14,14 @@ using Jellyfish.Library;
[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)]

View File

@ -38,7 +38,7 @@ namespace Jellyfish.Virtu.Settings
};
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 @@ namespace Jellyfish.Virtu.Settings
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 @@ namespace Jellyfish.Virtu.Settings
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 @@ namespace Jellyfish.Virtu.Settings
}
[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; }
};
}

View File

@ -8,11 +8,12 @@ using Jellyfish.Library;
[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)]

View File

@ -108,7 +108,7 @@ namespace Jellyfish.Virtu
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 @@ namespace Jellyfish.Virtu
_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 @@ namespace Jellyfish.Virtu
private int _cyclesPerFlash;
private int _vCountPreset;
private int _vLineLeaveVBlank;
private ScannerModes _scannerModes;
private ScannerOptions _scannerOptions;
}
}

View File

@ -9,11 +9,12 @@ using Jellyfish.Library;
[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)]

View File

@ -12,13 +12,14 @@ using Jellyfish.Library;
[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)]