-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Added interfaces for Audio Devices and Enumeration for them.
- Loading branch information
1 parent
a92ab23
commit 010435a
Showing
6 changed files
with
399 additions
and
91 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace MonoAudio.IO | ||
{ | ||
/// <summary> | ||
/// Represents a flow kind of audio data. | ||
/// </summary> | ||
[Flags] | ||
public enum DataFlow | ||
{ | ||
/// <summary> | ||
/// Invalid. | ||
/// </summary> | ||
None = 0, | ||
|
||
/// <summary> | ||
/// Output. | ||
/// </summary> | ||
Render = 1, | ||
|
||
/// <summary> | ||
/// Input. | ||
/// </summary> | ||
Capture = 2, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace MonoAudio.IO | ||
{ | ||
/// <summary> | ||
/// Defines a base infrastructure of an audio device enumerator. | ||
/// </summary> | ||
public interface IAudioDeviceEnumerator | ||
{ | ||
/// <summary> | ||
/// Enumerates devices of specified <paramref name="dataFlow"/>. | ||
/// </summary> | ||
/// <param name="dataFlow">The <see cref="DataFlow"/> kind to enumerate devices of.</param> | ||
/// <returns>The <see cref="IEnumerable{T}"/> of audio devices.</returns> | ||
IEnumerable<IAudioDevice> EnumerateDevices(DataFlow dataFlow); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace MonoAudio.IO | ||
{ | ||
/// <summary> | ||
/// Defines a base structure of audio input device. | ||
/// </summary> | ||
public interface IAudioInputDevice : IAudioDevice | ||
{ | ||
/// <summary> | ||
/// Indicates whether the audio input device supports a particular stream format. | ||
/// </summary> | ||
/// <param name="format">The format to judge the availability.</param> | ||
/// <returns><c>true</c> if succeeded and the audio device supports the specified stream format.</returns> | ||
bool IsFormatSupported(WaveFormat format); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace MonoAudio.IO | ||
{ | ||
/// <summary> | ||
/// Defines a base structure of audio output device. | ||
/// </summary> | ||
public interface IAudioOutputDevice : IAudioDevice | ||
{ | ||
/// <summary> | ||
/// Indicates whether the audio output device supports a particular stream format. | ||
/// </summary> | ||
/// <param name="format">The format to judge the availability.</param> | ||
/// <returns><c>true</c> if succeeded and the audio device supports the specified stream format.</returns> | ||
bool IsFormatSupported(WaveFormat format); | ||
} | ||
} |
Oops, something went wrong.