Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
[FilterDemoApp] Update sample code:
Browse files Browse the repository at this point in the history
* Set TLS providers to Default
* Set HttpClient providers to HttpClientHandler
* Use AUViewController as a base class for FilterDemoViewController
  • Loading branch information
olegoid committed May 24, 2016
1 parent b30eb27 commit e109069
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
7 changes: 4 additions & 3 deletions ios9/FilterDemoApp/AUv3Host/AUv3Host.csproj
Expand Up @@ -27,11 +27,11 @@
<MtouchDebug>true</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchProfiling>true</MtouchProfiling>
<MtouchExtraArgs>--registrar=static</MtouchExtraArgs>
<MtouchExtraArgs></MtouchExtraArgs>
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchHttpClientHandler>CFNetworkHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>AppleTLS</MtouchTlsProvider>
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
Expand Down Expand Up @@ -84,6 +84,7 @@
<IpaPackageName>
</IpaPackageName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchLink>None</MtouchLink>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
9 changes: 6 additions & 3 deletions ios9/FilterDemoApp/FilterDemoApp/FilterDemoApp.csproj
Expand Up @@ -23,12 +23,14 @@
<MtouchLink>None</MtouchLink>
<MtouchUseRefCounting>true</MtouchUseRefCounting>
<MtouchUseSGen>true</MtouchUseSGen>
<MtouchFastDev>true</MtouchFastDev>
<MtouchFastDev>false</MtouchFastDev>
<MtouchDebug>true</MtouchDebug>
<CodesignKey>iPhone Developer</CodesignKey>
<MtouchProfiling>false</MtouchProfiling>
<MtouchFloat32>true</MtouchFloat32>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchExtraArgs></MtouchExtraArgs>
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<DebugType>full</DebugType>
Expand Down Expand Up @@ -80,8 +82,9 @@
<IpaPackageName>
</IpaPackageName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>AppleTLS</MtouchTlsProvider>
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<MtouchLink>None</MtouchLink>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
Expand Down
Expand Up @@ -29,8 +29,9 @@
<MtouchArch>i386</MtouchArch>
<DeviceSpecificBuild>false</DeviceSpecificBuild>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<MtouchHttpClientHandler>NSUrlSessionHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>AppleTLS</MtouchTlsProvider>
<MtouchHttpClientHandler>HttpClientHandler</MtouchHttpClientHandler>
<MtouchTlsProvider>Default</MtouchTlsProvider>
<MtouchNoSymbolStrip>true</MtouchNoSymbolStrip>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|iPhone' ">
<Optimize>true</Optimize>
Expand Down
13 changes: 10 additions & 3 deletions ios9/FilterDemoApp/Framework/FilterDemoViewController.cs
@@ -1,12 +1,13 @@
using System;

using AudioUnit;
using CoreAudioKit;
using CoreFoundation;
using Foundation;
using UIKit;
using ObjCRuntime;

namespace FilterDemoFramework {
public partial class FilterDemoViewController : UIViewController, IFilterViewDelegate, IAUAudioUnitFactory {
public partial class FilterDemoViewController : AUViewController, IFilterViewDelegate, IAUAudioUnitFactory {
static readonly NSString cutoffKey = (NSString)"cutoff";
static readonly NSString resonanceKey = (NSString)"resonance";

Expand All @@ -28,7 +29,13 @@ public partial class FilterDemoViewController : UIViewController, IFilterViewDel
}
}

public FilterDemoViewController (IntPtr handle) : base (handle)
[Export("initWithCoder:")]
public FilterDemoViewController (NSCoder coder) : base(coder)
{
}

[Export ("initWithNibName:bundle:")]
public FilterDemoViewController (string nibName, NSBundle bundle) : base (nibName, bundle)
{
}

Expand Down
2 changes: 1 addition & 1 deletion ios9/FilterDemoApp/Framework/SimplePlayEngine.cs
Expand Up @@ -179,7 +179,7 @@ public void SelectEffectWithComponentDescription (AudioComponentDescription? com
PresetList = new AUAudioUnitPreset[0];
}

if (componentDescription != null) {
if (componentDescription.HasValue) {
AVAudioUnit.FromComponentDescription (componentDescription.Value, AudioComponentInstantiationOptions.OutOfProcess, (avAudioUnitEffect, AVError) => {
if (AVError != null || avAudioUnitEffect == null) {
Console.WriteLine ("SelectEffectWithComponentDescription error!");
Expand Down

0 comments on commit e109069

Please sign in to comment.