Skip to content

Commit

Permalink
[Release] Commented public API
Browse files Browse the repository at this point in the history
  • Loading branch information
melanchall committed Jul 31, 2022
1 parent a35632d commit 8bed6f7
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
23 changes: 23 additions & 0 deletions DryWetMidi/Core/Events/Converters/BytesFormat.cs
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
namespace Melanchall.DryWetMidi.Core
{
/// <summary>
/// Defines format of a MIDI data bytes. Depending on this format the specific
/// MIDI data reading/writing rules can be applied.
/// </summary>
/// <remarks>
/// <para>
/// If <see cref="File"/> format specified, a system exclusive bytes layout is
/// <c>F0 &lt;length&gt; &lt;bytes to be transmitted after F0&gt;</c>, and <c>0xFF</c>
/// status byte means a meta event.
/// </para>
/// <para>
/// If <see cref="Device"/> format specified, a system exclusive bytes layout is
/// <c>F0 &lt;bytes to be transmitted after F0&gt;</c>, and <c>0xFF</c>
/// status byte means Reset system real-time event.
/// </para>
/// </remarks>
public enum BytesFormat
{
/// <summary>
/// Format used by MIDI files.
/// </summary>
File = 0,

/// <summary>
/// Format used in communication with MIDI devices.
/// </summary>
Device
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,10 @@ public NotEnoughBytesPolicy NotEnoughBytesPolicy
/// </summary>
public bool ReadDeltaTimes { get; set; }

/// <summary>
/// Gets or sets the format of source bytes layout. The default is <see cref="BytesFormat.File"/>.
/// </summary>
/// <exception cref="InvalidEnumArgumentException"><paramref name="value"/> specified an invalid value.</exception>
public BytesFormat BytesFormat
{
get { return _bytesFormat; }
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Text;
using Melanchall.DryWetMidi.Common;
Expand Down Expand Up @@ -103,6 +104,10 @@ public Encoding TextEncoding
/// </summary>
public bool WriteDeltaTimes { get; set; }

/// <summary>
/// Gets or sets the format of target bytes layout. The default is <see cref="BytesFormat.File"/>.
/// </summary>
/// <exception cref="InvalidEnumArgumentException"><paramref name="value"/> specified an invalid value.</exception>
public BytesFormat BytesFormat
{
get { return _bytesFormat; }
Expand Down

0 comments on commit 8bed6f7

Please sign in to comment.