* Add initial C# wrapper version

This commit is contained in:
Murat Suri 2011-06-02 22:26:29 +00:00
parent f6dc2e6a5e
commit 02fc3f80ac
86 changed files with 13913 additions and 33 deletions

View File

@ -49,6 +49,7 @@ set(CAUDIO_LIB_DIRECTORY "/lib")
# Customise what to build
option(CAUDIO_STATIC "Static build" FALSE)
option(CAUDIO_BUILD_SAMPLES "Build Samples" TRUE)
option(CAUDIO_BUILD_CSHARP_WRAPPER "Build CSharpWrapper - this wrapper is used with the provided *.cs files" FALSE)
#Custom settings
option(CAUDIO_BUILD_EAX_PLUGIN "Build EAXLegacyPreset Plugin" FALSE)
@ -195,6 +196,10 @@ if(CAUDIO_BUILD_MP3DECODER_PLUGIN)
add_subdirectory(Plugins/mp3Decoder)
endif()
if(CAUDIO_BUILD_CSHARP_WRAPPER)
add_subdirectory(cAudioCSharpWrapper)
endif()
if(CAUDIO_BUILD_SAMPLES)
ADD_DEFINITIONS(-DCAUDIO_MEDIA_ROOT="${CMAKE_SOURCE_DIR}/Samples/Media/")
add_subdirectory(Samples/Tutorial1_2DSound)

View File

