From 183f5b0672ed8a75e98a338222ab2b60b19bb97b Mon Sep 17 00:00:00 2001 From: adelikat Date: Wed, 26 Apr 2017 09:10:00 -0500 Subject: [PATCH] Emulation.Common - misc cleanups mostly fixing documentation --- .../Base Implementations/NullSound.cs | 6 ++++-- .../SimpleSyncSoundProvider.cs | 2 -- .../BinaryQuickSerializer.cs | 2 +- BizHawk.Emulation.Common/CoreComms.cs | 2 +- .../Interfaces/IController.cs | 2 +- .../Interfaces/ICoreFileProvider.cs | 2 -- .../Interfaces/IEmulatorServiceProvider.cs | 6 ++++-- .../Interfaces/IMemoryCallbackSystem.cs | 14 +++++++------- .../Interfaces/Services/IDisassemblable.cs | 18 +++++++++--------- .../Interfaces/Services/ILinkable.cs | 2 +- .../Interfaces/Services/ITraceable.cs | 2 +- .../Sound/Utilities/SpeexResampler.cs | 2 -- 12 files changed, 29 insertions(+), 31 deletions(-) diff --git a/BizHawk.Emulation.Common/Base Implementations/NullSound.cs b/BizHawk.Emulation.Common/Base Implementations/NullSound.cs index 9fdace5af3..41bdf78286 100644 --- a/BizHawk.Emulation.Common/Base Implementations/NullSound.cs +++ b/BizHawk.Emulation.Common/Base Implementations/NullSound.cs @@ -20,7 +20,8 @@ namespace BizHawk.Emulation.Common } /// - /// create a NullSound that provides an exact number of audio samples per call when in sync mode + /// Initializes a new instance of the class + /// that provides an exact number of audio samples per call when in sync mode /// public NullSound(int spf) : this() @@ -30,7 +31,8 @@ namespace BizHawk.Emulation.Common } /// - /// create a NullSound that exactly matches a given framerate when in sync mode + /// Initializes a new instance of the class + /// that exactly matches a given framerate when in sync mode /// public NullSound(long fpsNum, long fpsDen) { diff --git a/BizHawk.Emulation.Common/Base Implementations/SimpleSyncSoundProvider.cs b/BizHawk.Emulation.Common/Base Implementations/SimpleSyncSoundProvider.cs index 5c7231f2ff..2e7770e311 100644 --- a/BizHawk.Emulation.Common/Base Implementations/SimpleSyncSoundProvider.cs +++ b/BizHawk.Emulation.Common/Base Implementations/SimpleSyncSoundProvider.cs @@ -25,8 +25,6 @@ namespace BizHawk.Emulation.Common.Base_Implementations /// /// Add samples to be output. no queueing; must be drained every frame /// - /// - /// public void PutSamples(short[] samples, int nsamp) { if (_nsamp != 0) diff --git a/BizHawk.Emulation.Common/BinaryQuickSerializer.cs b/BizHawk.Emulation.Common/BinaryQuickSerializer.cs index 82136e6a63..68f784fb8b 100644 --- a/BizHawk.Emulation.Common/BinaryQuickSerializer.cs +++ b/BizHawk.Emulation.Common/BinaryQuickSerializer.cs @@ -116,7 +116,7 @@ namespace BizHawk.Emulation.Common private static SerializationFactory CreateFactory(Type t) { var fields = DeepEquality.GetAllFields(t) - //.OrderBy(fi => (int)fi.GetManagedOffset()) // [StructLayout.Sequential] doesn't work with this + ////.OrderBy(fi => (int)fi.GetManagedOffset()) // [StructLayout.Sequential] doesn't work with this .OrderBy(fi => (int)Marshal.OffsetOf(t, fi.Name)) .ToList(); diff --git a/BizHawk.Emulation.Common/CoreComms.cs b/BizHawk.Emulation.Common/CoreComms.cs index 7781c47adc..84c5cb7a3c 100644 --- a/BizHawk.Emulation.Common/CoreComms.cs +++ b/BizHawk.Emulation.Common/CoreComms.cs @@ -3,7 +3,7 @@ namespace BizHawk.Emulation.Common { /// - /// This object fascilitates communications between client and core + /// This object facilitates communications between client and core /// and is used by the IEmulator interface /// The primary use is to provide a client => core communication, such as providing client-side callbacks for a core to use /// Any communications that can be described as purely a Core -> Client system, should be provided as an IEmulatorService instead diff --git a/BizHawk.Emulation.Common/Interfaces/IController.cs b/BizHawk.Emulation.Common/Interfaces/IController.cs index fd2db4f6c4..acb6ab2819 100644 --- a/BizHawk.Emulation.Common/Interfaces/IController.cs +++ b/BizHawk.Emulation.Common/Interfaces/IController.cs @@ -3,7 +3,7 @@ public interface IController { /// - /// Defines the controller schema, including all currently available buttons and their types + /// Gets a definition of the controller schema, including all currently available buttons and their types /// ControllerDefinition Definition { get; } diff --git a/BizHawk.Emulation.Common/Interfaces/ICoreFileProvider.cs b/BizHawk.Emulation.Common/Interfaces/ICoreFileProvider.cs index 9121872ce9..365a1da8b1 100644 --- a/BizHawk.Emulation.Common/Interfaces/ICoreFileProvider.cs +++ b/BizHawk.Emulation.Common/Interfaces/ICoreFileProvider.cs @@ -16,13 +16,11 @@ namespace BizHawk.Emulation.Common /// /// produces a path that contains emulation related DLL and exe files /// - /// string DllPath(); /// /// produces a path that contains saveram... because libretro cores need it /// - /// string GetRetroSaveRAMDirectory(); /// diff --git a/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs b/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs index 3a16d85bd8..03db711db5 100644 --- a/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs +++ b/BizHawk.Emulation.Common/Interfaces/IEmulatorServiceProvider.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; namespace BizHawk.Emulation.Common { /// - /// This interface defines the mechanism by which clients can retrive IEmulatorServices + /// This interface defines the mechanism by which clients can retrieve /// from an IEmulator implementation /// An implementation should collect all available IEmulatorService instances. /// This interface defines only the client interaction. This interface does not specify the means @@ -18,6 +18,7 @@ namespace BizHawk.Emulation.Common /// /// Returns whether or not T is available /// + /// The to check bool HasService() where T : IEmulatorService; /// @@ -29,6 +30,7 @@ namespace BizHawk.Emulation.Common /// Returns an instance of T if T is available /// Else returns null /// + /// The requested T GetService() where T : IEmulatorService; /// @@ -38,7 +40,7 @@ namespace BizHawk.Emulation.Common object GetService(Type t); /// - /// A list of all currently registered services available to be retrieved + /// Gets a list of all currently registered services available to be retrieved /// IEnumerable AvailableServices { get; } } diff --git a/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs b/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs index 76dc8470c9..81ee01be42 100644 --- a/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs +++ b/BizHawk.Emulation.Common/Interfaces/IMemoryCallbackSystem.cs @@ -18,22 +18,22 @@ namespace BizHawk.Emulation.Common */ /// - /// Specifies whether or not Execute callbacks are available for this this implementation + /// Gets a value indicating whether or not Execute callbacks are available for this this implementation /// bool ExecuteCallbacksAvailable { get; } /// - /// Returns whether or not there are currently any read hooks + /// Gets a value indicating whether or not there are currently any read hooks /// bool HasReads { get; } /// - /// Returns whether or not there are currently any write hooks + /// Gets a value indicating whether or not there are currently any write hooks /// bool HasWrites { get; } /// - /// Returns whether or not there are currently any execute hooks + /// Gets a value indicating whether or not there are currently any execute hooks /// bool HasExecutes { get; } @@ -45,17 +45,17 @@ namespace BizHawk.Emulation.Common void Add(IMemoryCallback callback); /// - /// Executes all Read callbacks for the given addr + /// Executes all Read callbacks for the given address /// void CallReads(uint addr); /// - /// Executes all Write callbacks for the given addr + /// Executes all Write callbacks for the given address /// void CallWrites(uint addr); /// - /// Executes all Execute callbacks for the given addr + /// Executes all Execute callbacks for the given address /// void CallExecutes(uint addr); diff --git a/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs b/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs index 413ec4a6b7..271bd65a7d 100644 --- a/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs +++ b/BizHawk.Emulation.Common/Interfaces/Services/IDisassemblable.cs @@ -5,30 +5,30 @@ using System.Collections.Generic; namespace BizHawk.Emulation.Common { /// - /// This service provides the means to generate disassembly by the core for a given cpu and memory domain - /// Tools such the debugger use this, but also lua scripting, and tools like trace logging and code data logging can make use of this tool - /// If unavailable the debugger tool will still be available but disable the disassembly window but still be available if the IDebuggable service is available + /// This service provides the means to generate disassembly by the core for a given CPU and memory domain + /// Tools such the debugger use this, but also LUA scripting, and tools like trace logging and code data logging can make use of this tool + /// If unavailable the debugger tool will still be available but disable the disassembly window but still be available if the service is available /// public interface IDisassemblable : IEmulatorService { /// - /// Gets or sets the Cpu that will be used to disassemble - /// Only values returned from AvailableCpus will be supported when Set + /// Gets or sets the CPUS that will be used to disassemble + /// Only values returned from will be supported when Set /// string Cpu { get; set; } /// - /// Returns the name of the Program Counter Register for the current Cpu + /// Gets the name of the Program Counter Register for the current CPU /// string PCRegisterName { get; } /// - /// Gets a list of Cpus that can be used when setting the Cpu property + /// Gets a list of CPUs that can be used when setting the CPU property /// IEnumerable AvailableCpus { get; } /// - /// returns a disassembly starting at addr lasting for length, using the given domain + /// Returns a disassembly starting at address lasting for length, using the given domain /// string Disassemble(MemoryDomain m, uint addr, out int length); } @@ -63,7 +63,7 @@ namespace BizHawk.Emulation.Common public abstract string Disassemble(MemoryDomain m, uint addr, out int length); - public VerifiedDisassembler() + protected VerifiedDisassembler() { _cpu = AvailableCpus.First(); } diff --git a/BizHawk.Emulation.Common/Interfaces/Services/ILinkable.cs b/BizHawk.Emulation.Common/Interfaces/Services/ILinkable.cs index e0bdde9aac..8285623eef 100644 --- a/BizHawk.Emulation.Common/Interfaces/Services/ILinkable.cs +++ b/BizHawk.Emulation.Common/Interfaces/Services/ILinkable.cs @@ -7,7 +7,7 @@ public interface ILinkable : ISpecializedEmulatorService { /// - /// Whether or not the link cable is currently connected + /// Gets a value indicating whether or not the link cable is currently connected /// bool LinkConnected { get; } } diff --git a/BizHawk.Emulation.Common/Interfaces/Services/ITraceable.cs b/BizHawk.Emulation.Common/Interfaces/Services/ITraceable.cs index 57e7374352..d78fffdae3 100644 --- a/BizHawk.Emulation.Common/Interfaces/Services/ITraceable.cs +++ b/BizHawk.Emulation.Common/Interfaces/Services/ITraceable.cs @@ -14,7 +14,7 @@ //bool Enabled { get; set; } /// - /// The header that would be used by a trace logger + /// Gets the header that would be used by a trace logger /// string Header { get; set; } diff --git a/BizHawk.Emulation.Common/Sound/Utilities/SpeexResampler.cs b/BizHawk.Emulation.Common/Sound/Utilities/SpeexResampler.cs index 9f59a2352b..cd5bf01caa 100644 --- a/BizHawk.Emulation.Common/Sound/Utilities/SpeexResampler.cs +++ b/BizHawk.Emulation.Common/Sound/Utilities/SpeexResampler.cs @@ -344,8 +344,6 @@ namespace BizHawk.Emulation.Common /// /// add a sample to the queue /// - /// - /// public void EnqueueSample(short left, short right) { inbuf[inbufpos++] = left;