diff --git a/BizHawk.MultiClient/JMDForm.cs b/BizHawk.MultiClient/JMDForm.cs
index 86efc90668..0b8dacccf5 100644
--- a/BizHawk.MultiClient/JMDForm.cs
+++ b/BizHawk.MultiClient/JMDForm.cs
@@ -9,6 +9,9 @@ using System.Windows.Forms;
namespace BizHawk.MultiClient
{
+ ///
+ /// implements a minimal dialog for configuring JMDWriter
+ ///
public partial class JMDForm : Form
{
public JMDForm()
@@ -39,9 +42,15 @@ namespace BizHawk.MultiClient
compressionTop.Text = String.Format("Compression Level: {0}", compressionBar.Value);
}
- // we are given a HWND and need a IWin32Window
+ ///
+ /// minimal IWin32Window wrapper around an IntPtr hwnd
+ ///
class WindowWrapper : IWin32Window
{
+ ///
+ /// create an instance of WindowWrapper
+ ///
+ /// hwnd to store
public WindowWrapper (IntPtr handle)
{
hwnd = handle;
@@ -53,7 +62,17 @@ namespace BizHawk.MultiClient
IntPtr hwnd;
}
-
+ ///
+ /// Show a configuration dialog (modal) for JMDWriter
+ ///
+ /// number of threads
+ /// compression level
+ /// minimum possible number of threads
+ /// maximum possible number of threads
+ /// minimum compression level, assumed to be "no compression"
+ /// maximum compression level
+ /// hwnd of parent
+ /// false if user canceled; true if user consented
public static bool DoCompressionDlg(ref int threads, ref int complevel, int tmin, int tmax, int cmin, int cmax, IntPtr hwnd)
{
JMDForm j = new JMDForm();
diff --git a/BizHawk.MultiClient/JMDWriter.cs b/BizHawk.MultiClient/JMDWriter.cs
index d3e1c69e2f..6566f359d9 100644
--- a/BizHawk.MultiClient/JMDWriter.cs
+++ b/BizHawk.MultiClient/JMDWriter.cs
@@ -13,7 +13,6 @@ namespace BizHawk.MultiClient
{
///
/// carries private compression information data
- /// NYI
///
class CodecToken : IDisposable
{
@@ -21,7 +20,6 @@ namespace BizHawk.MultiClient
{
}
- // get constants from Deflater
public int compressionlevel
{
get;
@@ -34,6 +32,9 @@ namespace BizHawk.MultiClient
set;
}
+ ///
+ /// instantiates a CodecToken with default parameters
+ ///
public CodecToken()
{
compressionlevel = Deflater.DEFAULT_COMPRESSION;
@@ -41,6 +42,9 @@ namespace BizHawk.MultiClient
}
}
+ ///
+ /// stores compression parameters
+ ///
CodecToken token;
///
/// fps numerator, constant
@@ -113,6 +117,7 @@ namespace BizHawk.MultiClient
public void Dispose()
{
+ // we have no unmanaged resources
}
@@ -137,7 +142,8 @@ namespace BizHawk.MultiClient
CodecToken ret = new CodecToken();
int t = ret.numthreads;
- // Deflater.DEFAULT_COMPRESSION is actually a magic value and is not in the range, so guestimate
+ // Deflater.DEFAULT_COMPRESSION is actually a magic value and is not in the range NO_COMPRESSION..BEST_COMPRESSION
+ // so our default is just a guesstimate in the middle
int c = (Deflater.BEST_COMPRESSION + Deflater.NO_COMPRESSION) / 2;
if (!JMDForm.DoCompressionDlg(ref t, ref c, 1, 6, Deflater.NO_COMPRESSION, Deflater.BEST_COMPRESSION, hwnd))
@@ -168,7 +174,7 @@ namespace BizHawk.MultiClient
///
public void SetVideoParameters(int width, int height)
{
- // each frame is dumped with its resolution, so we don't care to store this or monitor it
+ // each frame is dumped independently with its own resolution tag, so we don't care to store this
}
///
@@ -176,7 +182,8 @@ namespace BizHawk.MultiClient
///
public void SetAudioParameters(int sampleRate, int channels, int bits)
{
- // these are pretty arbitrary
+ // the sampleRate limits are arbitrary, just to catch things which are probably silly-wrong
+ // if a larger range of sampling rates is needed, it should be supported
if (sampleRate < 8000 || sampleRate > 96000 || channels < 1 || channels > 2 || bits != 16)
throw new ArgumentException("Audio parameters out of range!");
audiosamplerate = sampleRate;
@@ -252,7 +259,7 @@ namespace BizHawk.MultiClient
}
// start up thread
- // problem: since audio chunks and video frames both go through here, exactly how many worker gzips this
+ // problem: since audio chunks and video frames both go through here, exactly how many zlib workers
// gives is not known without knowing how the emulator will chunk audio packets
// this shouldn't affect results though, just performance
threadQ = new System.Collections.Concurrent.BlockingCollection