@ -0,0 +1,26 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cAudioPlayer", "cAudioPlayer\cAudioPlayer.csproj", "{E7ACE267-B496-440E-B44D-CC846D39DAA7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "cAudioCSharp", "..\..\cAudioCSharp\cAudioCSharp.csproj", "{4DDC8FD9-BEAF-422E-A28E-093D299F7DEF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{E7ACE267-B496-440E-B44D-CC846D39DAA7}.Debug|x86.ActiveCfg = Debug|x86
{E7ACE267-B496-440E-B44D-CC846D39DAA7}.Debug|x86.Build.0 = Debug|x86
{E7ACE267-B496-440E-B44D-CC846D39DAA7}.Release|x86.ActiveCfg = Release|x86
{E7ACE267-B496-440E-B44D-CC846D39DAA7}.Release|x86.Build.0 = Release|x86
{4DDC8FD9-BEAF-422E-A28E-093D299F7DEF}.Debug|x86.ActiveCfg = Debug|x86
{4DDC8FD9-BEAF-422E-A28E-093D299F7DEF}.Debug|x86.Build.0 = Debug|x86
{4DDC8FD9-BEAF-422E-A28E-093D299F7DEF}.Release|x86.ActiveCfg = Release|x86
{4DDC8FD9-BEAF-422E-A28E-093D299F7DEF}.Release|x86.Build.0 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,42 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using cAudio;
namespace cAudioPlayer
{
public class AudioSourceListener : ISourceEventHandler
{
private readonly MainWnd mPlayer;
public AudioSourceListener(MainWnd player)
{
mPlayer = player;
}
public override void onUpdate()
{
}
public override void onRelease()
{
}
public override void onPlay()
{
Console.Out.WriteLine("onPlay");
}
public override void onStop()
{
Console.Out.WriteLine("onStop");
mPlayer.OnStop();
}
public override void onPause()
{
Console.Out.WriteLine("onPause");
}
}
}

View File

@ -0,0 +1,116 @@
namespace cAudioPlayer
{
partial class MainWnd
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.fileNFO = new System.Windows.Forms.Label();
this.btnOpen = new System.Windows.Forms.Button();
this.currentPostion = new System.Windows.Forms.TrackBar();
this.btnPlay = new System.Windows.Forms.Button();
this.btnStop = new System.Windows.Forms.Button();
((System.ComponentModel.ISupportInitialize)(this.currentPostion)).BeginInit();
this.SuspendLayout();
//
// fileNFO
//
this.fileNFO.AutoSize = true;
this.fileNFO.Location = new System.Drawing.Point(51, 9);
this.fileNFO.Name = "fileNFO";
this.fileNFO.Size = new System.Drawing.Size(46, 13);
this.fileNFO.TabIndex = 0;
this.fileNFO.Text = "File: n/a";
//
// btnOpen
//
this.btnOpen.Location = new System.Drawing.Point(2, 4);
this.btnOpen.Name = "btnOpen";
this.btnOpen.Size = new System.Drawing.Size(43, 23);
this.btnOpen.TabIndex = 1;
this.btnOpen.Text = "Open";
this.btnOpen.UseVisualStyleBackColor = true;
this.btnOpen.Click += new System.EventHandler(this.BtnOpenClick);
//
// currentPostion
//
this.currentPostion.Location = new System.Drawing.Point(2, 33);
this.currentPostion.Maximum = 1000;
this.currentPostion.Name = "currentPostion";
this.currentPostion.Size = new System.Drawing.Size(492, 45);
this.currentPostion.TabIndex = 2;
this.currentPostion.TickStyle = System.Windows.Forms.TickStyle.Both;
//
// btnPlay
//
this.btnPlay.Location = new System.Drawing.Point(2, 84);
this.btnPlay.Name = "btnPlay";
this.btnPlay.Size = new System.Drawing.Size(43, 23);
this.btnPlay.TabIndex = 3;
this.btnPlay.Text = "Play";
this.btnPlay.UseVisualStyleBackColor = true;
this.btnPlay.Click += new System.EventHandler(this.BtnPlayClick);
//
// btnStop
//
this.btnStop.Location = new System.Drawing.Point(51, 84);
this.btnStop.Name = "btnStop";
this.btnStop.Size = new System.Drawing.Size(43, 23);
this.btnStop.TabIndex = 4;
this.btnStop.Text = "Stop";
this.btnStop.UseVisualStyleBackColor = true;
this.btnStop.Click += new System.EventHandler(this.BtnStopClick);
//
// MainWnd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(498, 113);
this.Controls.Add(this.btnStop);
this.Controls.Add(this.btnPlay);
this.Controls.Add(this.currentPostion);
this.Controls.Add(this.btnOpen);
this.Controls.Add(this.fileNFO);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Name = "MainWnd";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "cAudio C# Player";
((System.ComponentModel.ISupportInitialize)(this.currentPostion)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Label fileNFO;
private System.Windows.Forms.Button btnOpen;
private System.Windows.Forms.TrackBar currentPostion;
private System.Windows.Forms.Button btnPlay;
private System.Windows.Forms.Button btnStop;
}
}

View File

@ -0,0 +1,109 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using cAudio;
namespace cAudioPlayer
{
public partial class MainWnd : Form
{
private readonly IAudioManager mAudioMgr;
private IAudioSource mCurrentSource;
private readonly AudioSourceListener mAudioListener;
private readonly Timer mUpdateTimer = new Timer();
public MainWnd()
{
InitializeComponent();
mAudioMgr = cAudioCSharpWrapper.createAudioManager(true);
mAudioListener = new AudioSourceListener(this);
mUpdateTimer.Tick += UpdateTimerTick;
}
void UpdateTimerTick(object sender, EventArgs e)
{
UpdateSlider();
}
private void BtnOpenClick(object sender, EventArgs e)
{
btnPlay.Text = "Play";
btnPlay.Enabled = false;
btnStop.Enabled = false;
currentPostion.Value = 0;
mUpdateTimer.Stop();
if (mCurrentSource != null)
{
mCurrentSource.unRegisterEventHandler(mAudioListener);
mAudioMgr.release(mCurrentSource);
mCurrentSource = null;
}
var openFileDlg = new OpenFileDialog();
if (openFileDlg.ShowDialog() == DialogResult.OK)
{
var file = openFileDlg.FileName;
mCurrentSource = mAudioMgr.create("musicFile", file);
mCurrentSource.registerEventHandler(mAudioListener);
fileNFO.Text = "File:" + file.Substring(file.LastIndexOf("\\") + 1) + " | Length: " + (mCurrentSource.getTotalAudioTime() / 60).ToString("#.00") + " min";
btnPlay.Enabled = true;
}
}
private void BtnPlayClick(object sender, EventArgs e)
{
btnStop.Enabled = true;
if(btnPlay.Text == "Play")
{
btnPlay.Text = "Pause";
mCurrentSource.play2d(false);
mUpdateTimer.Interval = 50;
mUpdateTimer.Start();
}
else
{
btnPlay.Text = "Play";
mCurrentSource.pause();
mUpdateTimer.Stop();
}
}
private void BtnStopClick(object sender, EventArgs e)
{
OnStop();
}
public void OnStop()
{
btnPlay.Invoke((MethodInvoker)delegate { btnPlay.Text = "Play"; });
btnStop.Invoke((MethodInvoker)delegate { btnStop.Enabled = false; });
if(mCurrentSource.isPlaying())
mCurrentSource.stop();
mUpdateTimer.Stop();
currentPostion.Invoke((MethodInvoker)delegate { currentPostion.Value = 0; });
}
public void UpdateSlider()
{
var percent = (int)((mCurrentSource.getCurrentAudioTime() / mCurrentSource.getTotalAudioTime()) * 1000);
if (currentPostion.InvokeRequired)
{
currentPostion.Invoke((MethodInvoker)delegate { currentPostion.Value = percent; });
}
else
{
currentPostion.Value = percent;
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,21 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
namespace cAudioPlayer
{
static class Program
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main()
{
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new MainWnd());
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("cAudioPlayer")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("cAudioPlayer")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("21f1a254-f4c3-402d-b9d4-ae988fc9086b")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,71 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace cAudioPlayer.Properties
{
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources
{
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources()
{
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager
{
get
{
if ((resourceMan == null))
{
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("cAudioPlayer.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture
{
get
{
return resourceCulture;
}
set
{
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,30 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.225
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace cAudioPlayer.Properties
{
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
{
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default
{
get
{
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,94 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E7ACE267-B496-440E-B44D-CC846D39DAA7}</ProjectGuid>
<OutputType>WinExe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>cAudioPlayer</RootNamespace>
<AssemblyName>cAudioPlayer</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AudioSourceListener.cs" />
<Compile Include="MainWnd.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="MainWnd.Designer.cs">
<DependentUpon>MainWnd.cs</DependentUpon>
</Compile>
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<EmbeddedResource Include="MainWnd.resx">
<DependentUpon>MainWnd.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\cAudioCSharp\cAudioCSharp.csproj">
<Project>{4DDC8FD9-BEAF-422E-A28E-093D299F7DEF}</Project>
<Name>cAudioCSharp</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -78,11 +78,5 @@ namespace cAudio
\return Pointer to the found log receiver or NULL if it could not be found. */
virtual ILogReceiver* getLogReceiver(const char* name) = 0;
};
//! Gets the interface to the logger.
/** Note: This is the only way to get access to the logging capabilities of cAudio.
\return A pointer to the logger interface.
*/
CAUDIO_API ILogger* getLogger();
};

View File

@ -133,4 +133,11 @@ namespace cAudio {
\param capture: The object to destroy
*/
CAUDIO_API void destroyAudioCapture(IAudioCapture* capture);
//! Gets the interface to the logger.
/** Note: This is the only way to get access to the logging capabilities of cAudio.
\return A pointer to the logger interface.
*/
CAUDIO_API ILogger* getLogger();
};

View File

@ -11,9 +11,17 @@
#include "../Headers/cFileSourceFactory.h"
#include "../Headers/cFileSource.h"
#include "../Headers/cPluginManager.h"
#include "../Headers/cLogger.h"
#include "../Headers/cConsoleLogReceiver.h"
#include "../Headers/cFileLogReceiver.h"
namespace cAudio
{
//---------------------------------------------------------------------------------------
// Audio manager section
//---------------------------------------------------------------------------------------
#if CAUDIO_COMPILE_WITH_OGG_DECODER == 1
static cOggAudioDecoderFactory OggDecoderFactory;
#endif
@ -83,6 +91,10 @@ namespace cAudio
}
}
//---------------------------------------------------------------------------------------
// Audio capture section
//---------------------------------------------------------------------------------------
CAUDIO_API IAudioCapture* createAudioCapture(bool initializeDefault)
{
cAudioCapture* capture = CAUDIO_NEW cAudioCapture;
@ -117,4 +129,34 @@ namespace cAudio
capture = NULL;
}
}
//---------------------------------------------------------------------------------------
// Logger section
//---------------------------------------------------------------------------------------
static cLogger Logger;
static bool FirstTimeLogInit(false);
#if CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER == 1
static cConsoleLogReceiver ConsoleLog;
#endif
#if CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER == 1
static cFileLogReceiver FileLog;
#endif
CAUDIO_API ILogger* getLogger()
{
if(!FirstTimeLogInit)
{
FirstTimeLogInit = true;
#if CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER == 1
Logger.registerLogReceiver(&ConsoleLog, "Console");
#endif
#if CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER == 1
Logger.registerLogReceiver(&FileLog,"File");
#endif
}
return &Logger;
}
}

View File

@ -2,6 +2,7 @@
// This file is part of the "cAudio Engine"
// For conditions of distribution and use, see copyright notice in cAudio.h
#include "../include/cAudio.h"
#include "../Headers/cAudioCapture.h"
#include "../Headers/cUtils.h"
#include "../Headers/cThread.h"

View File

@ -3,7 +3,7 @@
// For conditions of distribution and use, see copyright notice in cAudio.h
#include "../Headers/cAudioManager.h"
#include "../include/cAudio.h"
#include "../include/cAudioPlatform.h"
#include "../include/cAudioSleep.h"
#include "../Headers/cUtils.h"

View File

@ -3,6 +3,7 @@
// For conditions of distribution and use, see copyright notice in cAudio.h
#include "../Headers/cAudioSource.h"
#include "../include/cAudio.h"
#include "../Headers/cLogger.h"
#include "../Headers/cFilter.h"
#include "../Headers/cEffect.h"

View File

@ -5,6 +5,7 @@
#include "../Headers/cEffect.h"
#include "../Headers/cLogger.h"
#include "../Headers/cUtils.h"
#include "../include/cAudio.h"
#if CAUDIO_EFX_ENABLED == 1

View File

@ -5,6 +5,7 @@
#include "../Headers/cFilter.h"
#include "../Headers/cLogger.h"
#include "../Headers/cUtils.h"
#include "../include/cAudio.h"
#if CAUDIO_EFX_ENABLED == 1

View File

@ -11,17 +11,6 @@
namespace cAudio
{
static cLogger Logger;
static bool FirstTimeLogInit(false);
#if CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER == 1
static cConsoleLogReceiver ConsoleLog;
#endif
#if CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER == 1
static cFileLogReceiver FileLog;
#endif
cLogger::cLogger() : StartTime(0), MinLogLevel(ELL_INFO)
{
StartTime = clock();
@ -148,19 +137,4 @@ namespace cAudio
Mutex.unlock();
return NULL;
}
CAUDIO_API ILogger* getLogger()
{
if(!FirstTimeLogInit)
{
FirstTimeLogInit = true;
#if CAUDIO_COMPILE_WITH_CONSOLE_LOG_RECEIVER == 1
Logger.registerLogReceiver(&ConsoleLog, "Console");
#endif
#if CAUDIO_COMPILE_WITH_FILE_LOG_RECEIVER == 1
Logger.registerLogReceiver(&FileLog,"File");
#endif
}
return &Logger;
}
};

View File

@ -7,6 +7,7 @@
#include "../include/cAudioPlatform.h"
#include "../include/cAudioDefines.h"
#include "../include/ILogger.h"
#include "../include/cAudio.h"
#ifdef CAUDIO_COMPILE_WITH_PLUGIN_SUPPORT

View File

@ -0,0 +1,18 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
public enum AudioFormats {
EAF_8BIT_MONO,
EAF_8BIT_STEREO,
EAF_16BIT_MONO,
EAF_16BIT_STEREO
}
}

View File

@ -0,0 +1,349 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class DoubleVector : IDisposable, System.Collections.IEnumerable
#if !SWIG_DOTNET_1
, System.Collections.Generic.IList<double>
#endif
{
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal DoubleVector(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(DoubleVector obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~DoubleVector() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_DoubleVector(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public DoubleVector(System.Collections.ICollection c) : this() {
if (c == null)
throw new ArgumentNullException("c");
foreach (double element in c) {
this.Add(element);
}
}
public bool IsFixedSize {
get {
return false;
}
}
public bool IsReadOnly {
get {
return false;
}
}
public double this[int index] {
get {
return getitem(index);
}
set {
setitem(index, value);
}
}
public int Capacity {
get {
return (int)capacity();
}
set {
if (value < size())
throw new ArgumentOutOfRangeException("Capacity");
reserve((uint)value);
}
}
public int Count {
get {
return (int)size();
}
}
public bool IsSynchronized {
get {
return false;
}
}
#if SWIG_DOTNET_1
public void CopyTo(System.Array array)
#else
public void CopyTo(double[] array)
#endif
{
CopyTo(0, array, 0, this.Count);
}
#if SWIG_DOTNET_1
public void CopyTo(System.Array array, int arrayIndex)
#else
public void CopyTo(double[] array, int arrayIndex)
#endif
{
CopyTo(0, array, arrayIndex, this.Count);
}
#if SWIG_DOTNET_1
public void CopyTo(int index, System.Array array, int arrayIndex, int count)
#else
public void CopyTo(int index, double[] array, int arrayIndex, int count)
#endif
{
if (array == null)
throw new ArgumentNullException("array");
if (index < 0)
throw new ArgumentOutOfRangeException("index", "Value is less than zero");
if (arrayIndex < 0)
throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
if (count < 0)
throw new ArgumentOutOfRangeException("count", "Value is less than zero");
if (array.Rank > 1)
throw new ArgumentException("Multi dimensional array.", "array");
if (index+count > this.Count || arrayIndex+count > array.Length)
throw new ArgumentException("Number of elements to copy is too large.");
for (int i=0; i<count; i++)
array.SetValue(getitemcopy(index+i), arrayIndex+i);
}
#if !SWIG_DOTNET_1
System.Collections.Generic.IEnumerator<double> System.Collections.Generic.IEnumerable<double>.GetEnumerator() {
return new DoubleVectorEnumerator(this);
}
#endif
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
return new DoubleVectorEnumerator(this);
}
public DoubleVectorEnumerator GetEnumerator() {
return new DoubleVectorEnumerator(this);
}
// Type-safe enumerator
/// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
/// whenever the collection is modified. This has been done for changes in the size of the
/// collection but not when one of the elements of the collection is modified as it is a bit
/// tricky to detect unmanaged code that modifies the collection under our feet.
public sealed class DoubleVectorEnumerator : System.Collections.IEnumerator
#if !SWIG_DOTNET_1
, System.Collections.Generic.IEnumerator<double>
#endif
{
private DoubleVector collectionRef;
private int currentIndex;
private object currentObject;
private int currentSize;
public DoubleVectorEnumerator(DoubleVector collection) {
collectionRef = collection;
currentIndex = -1;
currentObject = null;
currentSize = collectionRef.Count;
}
// Type-safe iterator Current
public double Current {
get {
if (currentIndex == -1)
throw new InvalidOperationException("Enumeration not started.");
if (currentIndex > currentSize - 1)
throw new InvalidOperationException("Enumeration finished.");
if (currentObject == null)
throw new InvalidOperationException("Collection modified.");
return (double)currentObject;
}
}
// Type-unsafe IEnumerator.Current
object System.Collections.IEnumerator.Current {
get {
return Current;
}
}
public bool MoveNext() {
int size = collectionRef.Count;
bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
if (moveOkay) {
currentIndex++;
currentObject = collectionRef[currentIndex];
} else {
currentObject = null;
}
return moveOkay;
}
public void Reset() {
currentIndex = -1;
currentObject = null;
if (collectionRef.Count != currentSize) {
throw new InvalidOperationException("Collection modified.");
}
}
#if !SWIG_DOTNET_1
public void Dispose() {
currentIndex = -1;
currentObject = null;
}
#endif
}
public void Clear() {
cAudioCSharpWrapperPINVOKE.DoubleVector_Clear(swigCPtr);
}
public void Add(double x) {
cAudioCSharpWrapperPINVOKE.DoubleVector_Add(swigCPtr, x);
}
private uint size() {
uint ret = cAudioCSharpWrapperPINVOKE.DoubleVector_size(swigCPtr);
return ret;
}
private uint capacity() {
uint ret = cAudioCSharpWrapperPINVOKE.DoubleVector_capacity(swigCPtr);
return ret;
}
private void reserve(uint n) {
cAudioCSharpWrapperPINVOKE.DoubleVector_reserve(swigCPtr, n);
}
public DoubleVector() : this(cAudioCSharpWrapperPINVOKE.new_DoubleVector__SWIG_0(), true) {
}
public DoubleVector(DoubleVector other) : this(cAudioCSharpWrapperPINVOKE.new_DoubleVector__SWIG_1(DoubleVector.getCPtr(other)), true) {
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public DoubleVector(int capacity) : this(cAudioCSharpWrapperPINVOKE.new_DoubleVector__SWIG_2(capacity), true) {
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
private double getitemcopy(int index) {
double ret = cAudioCSharpWrapperPINVOKE.DoubleVector_getitemcopy(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private double getitem(int index) {
double ret = cAudioCSharpWrapperPINVOKE.DoubleVector_getitem(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private void setitem(int index, double val) {
cAudioCSharpWrapperPINVOKE.DoubleVector_setitem(swigCPtr, index, val);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void AddRange(DoubleVector values) {
cAudioCSharpWrapperPINVOKE.DoubleVector_AddRange(swigCPtr, DoubleVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public DoubleVector GetRange(int index, int count) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.DoubleVector_GetRange(swigCPtr, index, count);
DoubleVector ret = (cPtr == IntPtr.Zero) ? null : new DoubleVector(cPtr, true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Insert(int index, double x) {
cAudioCSharpWrapperPINVOKE.DoubleVector_Insert(swigCPtr, index, x);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void InsertRange(int index, DoubleVector values) {
cAudioCSharpWrapperPINVOKE.DoubleVector_InsertRange(swigCPtr, index, DoubleVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveAt(int index) {
cAudioCSharpWrapperPINVOKE.DoubleVector_RemoveAt(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveRange(int index, int count) {
cAudioCSharpWrapperPINVOKE.DoubleVector_RemoveRange(swigCPtr, index, count);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public static DoubleVector Repeat(double value, int count) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.DoubleVector_Repeat(value, count);
DoubleVector ret = (cPtr == IntPtr.Zero) ? null : new DoubleVector(cPtr, true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Reverse() {
cAudioCSharpWrapperPINVOKE.DoubleVector_Reverse__SWIG_0(swigCPtr);
}
public void Reverse(int index, int count) {
cAudioCSharpWrapperPINVOKE.DoubleVector_Reverse__SWIG_1(swigCPtr, index, count);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void SetRange(int index, DoubleVector values) {
cAudioCSharpWrapperPINVOKE.DoubleVector_SetRange(swigCPtr, index, DoubleVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public bool Contains(double value) {
bool ret = cAudioCSharpWrapperPINVOKE.DoubleVector_Contains(swigCPtr, value);
return ret;
}
public int IndexOf(double value) {
int ret = cAudioCSharpWrapperPINVOKE.DoubleVector_IndexOf(swigCPtr, value);
return ret;
}
public int LastIndexOf(double value) {
int ret = cAudioCSharpWrapperPINVOKE.DoubleVector_LastIndexOf(swigCPtr, value);
return ret;
}
public bool Remove(double value) {
bool ret = cAudioCSharpWrapperPINVOKE.DoubleVector_Remove(swigCPtr, value);
return ret;
}
}
}

View File

@ -0,0 +1,189 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IAudioCapture : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IAudioCapture(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IAudioCapture obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IAudioCapture() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IAudioCapture(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual bool initialize(string deviceName, uint frequency, AudioFormats format, uint internalBufferSize) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_initialize__SWIG_0(swigCPtr, deviceName, frequency, (int)format, internalBufferSize);
return ret;
}
public virtual bool initialize(string deviceName, uint frequency, AudioFormats format) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_initialize__SWIG_1(swigCPtr, deviceName, frequency, (int)format);
return ret;
}
public virtual bool initialize(string deviceName, uint frequency) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_initialize__SWIG_2(swigCPtr, deviceName, frequency);
return ret;
}
public virtual bool initialize(string deviceName) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_initialize__SWIG_3(swigCPtr, deviceName);
return ret;
}
public virtual bool initialize() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_initialize__SWIG_4(swigCPtr);
return ret;
}
public virtual bool isSupported() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_isSupported(swigCPtr);
return ret;
}
public virtual bool isReady() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_isReady(swigCPtr);
return ret;
}
public virtual void updateCaptureBuffer(bool force) {
cAudioCSharpWrapperPINVOKE.IAudioCapture_updateCaptureBuffer__SWIG_0(swigCPtr, force);
}
public virtual void updateCaptureBuffer() {
cAudioCSharpWrapperPINVOKE.IAudioCapture_updateCaptureBuffer__SWIG_1(swigCPtr);
}
public virtual void shutdown() {
cAudioCSharpWrapperPINVOKE.IAudioCapture_shutdown(swigCPtr);
}
public virtual bool isUpdateThreadRunning() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_isUpdateThreadRunning(swigCPtr);
return ret;
}
public virtual string getAvailableDeviceName(uint index) {
string ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getAvailableDeviceName(swigCPtr, index);
return ret;
}
public virtual uint getAvailableDeviceCount() {
uint ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getAvailableDeviceCount(swigCPtr);
return ret;
}
public virtual string getDefaultDeviceName() {
string ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getDefaultDeviceName(swigCPtr);
return ret;
}
public virtual string getDeviceName() {
string ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getDeviceName(swigCPtr);
return ret;
}
public virtual uint getFrequency() {
uint ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getFrequency(swigCPtr);
return ret;
}
public virtual AudioFormats getFormat() {
AudioFormats ret = (AudioFormats)cAudioCSharpWrapperPINVOKE.IAudioCapture_getFormat(swigCPtr);
return ret;
}
public virtual uint getInternalBufferSize() {
uint ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getInternalBufferSize(swigCPtr);
return ret;
}
public virtual uint getSampleSize() {
uint ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getSampleSize(swigCPtr);
return ret;
}
public virtual bool setDevice(string deviceName) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_setDevice(swigCPtr, deviceName);
return ret;
}
public virtual bool setFrequency(uint frequency) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_setFrequency(swigCPtr, frequency);
return ret;
}
public virtual bool setFormat(AudioFormats format) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_setFormat(swigCPtr, (int)format);
return ret;
}
public virtual bool setInternalBufferSize(uint internalBufferSize) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_setInternalBufferSize(swigCPtr, internalBufferSize);
return ret;
}
public virtual bool beginCapture() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_beginCapture(swigCPtr);
return ret;
}
public virtual void stopCapture() {
cAudioCSharpWrapperPINVOKE.IAudioCapture_stopCapture(swigCPtr);
}
public virtual uint getCapturedAudio(SWIGTYPE_p_void outputBuffer, uint outputBufferSize) {
uint ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getCapturedAudio(swigCPtr, SWIGTYPE_p_void.getCPtr(outputBuffer), outputBufferSize);
return ret;
}
public virtual uint getCurrentCapturedAudioSize() {
uint ret = cAudioCSharpWrapperPINVOKE.IAudioCapture_getCurrentCapturedAudioSize(swigCPtr);
return ret;
}
public virtual void registerEventHandler(ICaptureEventHandler handler) {
cAudioCSharpWrapperPINVOKE.IAudioCapture_registerEventHandler(swigCPtr, ICaptureEventHandler.getCPtr(handler));
}
public virtual void unRegisterEventHandler(ICaptureEventHandler handler) {
cAudioCSharpWrapperPINVOKE.IAudioCapture_unRegisterEventHandler(swigCPtr, ICaptureEventHandler.getCPtr(handler));
}
public virtual void unRegisterAllEventHandlers() {
cAudioCSharpWrapperPINVOKE.IAudioCapture_unRegisterAllEventHandlers(swigCPtr);
}
}
}

View File

@ -0,0 +1,243 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IAudioDecoder : IRefCounted {
private HandleRef swigCPtr;
internal IAudioDecoder(IntPtr cPtr, bool cMemoryOwn) : base(cAudioCSharpWrapperPINVOKE.IAudioDecoder_SWIGUpcast(cPtr), cMemoryOwn) {
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IAudioDecoder obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IAudioDecoder() {
Dispose();
}
public override void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IAudioDecoder(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
base.Dispose();
}
}
public IAudioDecoder(IDataSource stream) : this(cAudioCSharpWrapperPINVOKE.new_IAudioDecoder(IDataSource.getCPtr(stream)), true) {
SwigDirectorConnect();
}
public virtual AudioFormats getFormat() {
AudioFormats ret = (AudioFormats)cAudioCSharpWrapperPINVOKE.IAudioDecoder_getFormat(swigCPtr);
return ret;
}
public virtual int getFrequency() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_getFrequency(swigCPtr);
return ret;
}
public virtual bool isSeekingSupported() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_isSeekingSupported(swigCPtr);
return ret;
}
public virtual bool isValid() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_isValid(swigCPtr);
return ret;
}
public virtual int readAudioData(SWIGTYPE_p_void output, int amount) {
int ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_readAudioData(swigCPtr, SWIGTYPE_p_void.getCPtr(output), amount);
return ret;
}
public virtual bool setPosition(int position, bool relative) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_setPosition(swigCPtr, position, relative);
return ret;
}
public virtual bool seek(float seconds, bool relative) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_seek(swigCPtr, seconds, relative);
return ret;
}
public virtual float getTotalTime() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_getTotalTime(swigCPtr);
return ret;
}
public virtual int getTotalSize() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_getTotalSize(swigCPtr);
return ret;
}
public virtual int getCompressedSize() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_getCompressedSize(swigCPtr);
return ret;
}
public virtual float getCurrentTime() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_getCurrentTime(swigCPtr);
return ret;
}
public virtual int getCurrentPosition() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_getCurrentPosition(swigCPtr);
return ret;
}
public virtual int getCurrentCompressedPosition() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioDecoder_getCurrentCompressedPosition(swigCPtr);
return ret;
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("getFormat", swigMethodTypes0))
swigDelegate0 = new SwigDelegateIAudioDecoder_0(SwigDirectorgetFormat);
if (SwigDerivedClassHasMethod("getFrequency", swigMethodTypes1))
swigDelegate1 = new SwigDelegateIAudioDecoder_1(SwigDirectorgetFrequency);
if (SwigDerivedClassHasMethod("isSeekingSupported", swigMethodTypes2))
swigDelegate2 = new SwigDelegateIAudioDecoder_2(SwigDirectorisSeekingSupported);
if (SwigDerivedClassHasMethod("isValid", swigMethodTypes3))
swigDelegate3 = new SwigDelegateIAudioDecoder_3(SwigDirectorisValid);
if (SwigDerivedClassHasMethod("readAudioData", swigMethodTypes4))
swigDelegate4 = new SwigDelegateIAudioDecoder_4(SwigDirectorreadAudioData);
if (SwigDerivedClassHasMethod("setPosition", swigMethodTypes5))
swigDelegate5 = new SwigDelegateIAudioDecoder_5(SwigDirectorsetPosition);
if (SwigDerivedClassHasMethod("seek", swigMethodTypes6))
swigDelegate6 = new SwigDelegateIAudioDecoder_6(SwigDirectorseek);
if (SwigDerivedClassHasMethod("getTotalTime", swigMethodTypes7))
swigDelegate7 = new SwigDelegateIAudioDecoder_7(SwigDirectorgetTotalTime);
if (SwigDerivedClassHasMethod("getTotalSize", swigMethodTypes8))
swigDelegate8 = new SwigDelegateIAudioDecoder_8(SwigDirectorgetTotalSize);
if (SwigDerivedClassHasMethod("getCompressedSize", swigMethodTypes9))
swigDelegate9 = new SwigDelegateIAudioDecoder_9(SwigDirectorgetCompressedSize);
if (SwigDerivedClassHasMethod("getCurrentTime", swigMethodTypes10))
swigDelegate10 = new SwigDelegateIAudioDecoder_10(SwigDirectorgetCurrentTime);
if (SwigDerivedClassHasMethod("getCurrentPosition", swigMethodTypes11))
swigDelegate11 = new SwigDelegateIAudioDecoder_11(SwigDirectorgetCurrentPosition);
if (SwigDerivedClassHasMethod("getCurrentCompressedPosition", swigMethodTypes12))
swigDelegate12 = new SwigDelegateIAudioDecoder_12(SwigDirectorgetCurrentCompressedPosition);
cAudioCSharpWrapperPINVOKE.IAudioDecoder_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9, swigDelegate10, swigDelegate11, swigDelegate12);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(IAudioDecoder));
return hasDerivedMethod;
}
private int SwigDirectorgetFormat() {
return (int)getFormat();
}
private int SwigDirectorgetFrequency() {
return getFrequency();
}
private bool SwigDirectorisSeekingSupported() {
return isSeekingSupported();
}
private bool SwigDirectorisValid() {
return isValid();
}
private int SwigDirectorreadAudioData(IntPtr output, int amount) {
return readAudioData((output == IntPtr.Zero) ? null : new SWIGTYPE_p_void(output, false), amount);
}
private bool SwigDirectorsetPosition(int position, bool relative) {
return setPosition(position, relative);
}
private bool SwigDirectorseek(float seconds, bool relative) {
return seek(seconds, relative);
}
private float SwigDirectorgetTotalTime() {
return getTotalTime();
}
private int SwigDirectorgetTotalSize() {
return getTotalSize();
}
private int SwigDirectorgetCompressedSize() {
return getCompressedSize();
}
private float SwigDirectorgetCurrentTime() {
return getCurrentTime();
}
private int SwigDirectorgetCurrentPosition() {
return getCurrentPosition();
}
private int SwigDirectorgetCurrentCompressedPosition() {
return getCurrentCompressedPosition();
}
public delegate int SwigDelegateIAudioDecoder_0();
public delegate int SwigDelegateIAudioDecoder_1();
public delegate bool SwigDelegateIAudioDecoder_2();
public delegate bool SwigDelegateIAudioDecoder_3();
public delegate int SwigDelegateIAudioDecoder_4(IntPtr output, int amount);
public delegate bool SwigDelegateIAudioDecoder_5(int position, bool relative);
public delegate bool SwigDelegateIAudioDecoder_6(float seconds, bool relative);
public delegate float SwigDelegateIAudioDecoder_7();
public delegate int SwigDelegateIAudioDecoder_8();
public delegate int SwigDelegateIAudioDecoder_9();
public delegate float SwigDelegateIAudioDecoder_10();
public delegate int SwigDelegateIAudioDecoder_11();
public delegate int SwigDelegateIAudioDecoder_12();
private SwigDelegateIAudioDecoder_0 swigDelegate0;
private SwigDelegateIAudioDecoder_1 swigDelegate1;
private SwigDelegateIAudioDecoder_2 swigDelegate2;
private SwigDelegateIAudioDecoder_3 swigDelegate3;
private SwigDelegateIAudioDecoder_4 swigDelegate4;
private SwigDelegateIAudioDecoder_5 swigDelegate5;
private SwigDelegateIAudioDecoder_6 swigDelegate6;
private SwigDelegateIAudioDecoder_7 swigDelegate7;
private SwigDelegateIAudioDecoder_8 swigDelegate8;
private SwigDelegateIAudioDecoder_9 swigDelegate9;
private SwigDelegateIAudioDecoder_10 swigDelegate10;
private SwigDelegateIAudioDecoder_11 swigDelegate11;
private SwigDelegateIAudioDecoder_12 swigDelegate12;
private static Type[] swigMethodTypes0 = new Type[] { };
private static Type[] swigMethodTypes1 = new Type[] { };
private static Type[] swigMethodTypes2 = new Type[] { };
private static Type[] swigMethodTypes3 = new Type[] { };
private static Type[] swigMethodTypes4 = new Type[] { typeof(SWIGTYPE_p_void), typeof(int) };
private static Type[] swigMethodTypes5 = new Type[] { typeof(int), typeof(bool) };
private static Type[] swigMethodTypes6 = new Type[] { typeof(float), typeof(bool) };
private static Type[] swigMethodTypes7 = new Type[] { };
private static Type[] swigMethodTypes8 = new Type[] { };
private static Type[] swigMethodTypes9 = new Type[] { };
private static Type[] swigMethodTypes10 = new Type[] { };
private static Type[] swigMethodTypes11 = new Type[] { };
private static Type[] swigMethodTypes12 = new Type[] { };
}
}

View File

@ -0,0 +1,77 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IAudioDecoderFactory : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IAudioDecoderFactory(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IAudioDecoderFactory obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IAudioDecoderFactory() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IAudioDecoderFactory(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public IAudioDecoderFactory() : this(cAudioCSharpWrapperPINVOKE.new_IAudioDecoderFactory(), true) {
SwigDirectorConnect();
}
public virtual IAudioDecoder CreateAudioDecoder(IDataSource stream) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioDecoderFactory_CreateAudioDecoder(swigCPtr, IDataSource.getCPtr(stream));
IAudioDecoder ret = (cPtr == IntPtr.Zero) ? null : new IAudioDecoder(cPtr, false);
return ret;
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("CreateAudioDecoder", swigMethodTypes0))
swigDelegate0 = new SwigDelegateIAudioDecoderFactory_0(SwigDirectorCreateAudioDecoder);
cAudioCSharpWrapperPINVOKE.IAudioDecoderFactory_director_connect(swigCPtr, swigDelegate0);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(IAudioDecoderFactory));
return hasDerivedMethod;
}
private IntPtr SwigDirectorCreateAudioDecoder(IntPtr stream) {
return IAudioDecoder.getCPtr(CreateAudioDecoder((stream == IntPtr.Zero) ? null : new IDataSource(stream, false))).Handle;
}
public delegate IntPtr SwigDelegateIAudioDecoderFactory_0(IntPtr stream);
private SwigDelegateIAudioDecoderFactory_0 swigDelegate0;
private static Type[] swigMethodTypes0 = new Type[] { typeof(IDataSource) };
}
}

View File

@ -0,0 +1,199 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IAudioManager : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IAudioManager(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IAudioManager obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IAudioManager() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IAudioManager(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual bool initialize(string deviceName, int outputFrequency, int eaxEffectSlots) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_initialize__SWIG_0(swigCPtr, deviceName, outputFrequency, eaxEffectSlots);
return ret;
}
public virtual bool initialize(string deviceName, int outputFrequency) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_initialize__SWIG_1(swigCPtr, deviceName, outputFrequency);
return ret;
}
public virtual bool initialize(string deviceName) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_initialize__SWIG_2(swigCPtr, deviceName);
return ret;
}
public virtual bool initialize() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_initialize__SWIG_3(swigCPtr);
return ret;
}
public virtual void shutDown() {
cAudioCSharpWrapperPINVOKE.IAudioManager_shutDown(swigCPtr);
}
public virtual void update() {
cAudioCSharpWrapperPINVOKE.IAudioManager_update(swigCPtr);
}
public virtual bool isUpdateThreadRunning() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_isUpdateThreadRunning(swigCPtr);
return ret;
}
public virtual IAudioSource getSoundByName(string name) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_getSoundByName(swigCPtr, name);
IAudioSource ret = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);
return ret;
}
public virtual void releaseAllSources() {
cAudioCSharpWrapperPINVOKE.IAudioManager_releaseAllSources(swigCPtr);
}
public virtual void release(IAudioSource source) {
cAudioCSharpWrapperPINVOKE.IAudioManager_release(swigCPtr, IAudioSource.getCPtr(source));
}
public virtual string getAvailableDeviceName(uint index) {
string ret = cAudioCSharpWrapperPINVOKE.IAudioManager_getAvailableDeviceName(swigCPtr, index);
return ret;
}
public virtual uint getAvailableDeviceCount() {
uint ret = cAudioCSharpWrapperPINVOKE.IAudioManager_getAvailableDeviceCount(swigCPtr);
return ret;
}
public virtual string getDefaultDeviceName() {
string ret = cAudioCSharpWrapperPINVOKE.IAudioManager_getDefaultDeviceName(swigCPtr);
return ret;
}
public virtual IAudioSource create(string name, string filename, bool stream) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_create__SWIG_0(swigCPtr, name, filename, stream);
IAudioSource ret = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);
return ret;
}
public virtual IAudioSource create(string name, string filename) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_create__SWIG_1(swigCPtr, name, filename);
IAudioSource ret = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);
return ret;
}
public virtual IAudioSource createFromMemory(string name, string data, uint length, string extension) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_createFromMemory(swigCPtr, name, data, length, extension);
IAudioSource ret = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);
return ret;
}
public virtual IAudioSource createFromRaw(string name, string data, uint length, uint frequency, SWIGTYPE_p_AudioFormats format) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_createFromRaw(swigCPtr, name, data, length, frequency, SWIGTYPE_p_AudioFormats.getCPtr(format));
IAudioSource ret = (cPtr == IntPtr.Zero) ? null : new IAudioSource(cPtr, false);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual bool registerAudioDecoder(IAudioDecoderFactory factory, string extension) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_registerAudioDecoder(swigCPtr, IAudioDecoderFactory.getCPtr(factory), extension);
return ret;
}
public virtual void unRegisterAudioDecoder(string extension) {
cAudioCSharpWrapperPINVOKE.IAudioManager_unRegisterAudioDecoder(swigCPtr, extension);
}
public virtual bool isAudioDecoderRegistered(string extension) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_isAudioDecoderRegistered(swigCPtr, extension);
return ret;
}
public virtual IAudioDecoderFactory getAudioDecoderFactory(string extension) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_getAudioDecoderFactory(swigCPtr, extension);
IAudioDecoderFactory ret = (cPtr == IntPtr.Zero) ? null : new IAudioDecoderFactory(cPtr, false);
return ret;
}
public virtual void unRegisterAllAudioDecoders() {
cAudioCSharpWrapperPINVOKE.IAudioManager_unRegisterAllAudioDecoders(swigCPtr);
}
public virtual bool registerDataSource(SWIGTYPE_p_IDataSourceFactory factory, string name, int priority) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_registerDataSource(swigCPtr, SWIGTYPE_p_IDataSourceFactory.getCPtr(factory), name, priority);
return ret;
}
public virtual void unRegisterDataSource(string name) {
cAudioCSharpWrapperPINVOKE.IAudioManager_unRegisterDataSource(swigCPtr, name);
}
public virtual bool isDataSourceRegistered(string name) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioManager_isDataSourceRegistered(swigCPtr, name);
return ret;
}
public virtual SWIGTYPE_p_IDataSourceFactory getDataSourceFactory(string name) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_getDataSourceFactory(swigCPtr, name);
SWIGTYPE_p_IDataSourceFactory ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_IDataSourceFactory(cPtr, false);
return ret;
}
public virtual void unRegisterAllDataSources() {
cAudioCSharpWrapperPINVOKE.IAudioManager_unRegisterAllDataSources(swigCPtr);
}
public virtual void registerEventHandler(SWIGTYPE_p_IManagerEventHandler handler) {
cAudioCSharpWrapperPINVOKE.IAudioManager_registerEventHandler(swigCPtr, SWIGTYPE_p_IManagerEventHandler.getCPtr(handler));
}
public virtual void unRegisterEventHandler(SWIGTYPE_p_IManagerEventHandler handler) {
cAudioCSharpWrapperPINVOKE.IAudioManager_unRegisterEventHandler(swigCPtr, SWIGTYPE_p_IManagerEventHandler.getCPtr(handler));
}
public virtual void unRegisterAllEventHandlers() {
cAudioCSharpWrapperPINVOKE.IAudioManager_unRegisterAllEventHandlers(swigCPtr);
}
public virtual SWIGTYPE_p_IListener getListener() {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IAudioManager_getListener(swigCPtr);
SWIGTYPE_p_IListener ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_IListener(cPtr, false);
return ret;
}
}
}

View File

@ -0,0 +1,75 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IAudioPlugin : IRefCounted {
private HandleRef swigCPtr;
internal IAudioPlugin(IntPtr cPtr, bool cMemoryOwn) : base(cAudioCSharpWrapperPINVOKE.IAudioPlugin_SWIGUpcast(cPtr), cMemoryOwn) {
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IAudioPlugin obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IAudioPlugin() {
Dispose();
}
public override void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IAudioPlugin(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
base.Dispose();
}
}
public virtual bool installPlugin(SWIGTYPE_p_ILogger logger) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioPlugin_installPlugin(swigCPtr, SWIGTYPE_p_ILogger.getCPtr(logger));
return ret;
}
public virtual string getPluginName() {
string ret = cAudioCSharpWrapperPINVOKE.IAudioPlugin_getPluginName(swigCPtr);
return ret;
}
public virtual void uninstallPlugin() {
cAudioCSharpWrapperPINVOKE.IAudioPlugin_uninstallPlugin(swigCPtr);
}
public virtual void onCreateAudioManager(IAudioManager manager) {
cAudioCSharpWrapperPINVOKE.IAudioPlugin_onCreateAudioManager(swigCPtr, IAudioManager.getCPtr(manager));
}
public virtual void onCreateAudioCapture(SWIGTYPE_p_IAudioCapture capture) {
cAudioCSharpWrapperPINVOKE.IAudioPlugin_onCreateAudioCapture(swigCPtr, SWIGTYPE_p_IAudioCapture.getCPtr(capture));
}
public virtual void onDestroyAudioManager(IAudioManager manager) {
cAudioCSharpWrapperPINVOKE.IAudioPlugin_onDestroyAudioManager(swigCPtr, IAudioManager.getCPtr(manager));
}
public virtual void onDestoryAudioCapture(SWIGTYPE_p_IAudioCapture capture) {
cAudioCSharpWrapperPINVOKE.IAudioPlugin_onDestoryAudioCapture(swigCPtr, SWIGTYPE_p_IAudioCapture.getCPtr(capture));
}
}
}

View File

@ -0,0 +1,339 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IAudioSource : IRefCounted {
private HandleRef swigCPtr;
internal IAudioSource(IntPtr cPtr, bool cMemoryOwn) : base(cAudioCSharpWrapperPINVOKE.IAudioSource_SWIGUpcast(cPtr), cMemoryOwn) {
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IAudioSource obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IAudioSource() {
Dispose();
}
public override void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IAudioSource(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
base.Dispose();
}
}
public virtual bool play() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_play(swigCPtr);
return ret;
}
public virtual bool play2d(bool toLoop) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_play2d__SWIG_0(swigCPtr, toLoop);
return ret;
}
public virtual bool play2d() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_play2d__SWIG_1(swigCPtr);
return ret;
}
public virtual bool play3d(SWIGTYPE_p_cVector3 position, float soundstr, bool toLoop) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_play3d__SWIG_0(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(position), soundstr, toLoop);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual bool play3d(SWIGTYPE_p_cVector3 position, float soundstr) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_play3d__SWIG_1(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(position), soundstr);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual bool play3d(SWIGTYPE_p_cVector3 position) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_play3d__SWIG_2(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(position));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public virtual void pause() {
cAudioCSharpWrapperPINVOKE.IAudioSource_pause(swigCPtr);
}
public virtual void stop() {
cAudioCSharpWrapperPINVOKE.IAudioSource_stop(swigCPtr);
}
public virtual void loop(bool toLoop) {
cAudioCSharpWrapperPINVOKE.IAudioSource_loop(swigCPtr, toLoop);
}
public virtual bool seek(float seconds, bool relative) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_seek__SWIG_0(swigCPtr, seconds, relative);
return ret;
}
public virtual bool seek(float seconds) {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_seek__SWIG_1(swigCPtr, seconds);
return ret;
}
public virtual float getTotalAudioTime() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getTotalAudioTime(swigCPtr);
return ret;
}
public virtual int getTotalAudioSize() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getTotalAudioSize(swigCPtr);
return ret;
}
public virtual int getCompressedAudioSize() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getCompressedAudioSize(swigCPtr);
return ret;
}
public virtual float getCurrentAudioTime() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getCurrentAudioTime(swigCPtr);
return ret;
}
public virtual int getCurrentAudioPosition() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getCurrentAudioPosition(swigCPtr);
return ret;
}
public virtual int getCurrentCompressedAudioPosition() {
int ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getCurrentCompressedAudioPosition(swigCPtr);
return ret;
}
public virtual bool update() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_update(swigCPtr);
return ret;
}
public virtual void release() {
cAudioCSharpWrapperPINVOKE.IAudioSource_release(swigCPtr);
}
public virtual bool isValid() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_isValid(swigCPtr);
return ret;
}
public virtual bool isPlaying() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_isPlaying(swigCPtr);
return ret;
}
public virtual bool isPaused() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_isPaused(swigCPtr);
return ret;
}
public virtual bool isStopped() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_isStopped(swigCPtr);
return ret;
}
public virtual bool isLooping() {
bool ret = cAudioCSharpWrapperPINVOKE.IAudioSource_isLooping(swigCPtr);
return ret;
}
public virtual void setPosition(SWIGTYPE_p_cVector3 position) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setPosition(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(position));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void setVelocity(SWIGTYPE_p_cVector3 velocity) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setVelocity(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(velocity));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void setDirection(SWIGTYPE_p_cVector3 direction) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setDirection(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(direction));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void setRolloffFactor(float rolloff) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setRolloffFactor(swigCPtr, rolloff);
}
public virtual void setStrength(float soundstrength) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setStrength(swigCPtr, soundstrength);
}
public virtual void setMinDistance(float minDistance) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setMinDistance(swigCPtr, minDistance);
}
public virtual void setMaxDistance(float maxDistance) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setMaxDistance(swigCPtr, maxDistance);
}
public virtual void setPitch(float pitch) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setPitch(swigCPtr, pitch);
}
public virtual void setVolume(float volume) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setVolume(swigCPtr, volume);
}
public virtual void setMinVolume(float minVolume) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setMinVolume(swigCPtr, minVolume);
}
public virtual void setMaxVolume(float maxVolume) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setMaxVolume(swigCPtr, maxVolume);
}
public virtual void setInnerConeAngle(float innerAngle) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setInnerConeAngle(swigCPtr, innerAngle);
}
public virtual void setOuterConeAngle(float outerAngle) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setOuterConeAngle(swigCPtr, outerAngle);
}
public virtual void setOuterConeVolume(float outerVolume) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setOuterConeVolume(swigCPtr, outerVolume);
}
public virtual void setDopplerStrength(float dstrength) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setDopplerStrength(swigCPtr, dstrength);
}
public virtual void setDopplerVelocity(SWIGTYPE_p_cVector3 dvelocity) {
cAudioCSharpWrapperPINVOKE.IAudioSource_setDopplerVelocity(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(dvelocity));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void move(SWIGTYPE_p_cVector3 position) {
cAudioCSharpWrapperPINVOKE.IAudioSource_move(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(position));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual SWIGTYPE_p_cVector3 getPosition() {
SWIGTYPE_p_cVector3 ret = new SWIGTYPE_p_cVector3(cAudioCSharpWrapperPINVOKE.IAudioSource_getPosition(swigCPtr), true);
return ret;
}
public virtual SWIGTYPE_p_cVector3 getVelocity() {
SWIGTYPE_p_cVector3 ret = new SWIGTYPE_p_cVector3(cAudioCSharpWrapperPINVOKE.IAudioSource_getVelocity(swigCPtr), true);
return ret;
}
public virtual SWIGTYPE_p_cVector3 getDirection() {
SWIGTYPE_p_cVector3 ret = new SWIGTYPE_p_cVector3(cAudioCSharpWrapperPINVOKE.IAudioSource_getDirection(swigCPtr), true);
return ret;
}
public virtual float getRolloffFactor() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getRolloffFactor(swigCPtr);
return ret;
}
public virtual float getStrength() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getStrength(swigCPtr);
return ret;
}
public virtual float getMinDistance() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getMinDistance(swigCPtr);
return ret;
}
public virtual float getMaxDistance() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getMaxDistance(swigCPtr);
return ret;
}
public virtual float getPitch() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getPitch(swigCPtr);
return ret;
}
public virtual float getVolume() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getVolume(swigCPtr);
return ret;
}
public virtual float getMinVolume() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getMinVolume(swigCPtr);
return ret;
}
public virtual float getMaxVolume() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getMaxVolume(swigCPtr);
return ret;
}
public virtual float getInnerConeAngle() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getInnerConeAngle(swigCPtr);
return ret;
}
public virtual float getOuterConeAngle() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getOuterConeAngle(swigCPtr);
return ret;
}
public virtual float getOuterConeVolume() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getOuterConeVolume(swigCPtr);
return ret;
}
public virtual float getDopplerStrength() {
float ret = cAudioCSharpWrapperPINVOKE.IAudioSource_getDopplerStrength(swigCPtr);
return ret;
}
public virtual SWIGTYPE_p_cVector3 getDopplerVelocity() {
SWIGTYPE_p_cVector3 ret = new SWIGTYPE_p_cVector3(cAudioCSharpWrapperPINVOKE.IAudioSource_getDopplerVelocity(swigCPtr), true);
return ret;
}
public virtual void registerEventHandler(ISourceEventHandler handler)
{
cAudioCSharpWrapperPINVOKE.IAudioSource_registerEventHandler(swigCPtr, ISourceEventHandler.getCPtr(handler));
}
public virtual void unRegisterEventHandler(ISourceEventHandler handler)
{
cAudioCSharpWrapperPINVOKE.IAudioSource_unRegisterEventHandler(swigCPtr, ISourceEventHandler.getCPtr(handler));
}
public virtual void registerEventHandler(SWIGTYPE_p_ISourceEventHandler handler) {
cAudioCSharpWrapperPINVOKE.IAudioSource_registerEventHandler(swigCPtr, SWIGTYPE_p_ISourceEventHandler.getCPtr(handler));
}
public virtual void unRegisterEventHandler(SWIGTYPE_p_ISourceEventHandler handler) {
cAudioCSharpWrapperPINVOKE.IAudioSource_unRegisterEventHandler(swigCPtr, SWIGTYPE_p_ISourceEventHandler.getCPtr(handler));
}
public virtual void unRegisterAllEventHandlers() {
cAudioCSharpWrapperPINVOKE.IAudioSource_unRegisterAllEventHandlers(swigCPtr);
}
}
}

View File

@ -0,0 +1,140 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class ICaptureEventHandler : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal ICaptureEventHandler(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(ICaptureEventHandler obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~ICaptureEventHandler() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_ICaptureEventHandler(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual void onInit() {
cAudioCSharpWrapperPINVOKE.ICaptureEventHandler_onInit(swigCPtr);
}
public virtual void onUpdate() {
cAudioCSharpWrapperPINVOKE.ICaptureEventHandler_onUpdate(swigCPtr);
}
public virtual void onRelease() {
cAudioCSharpWrapperPINVOKE.ICaptureEventHandler_onRelease(swigCPtr);
}
public virtual void onBeginCapture() {
cAudioCSharpWrapperPINVOKE.ICaptureEventHandler_onBeginCapture(swigCPtr);
}
public virtual void onEndCapture() {
cAudioCSharpWrapperPINVOKE.ICaptureEventHandler_onEndCapture(swigCPtr);
}
public virtual void onUserRequestBuffer() {
cAudioCSharpWrapperPINVOKE.ICaptureEventHandler_onUserRequestBuffer(swigCPtr);
}
public ICaptureEventHandler() : this(cAudioCSharpWrapperPINVOKE.new_ICaptureEventHandler(), true) {
SwigDirectorConnect();
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("onInit", swigMethodTypes0))
swigDelegate0 = new SwigDelegateICaptureEventHandler_0(SwigDirectoronInit);
if (SwigDerivedClassHasMethod("onUpdate", swigMethodTypes1))
swigDelegate1 = new SwigDelegateICaptureEventHandler_1(SwigDirectoronUpdate);
if (SwigDerivedClassHasMethod("onRelease", swigMethodTypes2))
swigDelegate2 = new SwigDelegateICaptureEventHandler_2(SwigDirectoronRelease);
if (SwigDerivedClassHasMethod("onBeginCapture", swigMethodTypes3))
swigDelegate3 = new SwigDelegateICaptureEventHandler_3(SwigDirectoronBeginCapture);
if (SwigDerivedClassHasMethod("onEndCapture", swigMethodTypes4))
swigDelegate4 = new SwigDelegateICaptureEventHandler_4(SwigDirectoronEndCapture);
if (SwigDerivedClassHasMethod("onUserRequestBuffer", swigMethodTypes5))
swigDelegate5 = new SwigDelegateICaptureEventHandler_5(SwigDirectoronUserRequestBuffer);
cAudioCSharpWrapperPINVOKE.ICaptureEventHandler_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ICaptureEventHandler));
return hasDerivedMethod;
}
private void SwigDirectoronInit() {
onInit();
}
private void SwigDirectoronUpdate() {
onUpdate();
}
private void SwigDirectoronRelease() {
onRelease();
}
private void SwigDirectoronBeginCapture() {
onBeginCapture();
}
private void SwigDirectoronEndCapture() {
onEndCapture();
}
private void SwigDirectoronUserRequestBuffer() {
onUserRequestBuffer();
}
public delegate void SwigDelegateICaptureEventHandler_0();
public delegate void SwigDelegateICaptureEventHandler_1();
public delegate void SwigDelegateICaptureEventHandler_2();
public delegate void SwigDelegateICaptureEventHandler_3();
public delegate void SwigDelegateICaptureEventHandler_4();
public delegate void SwigDelegateICaptureEventHandler_5();
private SwigDelegateICaptureEventHandler_0 swigDelegate0;
private SwigDelegateICaptureEventHandler_1 swigDelegate1;
private SwigDelegateICaptureEventHandler_2 swigDelegate2;
private SwigDelegateICaptureEventHandler_3 swigDelegate3;
private SwigDelegateICaptureEventHandler_4 swigDelegate4;
private SwigDelegateICaptureEventHandler_5 swigDelegate5;
private static Type[] swigMethodTypes0 = new Type[] { };
private static Type[] swigMethodTypes1 = new Type[] { };
private static Type[] swigMethodTypes2 = new Type[] { };
private static Type[] swigMethodTypes3 = new Type[] { };
private static Type[] swigMethodTypes4 = new Type[] { };
private static Type[] swigMethodTypes5 = new Type[] { };
}
}

131
cAudioCSharp/IDataSource.cs Normal file
View File

@ -0,0 +1,131 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IDataSource : IRefCounted {
private HandleRef swigCPtr;
internal IDataSource(IntPtr cPtr, bool cMemoryOwn) : base(cAudioCSharpWrapperPINVOKE.IDataSource_SWIGUpcast(cPtr), cMemoryOwn) {
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IDataSource obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IDataSource() {
Dispose();
}
public override void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IDataSource(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
base.Dispose();
}
}
public IDataSource() : this(cAudioCSharpWrapperPINVOKE.new_IDataSource(), true) {
SwigDirectorConnect();
}
public virtual bool isValid() {
bool ret = cAudioCSharpWrapperPINVOKE.IDataSource_isValid(swigCPtr);
return ret;
}
public virtual int getCurrentPos() {
int ret = cAudioCSharpWrapperPINVOKE.IDataSource_getCurrentPos(swigCPtr);
return ret;
}
public virtual int getSize() {
int ret = cAudioCSharpWrapperPINVOKE.IDataSource_getSize(swigCPtr);
return ret;
}
public virtual int read(SWIGTYPE_p_void output, int size) {
int ret = cAudioCSharpWrapperPINVOKE.IDataSource_read(swigCPtr, SWIGTYPE_p_void.getCPtr(output), size);
return ret;
}
public virtual bool seek(int amount, bool relative) {
bool ret = cAudioCSharpWrapperPINVOKE.IDataSource_seek(swigCPtr, amount, relative);
return ret;
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("isValid", swigMethodTypes0))
swigDelegate0 = new SwigDelegateIDataSource_0(SwigDirectorisValid);
if (SwigDerivedClassHasMethod("getCurrentPos", swigMethodTypes1))
swigDelegate1 = new SwigDelegateIDataSource_1(SwigDirectorgetCurrentPos);
if (SwigDerivedClassHasMethod("getSize", swigMethodTypes2))
swigDelegate2 = new SwigDelegateIDataSource_2(SwigDirectorgetSize);
if (SwigDerivedClassHasMethod("read", swigMethodTypes3))
swigDelegate3 = new SwigDelegateIDataSource_3(SwigDirectorread);
if (SwigDerivedClassHasMethod("seek", swigMethodTypes4))
swigDelegate4 = new SwigDelegateIDataSource_4(SwigDirectorseek);
cAudioCSharpWrapperPINVOKE.IDataSource_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(IDataSource));
return hasDerivedMethod;
}
private bool SwigDirectorisValid() {
return isValid();
}
private int SwigDirectorgetCurrentPos() {
return getCurrentPos();
}
private int SwigDirectorgetSize() {
return getSize();
}
private int SwigDirectorread(IntPtr output, int size) {
return read((output == IntPtr.Zero) ? null : new SWIGTYPE_p_void(output, false), size);
}
private bool SwigDirectorseek(int amount, bool relative) {
return seek(amount, relative);
}
public delegate bool SwigDelegateIDataSource_0();
public delegate int SwigDelegateIDataSource_1();
public delegate int SwigDelegateIDataSource_2();
public delegate int SwigDelegateIDataSource_3(IntPtr output, int size);
public delegate bool SwigDelegateIDataSource_4(int amount, bool relative);
private SwigDelegateIDataSource_0 swigDelegate0;
private SwigDelegateIDataSource_1 swigDelegate1;
private SwigDelegateIDataSource_2 swigDelegate2;
private SwigDelegateIDataSource_3 swigDelegate3;
private SwigDelegateIDataSource_4 swigDelegate4;
private static Type[] swigMethodTypes0 = new Type[] { };
private static Type[] swigMethodTypes1 = new Type[] { };
private static Type[] swigMethodTypes2 = new Type[] { };
private static Type[] swigMethodTypes3 = new Type[] { typeof(SWIGTYPE_p_void), typeof(int) };
private static Type[] swigMethodTypes4 = new Type[] { typeof(int), typeof(bool) };
}
}

View File

@ -0,0 +1,77 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IDataSourceFactory : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IDataSourceFactory(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IDataSourceFactory obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IDataSourceFactory() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IDataSourceFactory(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public IDataSourceFactory() : this(cAudioCSharpWrapperPINVOKE.new_IDataSourceFactory(), true) {
SwigDirectorConnect();
}
public virtual IDataSource CreateDataSource(string filename, bool streamingRequested) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IDataSourceFactory_CreateDataSource(swigCPtr, filename, streamingRequested);
IDataSource ret = (cPtr == IntPtr.Zero) ? null : new IDataSource(cPtr, false);
return ret;
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("CreateDataSource", swigMethodTypes0))
swigDelegate0 = new SwigDelegateIDataSourceFactory_0(SwigDirectorCreateDataSource);
cAudioCSharpWrapperPINVOKE.IDataSourceFactory_director_connect(swigCPtr, swigDelegate0);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(IDataSourceFactory));
return hasDerivedMethod;
}
private IntPtr SwigDirectorCreateDataSource(string filename, bool streamingRequested) {
return IDataSource.getCPtr(CreateDataSource(filename, streamingRequested)).Handle;
}
public delegate IntPtr SwigDelegateIDataSourceFactory_0(string filename, bool streamingRequested);
private SwigDelegateIDataSourceFactory_0 swigDelegate0;
private static Type[] swigMethodTypes0 = new Type[] { typeof(string), typeof(bool) };
}
}

100
cAudioCSharp/IListener.cs Normal file
View File

@ -0,0 +1,100 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IListener : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IListener(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IListener obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IListener() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IListener(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual void setPosition(SWIGTYPE_p_cVector3 pos) {
cAudioCSharpWrapperPINVOKE.IListener_setPosition(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(pos));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void setDirection(SWIGTYPE_p_cVector3 dir) {
cAudioCSharpWrapperPINVOKE.IListener_setDirection(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(dir));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void setUpVector(SWIGTYPE_p_cVector3 up) {
cAudioCSharpWrapperPINVOKE.IListener_setUpVector(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(up));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void setVelocity(SWIGTYPE_p_cVector3 vel) {
cAudioCSharpWrapperPINVOKE.IListener_setVelocity(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(vel));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual void setMasterVolume(float volume) {
cAudioCSharpWrapperPINVOKE.IListener_setMasterVolume(swigCPtr, volume);
}
public virtual void move(SWIGTYPE_p_cVector3 pos) {
cAudioCSharpWrapperPINVOKE.IListener_move(swigCPtr, SWIGTYPE_p_cVector3.getCPtr(pos));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual SWIGTYPE_p_cVector3 getPosition() {
SWIGTYPE_p_cVector3 ret = new SWIGTYPE_p_cVector3(cAudioCSharpWrapperPINVOKE.IListener_getPosition(swigCPtr), true);
return ret;
}
public virtual SWIGTYPE_p_cVector3 getDirection() {
SWIGTYPE_p_cVector3 ret = new SWIGTYPE_p_cVector3(cAudioCSharpWrapperPINVOKE.IListener_getDirection(swigCPtr), true);
return ret;
}
public virtual SWIGTYPE_p_cVector3 getUpVector() {
SWIGTYPE_p_cVector3 ret = new SWIGTYPE_p_cVector3(cAudioCSharpWrapperPINVOKE.IListener_getUpVector(swigCPtr), true);
return ret;
}
public virtual SWIGTYPE_p_cVector3 getVelocity() {
SWIGTYPE_p_cVector3 ret = new SWIGTYPE_p_cVector3(cAudioCSharpWrapperPINVOKE.IListener_getVelocity(swigCPtr), true);
return ret;
}
public virtual float getMasterVolume() {
float ret = cAudioCSharpWrapperPINVOKE.IListener_getMasterVolume(swigCPtr);
return ret;
}
}
}

View File

@ -0,0 +1,76 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class ILogReceiver : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal ILogReceiver(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(ILogReceiver obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~ILogReceiver() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_ILogReceiver(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public ILogReceiver() : this(cAudioCSharpWrapperPINVOKE.new_ILogReceiver(), true) {
SwigDirectorConnect();
}
public virtual bool OnLogMessage(string sender, string message, LogLevel level, float time) {
bool ret = cAudioCSharpWrapperPINVOKE.ILogReceiver_OnLogMessage(swigCPtr, sender, message, (int)level, time);
return ret;
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("OnLogMessage", swigMethodTypes0))
swigDelegate0 = new SwigDelegateILogReceiver_0(SwigDirectorOnLogMessage);
cAudioCSharpWrapperPINVOKE.ILogReceiver_director_connect(swigCPtr, swigDelegate0);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ILogReceiver));
return hasDerivedMethod;
}
private bool SwigDirectorOnLogMessage(string sender, string message, int level, float time) {
return OnLogMessage(sender, message, (LogLevel)level, time);
}
public delegate bool SwigDelegateILogReceiver_0(string sender, string message, int level, float time);
private SwigDelegateILogReceiver_0 swigDelegate0;
private static Type[] swigMethodTypes0 = new Type[] { typeof(string), typeof(string), typeof(LogLevel), typeof(float) };
}
}

96
cAudioCSharp/ILogger.cs Normal file
View File

@ -0,0 +1,96 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class ILogger : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal ILogger(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(ILogger obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~ILogger() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_ILogger(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual void logCritical(string sender, string msg) {
cAudioCSharpWrapperPINVOKE.ILogger_logCritical(swigCPtr, sender, msg);
}
public virtual void logError(string sender, string msg) {
cAudioCSharpWrapperPINVOKE.ILogger_logError(swigCPtr, sender, msg);
}
public virtual void logWarning(string sender, string msg) {
cAudioCSharpWrapperPINVOKE.ILogger_logWarning(swigCPtr, sender, msg);
}
public virtual void logInfo(string sender, string msg) {
cAudioCSharpWrapperPINVOKE.ILogger_logInfo(swigCPtr, sender, msg);
}
public virtual void logDebug(string sender, string msg) {
cAudioCSharpWrapperPINVOKE.ILogger_logDebug(swigCPtr, sender, msg);
}
public virtual SWIGTYPE_p_LogLevel getLogLevel() {
SWIGTYPE_p_LogLevel ret = new SWIGTYPE_p_LogLevel(cAudioCSharpWrapperPINVOKE.ILogger_getLogLevel(swigCPtr), false);
return ret;
}
public virtual void setLogLevel(SWIGTYPE_p_LogLevel logLevel) {
cAudioCSharpWrapperPINVOKE.ILogger_setLogLevel(swigCPtr, SWIGTYPE_p_LogLevel.getCPtr(logLevel));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public virtual bool registerLogReceiver(SWIGTYPE_p_ILogReceiver receiver, string name) {
bool ret = cAudioCSharpWrapperPINVOKE.ILogger_registerLogReceiver(swigCPtr, SWIGTYPE_p_ILogReceiver.getCPtr(receiver), name);
return ret;
}
public virtual void unRegisterLogReceiver(string name) {
cAudioCSharpWrapperPINVOKE.ILogger_unRegisterLogReceiver(swigCPtr, name);
}
public virtual bool isLogReceiverRegistered(string name) {
bool ret = cAudioCSharpWrapperPINVOKE.ILogger_isLogReceiverRegistered(swigCPtr, name);
return ret;
}
public virtual SWIGTYPE_p_ILogReceiver getLogReceiver(string name) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.ILogger_getLogReceiver(swigCPtr, name);
SWIGTYPE_p_ILogReceiver ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_ILogReceiver(cPtr, false);
return ret;
}
}
}

View File

@ -0,0 +1,140 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IManagerEventHandler : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IManagerEventHandler(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IManagerEventHandler obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IManagerEventHandler() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IManagerEventHandler(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual void onInit() {
cAudioCSharpWrapperPINVOKE.IManagerEventHandler_onInit(swigCPtr);
}
public virtual void onUpdate() {
cAudioCSharpWrapperPINVOKE.IManagerEventHandler_onUpdate(swigCPtr);
}
public virtual void onRelease() {
cAudioCSharpWrapperPINVOKE.IManagerEventHandler_onRelease(swigCPtr);
}
public virtual void onSourceCreate() {
cAudioCSharpWrapperPINVOKE.IManagerEventHandler_onSourceCreate(swigCPtr);
}
public virtual void onDecoderRegister() {
cAudioCSharpWrapperPINVOKE.IManagerEventHandler_onDecoderRegister(swigCPtr);
}
public virtual void onDataSourceRegister() {
cAudioCSharpWrapperPINVOKE.IManagerEventHandler_onDataSourceRegister(swigCPtr);
}
public IManagerEventHandler() : this(cAudioCSharpWrapperPINVOKE.new_IManagerEventHandler(), true) {
SwigDirectorConnect();
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("onInit", swigMethodTypes0))
swigDelegate0 = new SwigDelegateIManagerEventHandler_0(SwigDirectoronInit);
if (SwigDerivedClassHasMethod("onUpdate", swigMethodTypes1))
swigDelegate1 = new SwigDelegateIManagerEventHandler_1(SwigDirectoronUpdate);
if (SwigDerivedClassHasMethod("onRelease", swigMethodTypes2))
swigDelegate2 = new SwigDelegateIManagerEventHandler_2(SwigDirectoronRelease);
if (SwigDerivedClassHasMethod("onSourceCreate", swigMethodTypes3))
swigDelegate3 = new SwigDelegateIManagerEventHandler_3(SwigDirectoronSourceCreate);
if (SwigDerivedClassHasMethod("onDecoderRegister", swigMethodTypes4))
swigDelegate4 = new SwigDelegateIManagerEventHandler_4(SwigDirectoronDecoderRegister);
if (SwigDerivedClassHasMethod("onDataSourceRegister", swigMethodTypes5))
swigDelegate5 = new SwigDelegateIManagerEventHandler_5(SwigDirectoronDataSourceRegister);
cAudioCSharpWrapperPINVOKE.IManagerEventHandler_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(IManagerEventHandler));
return hasDerivedMethod;
}
private void SwigDirectoronInit() {
onInit();
}
private void SwigDirectoronUpdate() {
onUpdate();
}
private void SwigDirectoronRelease() {
onRelease();
}
private void SwigDirectoronSourceCreate() {
onSourceCreate();
}
private void SwigDirectoronDecoderRegister() {
onDecoderRegister();
}
private void SwigDirectoronDataSourceRegister() {
onDataSourceRegister();
}
public delegate void SwigDelegateIManagerEventHandler_0();
public delegate void SwigDelegateIManagerEventHandler_1();
public delegate void SwigDelegateIManagerEventHandler_2();
public delegate void SwigDelegateIManagerEventHandler_3();
public delegate void SwigDelegateIManagerEventHandler_4();
public delegate void SwigDelegateIManagerEventHandler_5();
private SwigDelegateIManagerEventHandler_0 swigDelegate0;
private SwigDelegateIManagerEventHandler_1 swigDelegate1;
private SwigDelegateIManagerEventHandler_2 swigDelegate2;
private SwigDelegateIManagerEventHandler_3 swigDelegate3;
private SwigDelegateIManagerEventHandler_4 swigDelegate4;
private SwigDelegateIManagerEventHandler_5 swigDelegate5;
private static Type[] swigMethodTypes0 = new Type[] { };
private static Type[] swigMethodTypes1 = new Type[] { };
private static Type[] swigMethodTypes2 = new Type[] { };
private static Type[] swigMethodTypes3 = new Type[] { };
private static Type[] swigMethodTypes4 = new Type[] { };
private static Type[] swigMethodTypes5 = new Type[] { };
}
}

View File

@ -0,0 +1,61 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IMemoryProvider : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IMemoryProvider(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IMemoryProvider obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IMemoryProvider() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IMemoryProvider(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual SWIGTYPE_p_void Allocate(uint size, string filename, int line, string function) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IMemoryProvider_Allocate(swigCPtr, size, filename, line, function);
SWIGTYPE_p_void ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_void(cPtr, false);
return ret;
}
public virtual void Free(SWIGTYPE_p_void pointer) {
cAudioCSharpWrapperPINVOKE.IMemoryProvider_Free(swigCPtr, SWIGTYPE_p_void.getCPtr(pointer));
}
public virtual uint getMaxAllocationSize() {
uint ret = cAudioCSharpWrapperPINVOKE.IMemoryProvider_getMaxAllocationSize(swigCPtr);
return ret;
}
}
}

View File

@ -0,0 +1,63 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IRefCounted : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IRefCounted(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IRefCounted obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IRefCounted() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IRefCounted(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public IRefCounted() : this(cAudioCSharpWrapperPINVOKE.new_IRefCounted(), true) {
}
public void grab() {
cAudioCSharpWrapperPINVOKE.IRefCounted_grab(swigCPtr);
}
public bool drop() {
bool ret = cAudioCSharpWrapperPINVOKE.IRefCounted_drop(swigCPtr);
return ret;
}
public int getReferenceCount() {
int ret = cAudioCSharpWrapperPINVOKE.IRefCounted_getReferenceCount(swigCPtr);
return ret;
}
}
}

View File

@ -0,0 +1,127 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class ISourceEventHandler : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal ISourceEventHandler(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(ISourceEventHandler obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~ISourceEventHandler() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_ISourceEventHandler(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual void onUpdate() {
cAudioCSharpWrapperPINVOKE.ISourceEventHandler_onUpdate(swigCPtr);
}
public virtual void onRelease() {
cAudioCSharpWrapperPINVOKE.ISourceEventHandler_onRelease(swigCPtr);
}
public virtual void onPlay() {
cAudioCSharpWrapperPINVOKE.ISourceEventHandler_onPlay(swigCPtr);
}
public virtual void onStop() {
cAudioCSharpWrapperPINVOKE.ISourceEventHandler_onStop(swigCPtr);
}
public virtual void onPause() {
cAudioCSharpWrapperPINVOKE.ISourceEventHandler_onPause(swigCPtr);
}
public ISourceEventHandler() : this(cAudioCSharpWrapperPINVOKE.new_ISourceEventHandler(), true) {
SwigDirectorConnect();
}
private void SwigDirectorConnect() {
if (SwigDerivedClassHasMethod("onUpdate", swigMethodTypes0))
swigDelegate0 = new SwigDelegateISourceEventHandler_0(SwigDirectoronUpdate);
if (SwigDerivedClassHasMethod("onRelease", swigMethodTypes1))
swigDelegate1 = new SwigDelegateISourceEventHandler_1(SwigDirectoronRelease);
if (SwigDerivedClassHasMethod("onPlay", swigMethodTypes2))
swigDelegate2 = new SwigDelegateISourceEventHandler_2(SwigDirectoronPlay);
if (SwigDerivedClassHasMethod("onStop", swigMethodTypes3))
swigDelegate3 = new SwigDelegateISourceEventHandler_3(SwigDirectoronStop);
if (SwigDerivedClassHasMethod("onPause", swigMethodTypes4))
swigDelegate4 = new SwigDelegateISourceEventHandler_4(SwigDirectoronPause);
cAudioCSharpWrapperPINVOKE.ISourceEventHandler_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4);
}
private bool SwigDerivedClassHasMethod(string methodName, Type[] methodTypes) {
System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance, null, methodTypes, null);
bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ISourceEventHandler));
return hasDerivedMethod;
}
private void SwigDirectoronUpdate() {
onUpdate();
}
private void SwigDirectoronRelease() {
onRelease();
}
private void SwigDirectoronPlay() {
onPlay();
}
private void SwigDirectoronStop() {
onStop();
}
private void SwigDirectoronPause() {
onPause();
}
public delegate void SwigDelegateISourceEventHandler_0();
public delegate void SwigDelegateISourceEventHandler_1();
public delegate void SwigDelegateISourceEventHandler_2();
public delegate void SwigDelegateISourceEventHandler_3();
public delegate void SwigDelegateISourceEventHandler_4();
private SwigDelegateISourceEventHandler_0 swigDelegate0;
private SwigDelegateISourceEventHandler_1 swigDelegate1;
private SwigDelegateISourceEventHandler_2 swigDelegate2;
private SwigDelegateISourceEventHandler_3 swigDelegate3;
private SwigDelegateISourceEventHandler_4 swigDelegate4;
private static Type[] swigMethodTypes0 = new Type[] { };
private static Type[] swigMethodTypes1 = new Type[] { };
private static Type[] swigMethodTypes2 = new Type[] { };
private static Type[] swigMethodTypes3 = new Type[] { };
private static Type[] swigMethodTypes4 = new Type[] { };
}
}

64
cAudioCSharp/IThread.cs Normal file
View File

@ -0,0 +1,64 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IThread : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IThread(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IThread obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IThread() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IThread(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual bool start() {
bool ret = cAudioCSharpWrapperPINVOKE.IThread_start(swigCPtr);
return ret;
}
public virtual void join() {
cAudioCSharpWrapperPINVOKE.IThread_join(swigCPtr);
}
public virtual void shutdown() {
cAudioCSharpWrapperPINVOKE.IThread_shutdown(swigCPtr);
}
public virtual bool isRunning() {
bool ret = cAudioCSharpWrapperPINVOKE.IThread_isRunning(swigCPtr);
return ret;
}
}
}

View File

@ -0,0 +1,50 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IThreadWorker : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IThreadWorker(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IThreadWorker obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IThreadWorker() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IThreadWorker(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public virtual void run() {
cAudioCSharpWrapperPINVOKE.IThreadWorker_run(swigCPtr);
}
}
}

349
cAudioCSharp/IntVector.cs Normal file
View File

@ -0,0 +1,349 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class IntVector : IDisposable, System.Collections.IEnumerable
#if !SWIG_DOTNET_1
, System.Collections.Generic.IList<int>
#endif
{
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal IntVector(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(IntVector obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~IntVector() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_IntVector(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public IntVector(System.Collections.ICollection c) : this() {
if (c == null)
throw new ArgumentNullException("c");
foreach (int element in c) {
this.Add(element);
}
}
public bool IsFixedSize {
get {
return false;
}
}
public bool IsReadOnly {
get {
return false;
}
}
public int this[int index] {
get {
return getitem(index);
}
set {
setitem(index, value);
}
}
public int Capacity {
get {
return (int)capacity();
}
set {
if (value < size())
throw new ArgumentOutOfRangeException("Capacity");
reserve((uint)value);
}
}
public int Count {
get {
return (int)size();
}
}
public bool IsSynchronized {
get {
return false;
}
}
#if SWIG_DOTNET_1
public void CopyTo(System.Array array)
#else
public void CopyTo(int[] array)
#endif
{
CopyTo(0, array, 0, this.Count);
}
#if SWIG_DOTNET_1
public void CopyTo(System.Array array, int arrayIndex)
#else
public void CopyTo(int[] array, int arrayIndex)
#endif
{
CopyTo(0, array, arrayIndex, this.Count);
}
#if SWIG_DOTNET_1
public void CopyTo(int index, System.Array array, int arrayIndex, int count)
#else
public void CopyTo(int index, int[] array, int arrayIndex, int count)
#endif
{
if (array == null)
throw new ArgumentNullException("array");
if (index < 0)
throw new ArgumentOutOfRangeException("index", "Value is less than zero");
if (arrayIndex < 0)
throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
if (count < 0)
throw new ArgumentOutOfRangeException("count", "Value is less than zero");
if (array.Rank > 1)
throw new ArgumentException("Multi dimensional array.", "array");
if (index+count > this.Count || arrayIndex+count > array.Length)
throw new ArgumentException("Number of elements to copy is too large.");
for (int i=0; i<count; i++)
array.SetValue(getitemcopy(index+i), arrayIndex+i);
}
#if !SWIG_DOTNET_1
System.Collections.Generic.IEnumerator<int> System.Collections.Generic.IEnumerable<int>.GetEnumerator() {
return new IntVectorEnumerator(this);
}
#endif
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
return new IntVectorEnumerator(this);
}
public IntVectorEnumerator GetEnumerator() {
return new IntVectorEnumerator(this);
}
// Type-safe enumerator
/// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
/// whenever the collection is modified. This has been done for changes in the size of the
/// collection but not when one of the elements of the collection is modified as it is a bit
/// tricky to detect unmanaged code that modifies the collection under our feet.
public sealed class IntVectorEnumerator : System.Collections.IEnumerator
#if !SWIG_DOTNET_1
, System.Collections.Generic.IEnumerator<int>
#endif
{
private IntVector collectionRef;
private int currentIndex;
private object currentObject;
private int currentSize;
public IntVectorEnumerator(IntVector collection) {
collectionRef = collection;
currentIndex = -1;
currentObject = null;
currentSize = collectionRef.Count;
}
// Type-safe iterator Current
public int Current {
get {
if (currentIndex == -1)
throw new InvalidOperationException("Enumeration not started.");
if (currentIndex > currentSize - 1)
throw new InvalidOperationException("Enumeration finished.");
if (currentObject == null)
throw new InvalidOperationException("Collection modified.");
return (int)currentObject;
}
}
// Type-unsafe IEnumerator.Current
object System.Collections.IEnumerator.Current {
get {
return Current;
}
}
public bool MoveNext() {
int size = collectionRef.Count;
bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
if (moveOkay) {
currentIndex++;
currentObject = collectionRef[currentIndex];
} else {
currentObject = null;
}
return moveOkay;
}
public void Reset() {
currentIndex = -1;
currentObject = null;
if (collectionRef.Count != currentSize) {
throw new InvalidOperationException("Collection modified.");
}
}
#if !SWIG_DOTNET_1
public void Dispose() {
currentIndex = -1;
currentObject = null;
}
#endif
}
public void Clear() {
cAudioCSharpWrapperPINVOKE.IntVector_Clear(swigCPtr);
}
public void Add(int x) {
cAudioCSharpWrapperPINVOKE.IntVector_Add(swigCPtr, x);
}
private uint size() {
uint ret = cAudioCSharpWrapperPINVOKE.IntVector_size(swigCPtr);
return ret;
}
private uint capacity() {
uint ret = cAudioCSharpWrapperPINVOKE.IntVector_capacity(swigCPtr);
return ret;
}
private void reserve(uint n) {
cAudioCSharpWrapperPINVOKE.IntVector_reserve(swigCPtr, n);
}
public IntVector() : this(cAudioCSharpWrapperPINVOKE.new_IntVector__SWIG_0(), true) {
}
public IntVector(IntVector other) : this(cAudioCSharpWrapperPINVOKE.new_IntVector__SWIG_1(IntVector.getCPtr(other)), true) {
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public IntVector(int capacity) : this(cAudioCSharpWrapperPINVOKE.new_IntVector__SWIG_2(capacity), true) {
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
private int getitemcopy(int index) {
int ret = cAudioCSharpWrapperPINVOKE.IntVector_getitemcopy(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private int getitem(int index) {
int ret = cAudioCSharpWrapperPINVOKE.IntVector_getitem(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private void setitem(int index, int val) {
cAudioCSharpWrapperPINVOKE.IntVector_setitem(swigCPtr, index, val);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void AddRange(IntVector values) {
cAudioCSharpWrapperPINVOKE.IntVector_AddRange(swigCPtr, IntVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public IntVector GetRange(int index, int count) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IntVector_GetRange(swigCPtr, index, count);
IntVector ret = (cPtr == IntPtr.Zero) ? null : new IntVector(cPtr, true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Insert(int index, int x) {
cAudioCSharpWrapperPINVOKE.IntVector_Insert(swigCPtr, index, x);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void InsertRange(int index, IntVector values) {
cAudioCSharpWrapperPINVOKE.IntVector_InsertRange(swigCPtr, index, IntVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveAt(int index) {
cAudioCSharpWrapperPINVOKE.IntVector_RemoveAt(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveRange(int index, int count) {
cAudioCSharpWrapperPINVOKE.IntVector_RemoveRange(swigCPtr, index, count);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public static IntVector Repeat(int value, int count) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.IntVector_Repeat(value, count);
IntVector ret = (cPtr == IntPtr.Zero) ? null : new IntVector(cPtr, true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Reverse() {
cAudioCSharpWrapperPINVOKE.IntVector_Reverse__SWIG_0(swigCPtr);
}
public void Reverse(int index, int count) {
cAudioCSharpWrapperPINVOKE.IntVector_Reverse__SWIG_1(swigCPtr, index, count);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void SetRange(int index, IntVector values) {
cAudioCSharpWrapperPINVOKE.IntVector_SetRange(swigCPtr, index, IntVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public bool Contains(int value) {
bool ret = cAudioCSharpWrapperPINVOKE.IntVector_Contains(swigCPtr, value);
return ret;
}
public int IndexOf(int value) {
int ret = cAudioCSharpWrapperPINVOKE.IntVector_IndexOf(swigCPtr, value);
return ret;
}
public int LastIndexOf(int value) {
int ret = cAudioCSharpWrapperPINVOKE.IntVector_LastIndexOf(swigCPtr, value);
return ret;
}
public bool Remove(int value) {
bool ret = cAudioCSharpWrapperPINVOKE.IntVector_Remove(swigCPtr, value);
return ret;
}
}
}

20
cAudioCSharp/LogLevel.cs Normal file
View File

@ -0,0 +1,20 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
public enum LogLevel {
ELL_DEBUG,
ELL_INFO,
ELL_WARNING,
ELL_ERROR,
ELL_CRITICAL,
ELL_COUNT
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("cAudioCSharp")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("cAudioCSharp")]
[assembly: AssemblyCopyright("Copyright © 2011")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("4cc84d4a-a0ff-4cd9-b656-e8e0dac657b9")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_AudioFormats {
private HandleRef swigCPtr;
internal SWIGTYPE_p_AudioFormats(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_AudioFormats() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_AudioFormats obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_IAudioCapture {
private HandleRef swigCPtr;
internal SWIGTYPE_p_IAudioCapture(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_IAudioCapture() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_IAudioCapture obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_IDataSourceFactory {
private HandleRef swigCPtr;
internal SWIGTYPE_p_IDataSourceFactory(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_IDataSourceFactory() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_IDataSourceFactory obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_IListener {
private HandleRef swigCPtr;
internal SWIGTYPE_p_IListener(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_IListener() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_IListener obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_ILogReceiver {
private HandleRef swigCPtr;
internal SWIGTYPE_p_ILogReceiver(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_ILogReceiver() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_ILogReceiver obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_ILogger {
private HandleRef swigCPtr;
internal SWIGTYPE_p_ILogger(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_ILogger() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_ILogger obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_IManagerEventHandler {
private HandleRef swigCPtr;
internal SWIGTYPE_p_IManagerEventHandler(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_IManagerEventHandler() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_IManagerEventHandler obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_ISourceEventHandler {
private HandleRef swigCPtr;
internal SWIGTYPE_p_ISourceEventHandler(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_ISourceEventHandler() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_ISourceEventHandler obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_LogLevel {
private HandleRef swigCPtr;
internal SWIGTYPE_p_LogLevel(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_LogLevel() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_LogLevel obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_cVector3 {
private HandleRef swigCPtr;
internal SWIGTYPE_p_cVector3(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_cVector3() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_cVector3 obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_float {
private HandleRef swigCPtr;
internal SWIGTYPE_p_float(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_float() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_float obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_p_char {
private HandleRef swigCPtr;
internal SWIGTYPE_p_p_char(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_p_char() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_p_char obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_std__basic_stringT_char_t {
private HandleRef swigCPtr;
internal SWIGTYPE_p_std__basic_stringT_char_t(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_std__basic_stringT_char_t() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_std__basic_stringT_char_t obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

View File

@ -0,0 +1,30 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class SWIGTYPE_p_void {
private HandleRef swigCPtr;
internal SWIGTYPE_p_void(IntPtr cPtr, bool futureUse) {
swigCPtr = new HandleRef(this, cPtr);
}
protected SWIGTYPE_p_void() {
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
internal static HandleRef getCPtr(SWIGTYPE_p_void obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
}
}

296
cAudioCSharp/StringMap.cs Normal file
View File

@ -0,0 +1,296 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class StringMap : IDisposable
#if !SWIG_DOTNET_1
, System.Collections.Generic.IDictionary<string, string>
#endif
{
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal StringMap(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(StringMap obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~StringMap() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_StringMap(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public string this[string key] {
get {
return getitem(key);
}
set {
setitem(key, value);
}
}
public bool TryGetValue(string key, out string value) {
if (this.ContainsKey(key)) {
value = this[key];
return true;
}
value = default(string);
return false;
}
public int Count {
get {
return (int)size();
}
}
public bool IsReadOnly {
get {
return false;
}
}
#if !SWIG_DOTNET_1
public System.Collections.Generic.ICollection<string> Keys {
get {
System.Collections.Generic.ICollection<string> keys = new System.Collections.Generic.List<string>();
int size = this.Count;
if (size > 0) {
IntPtr iter = create_iterator_begin();
for (int i = 0; i < size; i++) {
keys.Add(get_next_key(iter));
}
destroy_iterator(iter);
}
return keys;
}
}
public System.Collections.Generic.ICollection<string> Values {
get {
System.Collections.Generic.ICollection<string> vals = new System.Collections.Generic.List<string>();
foreach (System.Collections.Generic.KeyValuePair<string, string> pair in this) {
vals.Add(pair.Value);
}
return vals;
}
}
public void Add(System.Collections.Generic.KeyValuePair<string, string> item) {
Add(item.Key, item.Value);
}
public bool Remove(System.Collections.Generic.KeyValuePair<string, string> item) {
if (Contains(item)) {
return Remove(item.Key);
} else {
return false;
}
}
public bool Contains(System.Collections.Generic.KeyValuePair<string, string> item) {
if (this[item.Key] == item.Value) {
return true;
} else {
return false;
}
}
public void CopyTo(System.Collections.Generic.KeyValuePair<string, string>[] array) {
CopyTo(array, 0);
}
public void CopyTo(System.Collections.Generic.KeyValuePair<string, string>[] array, int arrayIndex) {
if (array == null)
throw new ArgumentNullException("array");
if (arrayIndex < 0)
throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
if (array.Rank > 1)
throw new ArgumentException("Multi dimensional array.", "array");
if (arrayIndex+this.Count > array.Length)
throw new ArgumentException("Number of elements to copy is too large.");
System.Collections.Generic.IList<string> keyList = new System.Collections.Generic.List<string>(this.Keys);
for (int i = 0; i < keyList.Count; i++) {
string currentKey = keyList[i];
array.SetValue(new System.Collections.Generic.KeyValuePair<string, string>(currentKey, this[currentKey]), arrayIndex+i);
}
}
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, string>> System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string>>.GetEnumerator() {
return new StringMapEnumerator(this);
}
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
return new StringMapEnumerator(this);
}
public StringMapEnumerator GetEnumerator() {
return new StringMapEnumerator(this);
}
// Type-safe enumerator
/// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
/// whenever the collection is modified. This has been done for changes in the size of the
/// collection but not when one of the elements of the collection is modified as it is a bit
/// tricky to detect unmanaged code that modifies the collection under our feet.
public sealed class StringMapEnumerator : System.Collections.IEnumerator,
System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, string>>
{
private StringMap collectionRef;
private System.Collections.Generic.IList<string> keyCollection;
private int currentIndex;
private object currentObject;
private int currentSize;
public StringMapEnumerator(StringMap collection) {
collectionRef = collection;
keyCollection = new System.Collections.Generic.List<string>(collection.Keys);
currentIndex = -1;
currentObject = null;
currentSize = collectionRef.Count;
}
// Type-safe iterator Current
public System.Collections.Generic.KeyValuePair<string, string> Current {
get {
if (currentIndex == -1)
throw new InvalidOperationException("Enumeration not started.");
if (currentIndex > currentSize - 1)
throw new InvalidOperationException("Enumeration finished.");
if (currentObject == null)
throw new InvalidOperationException("Collection modified.");
return (System.Collections.Generic.KeyValuePair<string, string>)currentObject;
}
}
// Type-unsafe IEnumerator.Current
object System.Collections.IEnumerator.Current {
get {
return Current;
}
}
public bool MoveNext() {
int size = collectionRef.Count;
bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
if (moveOkay) {
currentIndex++;
string currentKey = keyCollection[currentIndex];
currentObject = new System.Collections.Generic.KeyValuePair<string, string>(currentKey, collectionRef[currentKey]);
} else {
currentObject = null;
}
return moveOkay;
}
public void Reset() {
currentIndex = -1;
currentObject = null;
if (collectionRef.Count != currentSize) {
throw new InvalidOperationException("Collection modified.");
}
}
public void Dispose() {
currentIndex = -1;
currentObject = null;
}
}
#endif
public StringMap() : this(cAudioCSharpWrapperPINVOKE.new_StringMap__SWIG_0(), true) {
}
public StringMap(StringMap other) : this(cAudioCSharpWrapperPINVOKE.new_StringMap__SWIG_1(StringMap.getCPtr(other)), true) {
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
private uint size() {
uint ret = cAudioCSharpWrapperPINVOKE.StringMap_size(swigCPtr);
return ret;
}
public bool empty() {
bool ret = cAudioCSharpWrapperPINVOKE.StringMap_empty(swigCPtr);
return ret;
}
public void Clear() {
cAudioCSharpWrapperPINVOKE.StringMap_Clear(swigCPtr);
}
private string getitem(string key) {
string ret = cAudioCSharpWrapperPINVOKE.StringMap_getitem(swigCPtr, key);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private void setitem(string key, string x) {
cAudioCSharpWrapperPINVOKE.StringMap_setitem(swigCPtr, key, x);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public bool ContainsKey(string key) {
bool ret = cAudioCSharpWrapperPINVOKE.StringMap_ContainsKey(swigCPtr, key);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Add(string key, string val) {
cAudioCSharpWrapperPINVOKE.StringMap_Add(swigCPtr, key, val);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public bool Remove(string key) {
bool ret = cAudioCSharpWrapperPINVOKE.StringMap_Remove(swigCPtr, key);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private IntPtr create_iterator_begin() {
IntPtr ret = cAudioCSharpWrapperPINVOKE.StringMap_create_iterator_begin(swigCPtr);
return ret;
}
private string get_next_key(IntPtr swigiterator) {
string ret = cAudioCSharpWrapperPINVOKE.StringMap_get_next_key(swigCPtr, swigiterator);
return ret;
}
private void destroy_iterator(IntPtr swigiterator) {
cAudioCSharpWrapperPINVOKE.StringMap_destroy_iterator(swigCPtr, swigiterator);
}
}
}

View File

@ -0,0 +1,354 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class StringVector : IDisposable, System.Collections.IEnumerable
#if !SWIG_DOTNET_1
, System.Collections.Generic.IList<string>
#endif
{
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal StringVector(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(StringVector obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~StringVector() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_StringVector(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public StringVector(System.Collections.ICollection c) : this() {
if (c == null)
throw new ArgumentNullException("c");
foreach (string element in c) {
this.Add(element);
}
}
public bool IsFixedSize {
get {
return false;
}
}
public bool IsReadOnly {
get {
return false;
}
}
public string this[int index] {
get {
return getitem(index);
}
set {
setitem(index, value);
}
}
public int Capacity {
get {
return (int)capacity();
}
set {
if (value < size())
throw new ArgumentOutOfRangeException("Capacity");
reserve((uint)value);
}
}
public int Count {
get {
return (int)size();
}
}
public bool IsSynchronized {
get {
return false;
}
}
#if SWIG_DOTNET_1
public void CopyTo(System.Array array)
#else
public void CopyTo(string[] array)
#endif
{
CopyTo(0, array, 0, this.Count);
}
#if SWIG_DOTNET_1
public void CopyTo(System.Array array, int arrayIndex)
#else
public void CopyTo(string[] array, int arrayIndex)
#endif
{
CopyTo(0, array, arrayIndex, this.Count);
}
#if SWIG_DOTNET_1
public void CopyTo(int index, System.Array array, int arrayIndex, int count)
#else
public void CopyTo(int index, string[] array, int arrayIndex, int count)
#endif
{
if (array == null)
throw new ArgumentNullException("array");
if (index < 0)
throw new ArgumentOutOfRangeException("index", "Value is less than zero");
if (arrayIndex < 0)
throw new ArgumentOutOfRangeException("arrayIndex", "Value is less than zero");
if (count < 0)
throw new ArgumentOutOfRangeException("count", "Value is less than zero");
if (array.Rank > 1)
throw new ArgumentException("Multi dimensional array.", "array");
if (index+count > this.Count || arrayIndex+count > array.Length)
throw new ArgumentException("Number of elements to copy is too large.");
for (int i=0; i<count; i++)
array.SetValue(getitemcopy(index+i), arrayIndex+i);
}
#if !SWIG_DOTNET_1
System.Collections.Generic.IEnumerator<string> System.Collections.Generic.IEnumerable<string>.GetEnumerator() {
return new StringVectorEnumerator(this);
}
#endif
System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator() {
return new StringVectorEnumerator(this);
}
public StringVectorEnumerator GetEnumerator() {
return new StringVectorEnumerator(this);
}
// Type-safe enumerator
/// Note that the IEnumerator documentation requires an InvalidOperationException to be thrown
/// whenever the collection is modified. This has been done for changes in the size of the
/// collection but not when one of the elements of the collection is modified as it is a bit
/// tricky to detect unmanaged code that modifies the collection under our feet.
public sealed class StringVectorEnumerator : System.Collections.IEnumerator
#if !SWIG_DOTNET_1
, System.Collections.Generic.IEnumerator<string>
#endif
{
private StringVector collectionRef;
private int currentIndex;
private object currentObject;
private int currentSize;
public StringVectorEnumerator(StringVector collection) {
collectionRef = collection;
currentIndex = -1;
currentObject = null;
currentSize = collectionRef.Count;
}
// Type-safe iterator Current
public string Current {
get {
if (currentIndex == -1)
throw new InvalidOperationException("Enumeration not started.");
if (currentIndex > currentSize - 1)
throw new InvalidOperationException("Enumeration finished.");
if (currentObject == null)
throw new InvalidOperationException("Collection modified.");
return (string)currentObject;
}
}
// Type-unsafe IEnumerator.Current
object System.Collections.IEnumerator.Current {
get {
return Current;
}
}
public bool MoveNext() {
int size = collectionRef.Count;
bool moveOkay = (currentIndex+1 < size) && (size == currentSize);
if (moveOkay) {
currentIndex++;
currentObject = collectionRef[currentIndex];
} else {
currentObject = null;
}
return moveOkay;
}
public void Reset() {
currentIndex = -1;
currentObject = null;
if (collectionRef.Count != currentSize) {
throw new InvalidOperationException("Collection modified.");
}
}
#if !SWIG_DOTNET_1
public void Dispose() {
currentIndex = -1;
currentObject = null;
}
#endif
}
public void Clear() {
cAudioCSharpWrapperPINVOKE.StringVector_Clear(swigCPtr);
}
public void Add(string x) {
cAudioCSharpWrapperPINVOKE.StringVector_Add(swigCPtr, x);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
private uint size() {
uint ret = cAudioCSharpWrapperPINVOKE.StringVector_size(swigCPtr);
return ret;
}
private uint capacity() {
uint ret = cAudioCSharpWrapperPINVOKE.StringVector_capacity(swigCPtr);
return ret;
}
private void reserve(uint n) {
cAudioCSharpWrapperPINVOKE.StringVector_reserve(swigCPtr, n);
}
public StringVector() : this(cAudioCSharpWrapperPINVOKE.new_StringVector__SWIG_0(), true) {
}
public StringVector(StringVector other) : this(cAudioCSharpWrapperPINVOKE.new_StringVector__SWIG_1(StringVector.getCPtr(other)), true) {
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public StringVector(int capacity) : this(cAudioCSharpWrapperPINVOKE.new_StringVector__SWIG_2(capacity), true) {
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
private string getitemcopy(int index) {
string ret = cAudioCSharpWrapperPINVOKE.StringVector_getitemcopy(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private string getitem(int index) {
string ret = cAudioCSharpWrapperPINVOKE.StringVector_getitem(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
private void setitem(int index, string val) {
cAudioCSharpWrapperPINVOKE.StringVector_setitem(swigCPtr, index, val);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void AddRange(StringVector values) {
cAudioCSharpWrapperPINVOKE.StringVector_AddRange(swigCPtr, StringVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public StringVector GetRange(int index, int count) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.StringVector_GetRange(swigCPtr, index, count);
StringVector ret = (cPtr == IntPtr.Zero) ? null : new StringVector(cPtr, true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Insert(int index, string x) {
cAudioCSharpWrapperPINVOKE.StringVector_Insert(swigCPtr, index, x);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void InsertRange(int index, StringVector values) {
cAudioCSharpWrapperPINVOKE.StringVector_InsertRange(swigCPtr, index, StringVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveAt(int index) {
cAudioCSharpWrapperPINVOKE.StringVector_RemoveAt(swigCPtr, index);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void RemoveRange(int index, int count) {
cAudioCSharpWrapperPINVOKE.StringVector_RemoveRange(swigCPtr, index, count);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public static StringVector Repeat(string value, int count) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.StringVector_Repeat(value, count);
StringVector ret = (cPtr == IntPtr.Zero) ? null : new StringVector(cPtr, true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void Reverse() {
cAudioCSharpWrapperPINVOKE.StringVector_Reverse__SWIG_0(swigCPtr);
}
public void Reverse(int index, int count) {
cAudioCSharpWrapperPINVOKE.StringVector_Reverse__SWIG_1(swigCPtr, index, count);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void SetRange(int index, StringVector values) {
cAudioCSharpWrapperPINVOKE.StringVector_SetRange(swigCPtr, index, StringVector.getCPtr(values));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public bool Contains(string value) {
bool ret = cAudioCSharpWrapperPINVOKE.StringVector_Contains(swigCPtr, value);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public int IndexOf(string value) {
int ret = cAudioCSharpWrapperPINVOKE.StringVector_IndexOf(swigCPtr, value);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public int LastIndexOf(string value) {
int ret = cAudioCSharpWrapperPINVOKE.StringVector_LastIndexOf(swigCPtr, value);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public bool Remove(string value) {
bool ret = cAudioCSharpWrapperPINVOKE.StringVector_Remove(swigCPtr, value);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
}

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{4DDC8FD9-BEAF-422E-A28E-093D299F7DEF}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>cAudioCSharp</RootNamespace>
<AssemblyName>cAudioCSharp</AssemblyName>
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Debug\</OutputPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<PlatformTarget>x86</PlatformTarget>
<OutputPath>bin\x86\Release\</OutputPath>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="AudioFormats.cs" />
<Compile Include="cAudioCSharpWrapper.cs" />
<Compile Include="cAudioCSharpWrapperPINVOKE.cs" />
<Compile Include="cVector3.cs" />
<Compile Include="DoubleVector.cs" />
<Compile Include="IAudioCapture.cs" />
<Compile Include="IAudioDecoder.cs" />
<Compile Include="IAudioDecoderFactory.cs" />
<Compile Include="IAudioManager.cs" />
<Compile Include="IAudioPlugin.cs" />
<Compile Include="IAudioSource.cs" />
<Compile Include="ICaptureEventHandler.cs" />
<Compile Include="IDataSource.cs" />
<Compile Include="IDataSourceFactory.cs" />
<Compile Include="IListener.cs" />
<Compile Include="ILogger.cs" />
<Compile Include="ILogReceiver.cs" />
<Compile Include="IManagerEventHandler.cs" />
<Compile Include="IMemoryProvider.cs" />
<Compile Include="IntVector.cs" />
<Compile Include="IRefCounted.cs" />
<Compile Include="ISourceEventHandler.cs" />
<Compile Include="IThread.cs" />
<Compile Include="IThreadWorker.cs" />
<Compile Include="LogLevel.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="StringMap.cs" />
<Compile Include="StringVector.cs" />
<Compile Include="SWIGTYPE_p_AudioFormats.cs" />
<Compile Include="SWIGTYPE_p_cVector3.cs" />
<Compile Include="SWIGTYPE_p_float.cs" />
<Compile Include="SWIGTYPE_p_IAudioCapture.cs" />
<Compile Include="SWIGTYPE_p_IDataSourceFactory.cs" />
<Compile Include="SWIGTYPE_p_IListener.cs" />
<Compile Include="SWIGTYPE_p_ILogger.cs" />
<Compile Include="SWIGTYPE_p_ILogReceiver.cs" />
<Compile Include="SWIGTYPE_p_IManagerEventHandler.cs" />
<Compile Include="SWIGTYPE_p_ISourceEventHandler.cs" />
<Compile Include="SWIGTYPE_p_LogLevel.cs" />
<Compile Include="SWIGTYPE_p_p_char.cs" />
<Compile Include="SWIGTYPE_p_std__basic_stringT_char_t.cs" />
<Compile Include="SWIGTYPE_p_void.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,130 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class cAudioCSharpWrapper {
public static SWIGTYPE_p_p_char LogLevelStrings {
get {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.LogLevelStrings_get();
SWIGTYPE_p_p_char ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_p_char(cPtr, false);
return ret;
}
}
public static IAudioManager createAudioManager(bool initializeDefault) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.createAudioManager__SWIG_0(initializeDefault);
IAudioManager ret = (cPtr == IntPtr.Zero) ? null : new IAudioManager(cPtr, false);
return ret;
}
public static IAudioManager createAudioManager() {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.createAudioManager__SWIG_1();
IAudioManager ret = (cPtr == IntPtr.Zero) ? null : new IAudioManager(cPtr, false);
return ret;
}
public static void destroyAudioManager(IAudioManager manager) {
cAudioCSharpWrapperPINVOKE.destroyAudioManager(IAudioManager.getCPtr(manager));
}
public static SWIGTYPE_p_IAudioCapture createAudioCapture(bool initializeDefault) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.createAudioCapture__SWIG_0(initializeDefault);
SWIGTYPE_p_IAudioCapture ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_IAudioCapture(cPtr, false);
return ret;
}
public static SWIGTYPE_p_IAudioCapture createAudioCapture() {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.createAudioCapture__SWIG_1();
SWIGTYPE_p_IAudioCapture ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_IAudioCapture(cPtr, false);
return ret;
}
public static void destroyAudioCapture(SWIGTYPE_p_IAudioCapture capture) {
cAudioCSharpWrapperPINVOKE.destroyAudioCapture(SWIGTYPE_p_IAudioCapture.getCPtr(capture));
}
public static ILogger getLogger() {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.getLogger();
ILogger ret = (cPtr == IntPtr.Zero) ? null : new ILogger(cPtr, false);
return ret;
}
public static IMemoryProvider getMemoryProvider() {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.getMemoryProvider();
IMemoryProvider ret = (cPtr == IntPtr.Zero) ? null : new IMemoryProvider(cPtr, false);
return ret;
}
public static void cAudioSleep(uint ms) {
cAudioCSharpWrapperPINVOKE.cAudioSleep(ms);
}
public static string toWINSTR(string str) {
string ret = cAudioCSharpWrapperPINVOKE.toWINSTR(str);
return ret;
}
public static string toUTF8(SWIGTYPE_p_std__basic_stringT_char_t str) {
string ret = cAudioCSharpWrapperPINVOKE.toUTF8(SWIGTYPE_p_std__basic_stringT_char_t.getCPtr(str));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public static SWIGTYPE_p_std__basic_stringT_char_t fromUTF8(string str) {
SWIGTYPE_p_std__basic_stringT_char_t ret = new SWIGTYPE_p_std__basic_stringT_char_t(cAudioCSharpWrapperPINVOKE.fromUTF8(str), true);
return ret;
}
public static float Epsilon {
get {
float ret = cAudioCSharpWrapperPINVOKE.Epsilon_get();
return ret;
}
}
public static bool float_equals(float a, float b) {
bool ret = cAudioCSharpWrapperPINVOKE.float_equals(a, b);
return ret;
}
public static SWIGTYPE_p_float new_floatp() {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.new_floatp();
SWIGTYPE_p_float ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
return ret;
}
public static SWIGTYPE_p_float copy_floatp(float value) {
IntPtr cPtr = cAudioCSharpWrapperPINVOKE.copy_floatp(value);
SWIGTYPE_p_float ret = (cPtr == IntPtr.Zero) ? null : new SWIGTYPE_p_float(cPtr, false);
return ret;
}
public static void delete_floatp(SWIGTYPE_p_float self) {
cAudioCSharpWrapperPINVOKE.delete_floatp(SWIGTYPE_p_float.getCPtr(self));
}
public static void floatp_assign(SWIGTYPE_p_float self, float value) {
cAudioCSharpWrapperPINVOKE.floatp_assign(SWIGTYPE_p_float.getCPtr(self), value);
}
public static float floatp_value(SWIGTYPE_p_float self) {
float ret = cAudioCSharpWrapperPINVOKE.floatp_value(SWIGTYPE_p_float.getCPtr(self));
return ret;
}
public static readonly string CAUDIO_VERSION = cAudioCSharpWrapperPINVOKE.CAUDIO_VERSION_get();
public static readonly int CAUDIO_SOURCE_BUFFER_SIZE = cAudioCSharpWrapperPINVOKE.CAUDIO_SOURCE_BUFFER_SIZE_get();
public static readonly int CAUDIO_SOURCE_NUM_BUFFERS = cAudioCSharpWrapperPINVOKE.CAUDIO_SOURCE_NUM_BUFFERS_get();
public static readonly int CAUDIO_SOURCE_MAX_EFFECT_SLOTS = cAudioCSharpWrapperPINVOKE.CAUDIO_SOURCE_MAX_EFFECT_SLOTS_get();
}
}

File diff suppressed because it is too large Load Diff

316
cAudioCSharp/cVector3.cs Normal file
View File

@ -0,0 +1,316 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace cAudio {
using System;
using System.Runtime.InteropServices;
public class cVector3 : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal cVector3(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(cVector3 obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~cVector3() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
cAudioCSharpWrapperPINVOKE.delete_cVector3(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public static bool operator>(cVector3 lhs, cVector3 rhs)
{
return lhs.GreaterThan(rhs);
}
public static bool operator>=(cVector3 lhs, cVector3 rhs)
{
return lhs.GreaterThan(rhs) || lhs.EqualEqual(rhs);
}
public static bool operator<(cVector3 lhs, cVector3 rhs)
{
return lhs.LessThan(rhs);
}
public static bool operator<=(cVector3 lhs, cVector3 rhs)
{
return lhs.LessThan(rhs) || lhs.EqualEqual(rhs);
}
public static cVector3 operator+(cVector3 lhs, cVector3 rhs)
{
return lhs.Plus(rhs);
}
public static cVector3 operator*(cVector3 lhs, cVector3 rhs)
{
return lhs.Multiply(rhs);
}
public static cVector3 operator*(cVector3 lhs, float rhs)
{
return lhs.Multiply(rhs);
}
public static cVector3 operator/(cVector3 lhs, cVector3 rhs)
{
return lhs.Divide(rhs);
}
public static cVector3 operator/(cVector3 lhs, float rhs)
{
return lhs.Divide(rhs);
}
public static cVector3 operator-(cVector3 lhs, cVector3 rhs)
{
return lhs.Minus(rhs);
}
public float x {
set {
cAudioCSharpWrapperPINVOKE.cVector3_x_set(swigCPtr, value);
}
get {
float ret = cAudioCSharpWrapperPINVOKE.cVector3_x_get(swigCPtr);
return ret;
}
}
public float y {
set {
cAudioCSharpWrapperPINVOKE.cVector3_y_set(swigCPtr, value);
}
get {
float ret = cAudioCSharpWrapperPINVOKE.cVector3_y_get(swigCPtr);
return ret;
}
}
public float z {
set {
cAudioCSharpWrapperPINVOKE.cVector3_z_set(swigCPtr, value);
}
get {
float ret = cAudioCSharpWrapperPINVOKE.cVector3_z_get(swigCPtr);
return ret;
}
}
public cVector3() : this(cAudioCSharpWrapperPINVOKE.new_cVector3__SWIG_0(), true) {
}
public cVector3(float nx, float ny, float nz) : this(cAudioCSharpWrapperPINVOKE.new_cVector3__SWIG_1(nx, ny, nz), true) {
}
public cVector3(float n) : this(cAudioCSharpWrapperPINVOKE.new_cVector3__SWIG_2(n), true) {
}
public cVector3(cVector3 other) : this(cAudioCSharpWrapperPINVOKE.new_cVector3__SWIG_3(cVector3.getCPtr(other)), true) {
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public cVector3(SWIGTYPE_p_float vector) : this(cAudioCSharpWrapperPINVOKE.new_cVector3__SWIG_4(SWIGTYPE_p_float.getCPtr(vector)), true) {
}
public cVector3 Minus() {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Minus__SWIG_0(swigCPtr), true);
return ret;
}
public cVector3 Equal(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Equal(swigCPtr, cVector3.getCPtr(other)), false);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 Plus(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Plus__SWIG_0(swigCPtr, cVector3.getCPtr(other)), true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 PlusEqual(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_PlusEqual__SWIG_0(swigCPtr, cVector3.getCPtr(other)), false);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 Plus(float val) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Plus__SWIG_1(swigCPtr, val), true);
return ret;
}
public cVector3 PlusEqual(float val) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_PlusEqual__SWIG_1(swigCPtr, val), false);
return ret;
}
public cVector3 Minus(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Minus__SWIG_1(swigCPtr, cVector3.getCPtr(other)), true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 MinusEqual(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_MinusEqual__SWIG_0(swigCPtr, cVector3.getCPtr(other)), false);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 Minus(float val) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Minus__SWIG_2(swigCPtr, val), true);
return ret;
}
public cVector3 MinusEqual(float val) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_MinusEqual__SWIG_1(swigCPtr, val), false);
return ret;
}
public cVector3 Multiply(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Multiply__SWIG_0(swigCPtr, cVector3.getCPtr(other)), true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 MultiplyEqual(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_MultiplyEqual__SWIG_0(swigCPtr, cVector3.getCPtr(other)), false);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 Multiply(float v) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Multiply__SWIG_1(swigCPtr, v), true);
return ret;
}
public cVector3 MultiplyEqual(float v) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_MultiplyEqual__SWIG_1(swigCPtr, v), false);
return ret;
}
public cVector3 Divide(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Divide__SWIG_0(swigCPtr, cVector3.getCPtr(other)), true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 DivideEqual(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_DivideEqual__SWIG_0(swigCPtr, cVector3.getCPtr(other)), false);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 Divide(float v) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_Divide__SWIG_1(swigCPtr, v), true);
return ret;
}
public cVector3 DivideEqual(float v) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_DivideEqual__SWIG_1(swigCPtr, v), false);
return ret;
}
public bool LessThanEqual(cVector3 other) {
bool ret = cAudioCSharpWrapperPINVOKE.cVector3_LessThanEqual(swigCPtr, cVector3.getCPtr(other));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public bool GreaterThanEqual(cVector3 other) {
bool ret = cAudioCSharpWrapperPINVOKE.cVector3_GreaterThanEqual(swigCPtr, cVector3.getCPtr(other));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public bool LessThan(cVector3 other) {
bool ret = cAudioCSharpWrapperPINVOKE.cVector3_LessThan(swigCPtr, cVector3.getCPtr(other));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public bool GreaterThan(cVector3 other) {
bool ret = cAudioCSharpWrapperPINVOKE.cVector3_GreaterThan(swigCPtr, cVector3.getCPtr(other));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public bool EqualEqual(cVector3 other) {
bool ret = cAudioCSharpWrapperPINVOKE.cVector3_EqualEqual(swigCPtr, cVector3.getCPtr(other));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public bool NotEqual(cVector3 other) {
bool ret = cAudioCSharpWrapperPINVOKE.cVector3_NotEqual(swigCPtr, cVector3.getCPtr(other));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public float length() {
float ret = cAudioCSharpWrapperPINVOKE.cVector3_length(swigCPtr);
return ret;
}
public void normalize() {
cAudioCSharpWrapperPINVOKE.cVector3_normalize(swigCPtr);
}
public float dot(cVector3 other) {
float ret = cAudioCSharpWrapperPINVOKE.cVector3_dot(swigCPtr, cVector3.getCPtr(other));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public cVector3 cross(cVector3 other) {
cVector3 ret = new cVector3(cAudioCSharpWrapperPINVOKE.cVector3_cross(swigCPtr, cVector3.getCPtr(other)), true);
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public void set(float nx, float ny, float nz) {
cAudioCSharpWrapperPINVOKE.cVector3_set__SWIG_0(swigCPtr, nx, ny, nz);
}
public void set(float n) {
cAudioCSharpWrapperPINVOKE.cVector3_set__SWIG_1(swigCPtr, n);
}
public void set(cVector3 other) {
cAudioCSharpWrapperPINVOKE.cVector3_set__SWIG_2(swigCPtr, cVector3.getCPtr(other));
if (cAudioCSharpWrapperPINVOKE.SWIGPendingException.Pending) throw cAudioCSharpWrapperPINVOKE.SWIGPendingException.Retrieve();
}
public void getAsArray(SWIGTYPE_p_float output) {
cAudioCSharpWrapperPINVOKE.cVector3_getAsArray(swigCPtr, SWIGTYPE_p_float.getCPtr(output));
}
}
}

View File

@ -0,0 +1,12 @@
PROJECT(cAudioCSharpWrapper)
set(CMAKE_DEBUG_POSTFIX)
include_directories (include ${CAUDIO_INCLUDE_DIR})
include (cAudioCSharpWrapper_src_files.cmake)
add_library(cAudioCSharpWrapper SHARED ${file_root})
target_link_libraries(cAudioCSharpWrapper cAudio)
add_dependencies(cAudioCSharpWrapper cAudio)
install_all_targets(cAudioCSharpWrapper)

View File

@ -0,0 +1,3 @@
echo Invoking SWIG...
del "..\cAudioCSharp\*.cs"
%SWIG_PATH%\swig.exe -outdir "..\cAudioCSharp" -namespace cAudio -c++ -csharp "%CD%/src/cAudioWrapped.i"

View File

@ -0,0 +1,15 @@
set (file_root_source_files
src/cAudioWrapped_wrap.cxx
)
set (file_root_header_files
src/cAudioWrapped_wrap.h
)
source_group("Source Files" FILES ${file_root_source_files})
source_group("Header Files" FILES ${file_root_header_files})
set (file_root
${file_root_source_files}
${file_root_header_files}
)

View File

@ -0,0 +1,181 @@
%module(directors="1") cAudioCSharpWrapper
%include "std_string.i"
%include "std_vector.i"
%include "std_map.i"
%include "cpointer.i"
#define CAUDIO_API
%{
#include "IRefCounted.h"
#include "EAudioFormats.h"
#include "IAudioEffects.h"
#include "IAudioManager.h"
#include "IAudioPlugin.h"
#include "IAudioSource.h"
#include "ICaptureEventHandler.h"
#include "IDataSource.h"
#include "IDataSourceFactory.h"
#include "IEffect.h"
#include "IEffectParameters.h"
#include "IFilter.h"
#include "IListener.h"
#include "ILogger.h"
#include "ILogReceiver.h"
#include "IManagerEventHandler.h"
#include "IMemoryProvider.h"
#include "IPluginManager.h"
#include "ISourceEventHandler.h"
#include "IThread.h"
#include "cAudio.h"
#include "cAudioDefines.h"
#include "cAudioMemory.h"
#include "cAudioPlatform.h"
#include "cAudioSleep.h"
#include "cAudioString.h"
#include "cSTLAllocator.h"
#include "cVector3.h"
#include "IAudioCapture.h"
#include "IAudioDecoder.h"
#include "IAudioDecoderFactory.h"
%}
#if !defined(SWIGLUA) && !defined(SWIGR)
%rename(Equal) operator =;
%rename(PlusEqual) operator +=;
%rename(MinusEqual) operator -=;
%rename(MultiplyEqual) operator *=;
%rename(DivideEqual) operator /=;
%rename(PercentEqual) operator %=;
%rename(Plus) operator +;
%rename(Minus) operator -;
%rename(Multiply) operator *;
%rename(Divide) operator /;
%rename(Percent) operator %;
%rename(Not) operator !;
%rename(IndexIntoConst) operator[](size_t) const;
%rename(IndexIntoConstConst) operator [] ( const size_t ) const;
%rename(IndexInto) operator[](size_t);
%rename(Functor) operator ();
%rename(EqualEqual) operator ==;
%rename(NotEqual) operator !=;
%rename(LessThan) operator <;
%rename(LessThanEqual) operator <=;
%rename(GreaterThan) operator >;
%rename(GreaterThanEqual) operator >=;
%rename(And) operator &&;
%rename(Or) operator ||;
%rename(PlusPlusPrefix) operator++();
%rename(PlusPlusPostfix) operator++(int);
%rename(MinusMinusPrefix) operator--();
%rename(MinusMinusPostfix) operator--(int);
%rename(WriteIntoOp) operator <<;
%rename(WriteToOp) operator >>;
%rename(ToRadian) operator Radian() const;
%rename(ToDegree) operator Degree() const;
#endif
%typemap(cscode) cAudio::cVector3 %{
public static bool operator>(cVector3 lhs, cVector3 rhs)
{
return lhs.GreaterThan(rhs);
}
public static bool operator>=(cVector3 lhs, cVector3 rhs)
{
return lhs.GreaterThan(rhs) || lhs.EqualEqual(rhs);
}
public static bool operator<(cVector3 lhs, cVector3 rhs)
{
return lhs.LessThan(rhs);
}
public static bool operator<=(cVector3 lhs, cVector3 rhs)
{
return lhs.LessThan(rhs) || lhs.EqualEqual(rhs);
}
public static cVector3 operator+(cVector3 lhs, cVector3 rhs)
{
return lhs.Plus(rhs);
}
public static cVector3 operator*(cVector3 lhs, cVector3 rhs)
{
return lhs.Multiply(rhs);
}
public static cVector3 operator*(cVector3 lhs, float rhs)
{
return lhs.Multiply(rhs);
}
public static cVector3 operator/(cVector3 lhs, cVector3 rhs)
{
return lhs.Divide(rhs);
}
public static cVector3 operator/(cVector3 lhs, float rhs)
{
return lhs.Divide(rhs);
}
public static cVector3 operator-(cVector3 lhs, cVector3 rhs)
{
return lhs.Minus(rhs);
}
%}
%feature("director") cAudio::ILogReceiver;
%feature("director") cAudio::ISourceEventHandler;
%feature("director") cAudio::ICaptureEventHandler;
%feature("director") cAudio::IDataSource;
%feature("director") cAudio::IDataSourceFactory;
%feature("director") cAudio::IManagerEventHandler;
%feature("director") cAudio::IAudioDecoderFactory;
%feature("director") cAudio::IAudioDecoder;
%include "..\cAudio\include\IRefCounted.h"
%include "..\cAudio\include\IAudioEffects.h"
%include "..\cAudio\include\IAudioManager.h"
%include "..\cAudio\include\IAudioPlugin.h"
%include "..\cAudio\include\IAudioSource.h"
%include "..\cAudio\include\ICaptureEventHandler.h"
%include "..\cAudio\include\IDataSource.h"
%include "..\cAudio\include\IDataSourceFactory.h"
%include "..\cAudio\include\IEffect.h"
%include "..\cAudio\include\IEffectParameters.h"
%include "..\cAudio\include\IFilter.h"
%include "..\cAudio\include\IListener.h"
%include "..\cAudio\include\ILogger.h"
%include "..\cAudio\include\ILogReceiver.h"
%include "..\cAudio\include\IManagerEventHandler.h"
%include "..\cAudio\include\IMemoryProvider.h"
%include "..\cAudio\include\IPluginManager.h"
%include "..\cAudio\include\ISourceEventHandler.h"
%include "..\cAudio\include\IThread.h"
%include "..\cAudio\include\cAudio.h"
%include "..\cAudio\include\cAudioDefines.h"
%include "..\cAudio\include\cAudioMemory.h"
%include "..\cAudio\include\cAudioPlatform.h"
%include "..\cAudio\include\cAudioSleep.h"
%include "..\cAudio\include\cAudioString.h"
%include "..\cAudio\include\cVector3.h"
%include "..\cAudio\include\EAudioFormats.h"
%include "..\cAudio\include\IAudioCapture.h"
%include "..\cAudio\include\IAudioDecoder.h"
%include "..\cAudio\include\IAudioDecoderFactory.h"
namespace std {
%template(IntVector) vector<int>;
%template(DoubleVector) vector<double>;
%template(StringVector) vector<std::string>;
%template(StringMap) map<std::string, std::string>;
};
%pointer_functions(float, floatp);

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,221 @@
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 2.0.1
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
* changes to this file unless you know what you are doing--modify the SWIG
* interface file instead.
* ----------------------------------------------------------------------------- */
#ifndef SWIG_cAudioCSharpWrapper_WRAP_H_
#define SWIG_cAudioCSharpWrapper_WRAP_H_
class SwigDirector_ICaptureEventHandler : public cAudio::ICaptureEventHandler, public Swig::Director {
public:
SwigDirector_ICaptureEventHandler();
virtual void onInit();
virtual void onUpdate();
virtual void onRelease();
virtual void onBeginCapture();
virtual void onEndCapture();
virtual void onUserRequestBuffer();
typedef void (SWIGSTDCALL* SWIG_Callback0_t)();
typedef void (SWIGSTDCALL* SWIG_Callback1_t)();
typedef void (SWIGSTDCALL* SWIG_Callback2_t)();
typedef void (SWIGSTDCALL* SWIG_Callback3_t)();
typedef void (SWIGSTDCALL* SWIG_Callback4_t)();
typedef void (SWIGSTDCALL* SWIG_Callback5_t)();
void swig_connect_director(SWIG_Callback0_t callbackonInit, SWIG_Callback1_t callbackonUpdate, SWIG_Callback2_t callbackonRelease, SWIG_Callback3_t callbackonBeginCapture, SWIG_Callback4_t callbackonEndCapture, SWIG_Callback5_t callbackonUserRequestBuffer);
private:
SWIG_Callback0_t swig_callbackonInit;
SWIG_Callback1_t swig_callbackonUpdate;
SWIG_Callback2_t swig_callbackonRelease;
SWIG_Callback3_t swig_callbackonBeginCapture;
SWIG_Callback4_t swig_callbackonEndCapture;
SWIG_Callback5_t swig_callbackonUserRequestBuffer;
void swig_init_callbacks();
};
class SwigDirector_IDataSource : public cAudio::IDataSource, public Swig::Director {
public:
SwigDirector_IDataSource();
virtual ~SwigDirector_IDataSource();
virtual bool isValid();
virtual int getCurrentPos();
virtual int getSize();
virtual int read(void *output, int size);
virtual bool seek(int amount, bool relative);
typedef unsigned int (SWIGSTDCALL* SWIG_Callback0_t)();
typedef int (SWIGSTDCALL* SWIG_Callback1_t)();
typedef int (SWIGSTDCALL* SWIG_Callback2_t)();
typedef int (SWIGSTDCALL* SWIG_Callback3_t)(void *, int);
typedef unsigned int (SWIGSTDCALL* SWIG_Callback4_t)(int, unsigned int);
void swig_connect_director(SWIG_Callback0_t callbackisValid, SWIG_Callback1_t callbackgetCurrentPos, SWIG_Callback2_t callbackgetSize, SWIG_Callback3_t callbackread, SWIG_Callback4_t callbackseek);
private:
SWIG_Callback0_t swig_callbackisValid;
SWIG_Callback1_t swig_callbackgetCurrentPos;
SWIG_Callback2_t swig_callbackgetSize;
SWIG_Callback3_t swig_callbackread;
SWIG_Callback4_t swig_callbackseek;
void swig_init_callbacks();
};
class SwigDirector_IDataSourceFactory : public cAudio::IDataSourceFactory, public Swig::Director {
public:
SwigDirector_IDataSourceFactory();
virtual ~SwigDirector_IDataSourceFactory();
virtual cAudio::IDataSource *CreateDataSource(char const *filename, bool streamingRequested);
typedef void * (SWIGSTDCALL* SWIG_Callback0_t)(char *, unsigned int);
void swig_connect_director(SWIG_Callback0_t callbackCreateDataSource);
private:
SWIG_Callback0_t swig_callbackCreateDataSource;
void swig_init_callbacks();
};
class SwigDirector_ILogReceiver : public cAudio::ILogReceiver, public Swig::Director {
public:
SwigDirector_ILogReceiver();
virtual bool OnLogMessage(char const *sender, char const *message, cAudio::LogLevel level, float time);
typedef unsigned int (SWIGSTDCALL* SWIG_Callback0_t)(char *, char *, int, float);
void swig_connect_director(SWIG_Callback0_t callbackOnLogMessage);
private:
SWIG_Callback0_t swig_callbackOnLogMessage;
void swig_init_callbacks();
};
class SwigDirector_IManagerEventHandler : public cAudio::IManagerEventHandler, public Swig::Director {
public:
SwigDirector_IManagerEventHandler();
virtual void onInit();
virtual void onUpdate();
virtual void onRelease();
virtual void onSourceCreate();
virtual void onDecoderRegister();
virtual void onDataSourceRegister();
typedef void (SWIGSTDCALL* SWIG_Callback0_t)();
typedef void (SWIGSTDCALL* SWIG_Callback1_t)();
typedef void (SWIGSTDCALL* SWIG_Callback2_t)();
typedef void (SWIGSTDCALL* SWIG_Callback3_t)();
typedef void (SWIGSTDCALL* SWIG_Callback4_t)();
typedef void (SWIGSTDCALL* SWIG_Callback5_t)();
void swig_connect_director(SWIG_Callback0_t callbackonInit, SWIG_Callback1_t callbackonUpdate, SWIG_Callback2_t callbackonRelease, SWIG_Callback3_t callbackonSourceCreate, SWIG_Callback4_t callbackonDecoderRegister, SWIG_Callback5_t callbackonDataSourceRegister);
private:
SWIG_Callback0_t swig_callbackonInit;
SWIG_Callback1_t swig_callbackonUpdate;
SWIG_Callback2_t swig_callbackonRelease;
SWIG_Callback3_t swig_callbackonSourceCreate;
SWIG_Callback4_t swig_callbackonDecoderRegister;
SWIG_Callback5_t swig_callbackonDataSourceRegister;
void swig_init_callbacks();
};
class SwigDirector_ISourceEventHandler : public cAudio::ISourceEventHandler, public Swig::Director {
public:
SwigDirector_ISourceEventHandler();
virtual void onUpdate();
virtual void onRelease();
virtual void onPlay();
virtual void onStop();
virtual void onPause();
typedef void (SWIGSTDCALL* SWIG_Callback0_t)();
typedef void (SWIGSTDCALL* SWIG_Callback1_t)();
typedef void (SWIGSTDCALL* SWIG_Callback2_t)();
typedef void (SWIGSTDCALL* SWIG_Callback3_t)();
typedef void (SWIGSTDCALL* SWIG_Callback4_t)();
void swig_connect_director(SWIG_Callback0_t callbackonUpdate, SWIG_Callback1_t callbackonRelease, SWIG_Callback2_t callbackonPlay, SWIG_Callback3_t callbackonStop, SWIG_Callback4_t callbackonPause);
private:
SWIG_Callback0_t swig_callbackonUpdate;
SWIG_Callback1_t swig_callbackonRelease;
SWIG_Callback2_t swig_callbackonPlay;
SWIG_Callback3_t swig_callbackonStop;
SWIG_Callback4_t swig_callbackonPause;
void swig_init_callbacks();
};
class SwigDirector_IAudioDecoder : public cAudio::IAudioDecoder, public Swig::Director {
public:
SwigDirector_IAudioDecoder(cAudio::IDataSource *stream);
virtual ~SwigDirector_IAudioDecoder();
virtual cAudio::AudioFormats getFormat();
virtual int getFrequency();
virtual bool isSeekingSupported();
virtual bool isValid();
virtual int readAudioData(void *output, int amount);
virtual bool setPosition(int position, bool relative);
virtual bool seek(float seconds, bool relative);
virtual float getTotalTime();
virtual int getTotalSize();
virtual int getCompressedSize();
virtual float getCurrentTime();
virtual int getCurrentPosition();
virtual int getCurrentCompressedPosition();
typedef int (SWIGSTDCALL* SWIG_Callback0_t)();
typedef int (SWIGSTDCALL* SWIG_Callback1_t)();
typedef unsigned int (SWIGSTDCALL* SWIG_Callback2_t)();
typedef unsigned int (SWIGSTDCALL* SWIG_Callback3_t)();
typedef int (SWIGSTDCALL* SWIG_Callback4_t)(void *, int);
typedef unsigned int (SWIGSTDCALL* SWIG_Callback5_t)(int, unsigned int);
typedef unsigned int (SWIGSTDCALL* SWIG_Callback6_t)(float, unsigned int);
typedef float (SWIGSTDCALL* SWIG_Callback7_t)();
typedef int (SWIGSTDCALL* SWIG_Callback8_t)();
typedef int (SWIGSTDCALL* SWIG_Callback9_t)();
typedef float (SWIGSTDCALL* SWIG_Callback10_t)();
typedef int (SWIGSTDCALL* SWIG_Callback11_t)();
typedef int (SWIGSTDCALL* SWIG_Callback12_t)();
void swig_connect_director(SWIG_Callback0_t callbackgetFormat, SWIG_Callback1_t callbackgetFrequency, SWIG_Callback2_t callbackisSeekingSupported, SWIG_Callback3_t callbackisValid, SWIG_Callback4_t callbackreadAudioData, SWIG_Callback5_t callbacksetPosition, SWIG_Callback6_t callbackseek, SWIG_Callback7_t callbackgetTotalTime, SWIG_Callback8_t callbackgetTotalSize, SWIG_Callback9_t callbackgetCompressedSize, SWIG_Callback10_t callbackgetCurrentTime, SWIG_Callback11_t callbackgetCurrentPosition, SWIG_Callback12_t callbackgetCurrentCompressedPosition);
private:
SWIG_Callback0_t swig_callbackgetFormat;
SWIG_Callback1_t swig_callbackgetFrequency;
SWIG_Callback2_t swig_callbackisSeekingSupported;
SWIG_Callback3_t swig_callbackisValid;
SWIG_Callback4_t swig_callbackreadAudioData;
SWIG_Callback5_t swig_callbacksetPosition;
SWIG_Callback6_t swig_callbackseek;
SWIG_Callback7_t swig_callbackgetTotalTime;
SWIG_Callback8_t swig_callbackgetTotalSize;
SWIG_Callback9_t swig_callbackgetCompressedSize;
SWIG_Callback10_t swig_callbackgetCurrentTime;
SWIG_Callback11_t swig_callbackgetCurrentPosition;
SWIG_Callback12_t swig_callbackgetCurrentCompressedPosition;
void swig_init_callbacks();
};
class SwigDirector_IAudioDecoderFactory : public cAudio::IAudioDecoderFactory, public Swig::Director {
public:
SwigDirector_IAudioDecoderFactory();
virtual ~SwigDirector_IAudioDecoderFactory();
virtual cAudio::IAudioDecoder *CreateAudioDecoder(cAudio::IDataSource *stream);
typedef void * (SWIGSTDCALL* SWIG_Callback0_t)(void *);
void swig_connect_director(SWIG_Callback0_t callbackCreateAudioDecoder);
private:
SWIG_Callback0_t swig_callbackCreateAudioDecoder;
void swig_init_callbacks();
};
#endif