Initial release
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
/DerivedData
|
||||
/build
|
||||
@@ -0,0 +1,102 @@
|
||||
|
||||
# iOS target
|
||||
if(SMTG_MAC AND SMTG_BUILD_INTERAPPAUDIO)
|
||||
if(XCODE AND SMTG_ENABLE_IOS_TARGETS)
|
||||
set(target noteexpressionsynth_iaa_ios)
|
||||
set(${target}_xib_resources
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/InterAppAudio/Images.xcassets
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/InterAppAudio/LaunchScreen.storyboard
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/InterAppAudio/noteexpressionsynth_ios.entitlements
|
||||
${SDK_ROOT}/public.sdk/source/vst/interappaudio/PresetBrowserView.xib
|
||||
${SDK_ROOT}/public.sdk/source/vst/interappaudio/PresetSaveView.xib
|
||||
${SDK_ROOT}/public.sdk/source/vst/interappaudio/SettingsView.xib
|
||||
InterAppAudioExample/VSTInterAppAudioHostUIControllerView.xib
|
||||
)
|
||||
set(${target}_sources
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/brownnoise.h
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/factory.cpp
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/filter.h
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_controller.cpp
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_controller.h
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_processor.cpp
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_processor.h
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_ui.cpp
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_ui.h
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_voice.cpp
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_expression_synth_voice.h
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_touch_controller.cpp
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/note_touch_controller.h
|
||||
${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/source/version.h
|
||||
${SDK_ROOT}/public.sdk/source/main/macmain.cpp
|
||||
${SDK_ROOT}/public.sdk/source/vst/auwrapper/NSDataIBStream.mm
|
||||
${SDK_ROOT}/public.sdk/source/vst/hosting/eventlist.cpp
|
||||
${SDK_ROOT}/public.sdk/source/vst/hosting/hostclasses.cpp
|
||||
${SDK_ROOT}/public.sdk/source/vst/hosting/parameterchanges.cpp
|
||||
${SDK_ROOT}/public.sdk/source/vst/hosting/pluginterfacesupport.cpp
|
||||
${SDK_ROOT}/public.sdk/source/vst/hosting/processdata.cpp
|
||||
${SDK_ROOT}/public.sdk/source/vst/vstguieditor.cpp
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/contrib/keyboardview.cpp
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/contrib/keyboardview.h
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/plugin-bindings/vst3editor.cpp
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/plugin-bindings/vst3editor.h
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/plugin-bindings/vst3groupcontroller.cpp
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/plugin-bindings/vst3groupcontroller.h
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/plugin-bindings/vst3padcontroller.cpp
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/plugin-bindings/vst3padcontroller.h
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/vstgui_ios.mm
|
||||
${VSTGUI_ROOT}/vstgui4/vstgui/vstgui_uidescription.cpp
|
||||
InterAppAudioExample/VSTInterAppAudioAppDelegate.mm
|
||||
InterAppAudioExample/VSTInterAppAudioHostUIControllerViewController.mm
|
||||
InterAppAudioExample/main.m
|
||||
)
|
||||
set(prefix_header ${SDK_ROOT}/public.sdk/samples/vst/InterAppAudio/InterAppAudioExample/InterAppAudioExample-Prefix.pch)
|
||||
add_executable(${target} ${${target}_sources} ${${target}_xib_resources})
|
||||
smtg_target_set_platform_ios(${target})
|
||||
target_compile_options(${target}
|
||||
PUBLIC
|
||||
-DVSTGUI_LIVE_EDITING=0
|
||||
) # NO VSTGUI LIVE EDITING SUPPORT FOR iOS
|
||||
set_target_properties(${target}
|
||||
PROPERTIES
|
||||
${SDK_IDE_PLUGIN_EXAMPLES_FOLDER}
|
||||
)
|
||||
set_target_properties(${target}
|
||||
PROPERTIES
|
||||
BUNDLE TRUE
|
||||
RESOURCE "${${target}_xib_resources}"
|
||||
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon"
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_LIST_DIR}/../note_expression_synth/resource/InterAppAudio/noteexpressionsynth_ios.entitlements"
|
||||
XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "${SMTG_CODE_SIGN_IDENTITY_IOS}"
|
||||
XCODE_ATTRIBUTE_ENABLE_BITCODE "NO" # prevent warning
|
||||
XCODE_ATTRIBUTE_GCC_PREFIX_HEADER ${prefix_header}
|
||||
XCODE_ATTRIBUTE_GENERATE_PKGINFO_FILE "YES"
|
||||
XCODE_ATTRIBUTE_DEVELOPMENT_TEAM ${SMTG_IOS_DEVELOPMENT_TEAM}
|
||||
)
|
||||
target_link_libraries(${target}
|
||||
PRIVATE
|
||||
interappaudio
|
||||
"-framework QuartzCore"
|
||||
"-framework MobileCoreServices"
|
||||
"-framework Accelerate"
|
||||
"-framework ImageIO"
|
||||
"-framework GLKit"
|
||||
"-framework CoreText"
|
||||
)
|
||||
smtg_target_set_bundle(${target} INFOPLIST "${CMAKE_CURRENT_LIST_DIR}/../note_expression_synth/resource/InterAppAudio/NoteExpressionSynthExample.plist" PREPROCESS)
|
||||
target_include_directories(${target}
|
||||
PUBLIC
|
||||
${ROOT}/vstgui4
|
||||
)
|
||||
|
||||
smtg_target_add_vst3_resource(${target} "${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/about.png")
|
||||
smtg_target_add_vst3_resource(${target} "${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/background.png")
|
||||
smtg_target_add_vst3_resource(${target} "${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/groupframe.png")
|
||||
smtg_target_add_vst3_resource(${target} "${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/knob big.png")
|
||||
smtg_target_add_vst3_resource(${target} "${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/knob.png")
|
||||
smtg_target_add_vst3_resource(${target} "${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/knob2.png")
|
||||
smtg_target_add_vst3_resource(${target} "${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/note_expression_synth.uidesc")
|
||||
smtg_target_add_vst3_resource(${target} "${SDK_ROOT}/public.sdk/samples/vst/note_expression_synth/resource/vst3_logo_small.png")
|
||||
else()
|
||||
message("[SMTG] * To enable building the InterAppAudio NoteExpressionSynth example for iOS you need to set the SMTG_IOS_DEVELOPMENT_TEAM and use the Xcode generator")
|
||||
endif(XCODE AND SMTG_ENABLE_IOS_TARGETS)
|
||||
endif(SMTG_MAC AND SMTG_BUILD_INTERAPPAUDIO)
|
||||
Vendored
+65
@@ -0,0 +1,65 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AudioComponents</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>manufacturer</key>
|
||||
<string>SMTG</string>
|
||||
<key>name</key>
|
||||
<string>ADelay VST3</string>
|
||||
<key>subtype</key>
|
||||
<string>adly</string>
|
||||
<key>type</key>
|
||||
<string>aurx</string>
|
||||
<key>version</key>
|
||||
<integer>1</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.steinberg.interappaudioexamples.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PRODUCT_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UIBackgroundModes</key>
|
||||
<array>
|
||||
<string>audio</string>
|
||||
</array>
|
||||
<key>UIRequiredDeviceCapabilities</key>
|
||||
<array>
|
||||
<string>armv7</string>
|
||||
</array>
|
||||
<key>UIStatusBarHidden</key>
|
||||
<true/>
|
||||
<key>UIStatusBarHidden~ipad</key>
|
||||
<true/>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/interappaudio/InterAppAudioExample/InterAppAudioExample-Prefix.pch
|
||||
// Created by : Steinberg, 08/2013
|
||||
// Description :
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import <Availability.h>
|
||||
|
||||
#ifndef __IPHONE_3_0
|
||||
#warning "This project uses features only available in iOS SDK 3.0 and later."
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <UIKit/UIKit.h>
|
||||
#import <Foundation/Foundation.h>
|
||||
#endif
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>inter-app-audio</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
// clang-format off
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/interappaudio/InterAppAudioExample/VSTInterAppAudioAppDelegate.h
|
||||
// Created by : Steinberg, 08/2013
|
||||
// Description :
|
||||
// Flags : clang-format SMTGSequencer
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
// clang-format on
|
||||
|
||||
#import "public.sdk/source/vst/interappaudio/VSTInterAppAudioAppDelegateBase.h"
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@interface VSTInterAppAudioAppDelegate : VSTInterAppAudioAppDelegateBase
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
@end
|
||||
+119
@@ -0,0 +1,119 @@
|
||||
// clang-format off
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/interappaudio/InterAppAudioExample/VSTInterAppAudioAppDelegate.mm
|
||||
// Created by : Steinberg, 08/2013
|
||||
// Description :
|
||||
// Flags : clang-format SMTGSequencer
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
// clang-format on
|
||||
|
||||
#import "VSTInterAppAudioAppDelegate.h"
|
||||
|
||||
#import "VSTInterAppAudioHostUIControllerViewController.h"
|
||||
#import "public.sdk/source/vst/interappaudio/AudioIO.h"
|
||||
|
||||
using namespace Steinberg::Vst::InterAppAudio;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@interface VSTInterAppAudioAppDelegate ()
|
||||
//------------------------------------------------------------------------
|
||||
{
|
||||
UIButton* showHostView;
|
||||
}
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@implementation VSTInterAppAudioAppDelegate
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (BOOL)application:(UIApplication*)application
|
||||
didFinishLaunchingWithOptions:(NSDictionary*)launchOptions
|
||||
{
|
||||
if ([super application:application didFinishLaunchingWithOptions:launchOptions])
|
||||
{
|
||||
[self performSelector:@selector (createShowHostViewButton) withObject:nil afterDelay:0.2];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector (audioIOConnectionChanged)
|
||||
name:AudioIO::kConnectionStateChange
|
||||
object:nil];
|
||||
return YES;
|
||||
}
|
||||
return NO;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (NSUInteger)application:(UIApplication*)application
|
||||
supportedInterfaceOrientationsForWindow:(UIWindow*)window
|
||||
{
|
||||
return UIInterfaceOrientationMaskLandscapeLeft | UIInterfaceOrientationMaskLandscapeRight;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (void)audioIOConnectionChanged
|
||||
{
|
||||
showHostView.hidden = AudioIO::instance ()->getInterAppAudioConnected () == false;
|
||||
if (showHostView.hidden)
|
||||
{
|
||||
for (id childController in [self.window.rootViewController childViewControllers])
|
||||
{
|
||||
if ([childController
|
||||
isKindOfClass:[VSTInterAppAudioHostUIControllerViewController class]])
|
||||
{
|
||||
[childController hideView:self];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (void)createShowHostViewButton
|
||||
{
|
||||
showHostView = [UIButton buttonWithType:UIButtonTypeInfoDark];
|
||||
[showHostView addTarget:self
|
||||
action:@selector (showHostViewAction:)
|
||||
forControlEvents:UIControlEventTouchDown];
|
||||
|
||||
const CGFloat margin = 15;
|
||||
CGRect frame = showHostView.frame;
|
||||
frame.origin.y =
|
||||
[self.window.rootViewController.view bounds].size.height - (frame.size.height + margin);
|
||||
frame.origin.x = margin;
|
||||
showHostView.frame = frame;
|
||||
|
||||
[self.window.rootViewController.view addSubview:showHostView];
|
||||
|
||||
if (AudioIO::instance ()->getInterAppAudioConnected () == false)
|
||||
{
|
||||
showHostView.hidden = YES;
|
||||
}
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (void)showHostViewAction:(id)sender
|
||||
{
|
||||
VSTInterAppAudioHostUIControllerViewController* controller =
|
||||
[[VSTInterAppAudioHostUIControllerViewController alloc] init];
|
||||
[self.window.rootViewController addChildViewController:controller];
|
||||
CGRect frame = controller.view.frame;
|
||||
frame.origin.y = [self.window.rootViewController.view bounds].size.height;
|
||||
controller.view.frame = frame;
|
||||
|
||||
[self.window.rootViewController.view addSubview:controller.view];
|
||||
|
||||
frame.origin.y = [self.window.rootViewController.view bounds].size.height - frame.size.height;
|
||||
|
||||
[UIView animateWithDuration:0.3 animations:^{ controller.view.frame = frame; }];
|
||||
}
|
||||
|
||||
@end
|
||||
+99
@@ -0,0 +1,99 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="4471.1" systemVersion="12E55" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none" useAutolayout="YES">
|
||||
<dependencies>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="3697.3"/>
|
||||
</dependencies>
|
||||
<objects>
|
||||
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="VSTInterAppAudioHostUIControllerViewController">
|
||||
<connections>
|
||||
<outlet property="hostButton" destination="vf0-Cd-0Xg" id="wcF-LJ-CxA"/>
|
||||
<outlet property="view" destination="2" id="3"/>
|
||||
</connections>
|
||||
</placeholder>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
||||
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="2">
|
||||
<rect key="frame" x="0.0" y="0.0" width="492" height="104"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<subviews>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="vf0-Cd-0Xg">
|
||||
<rect key="frame" x="408" y="20" width="64" height="64"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
|
||||
<state key="normal" title="Goto Host">
|
||||
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="highlighted">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="switchToHost:" destination="-1" eventType="touchUpInside" id="ttD-Qy-eUd"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="s4k-Xf-tiu">
|
||||
<rect key="frame" x="0.0" y="60" width="73" height="44"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
|
||||
<state key="normal" title="Close">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="highlighted">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="hideView:" destination="-1" eventType="touchUpInside" id="MDK-lh-cXb"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="b7T-FM-ORL">
|
||||
<rect key="frame" x="286" y="20" width="64" height="64"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="37"/>
|
||||
<state key="normal" title="▶">
|
||||
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="highlighted">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="play:" destination="-1" eventType="touchUpInside" id="sTf-N9-aIV"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="iQU-IE-WGe">
|
||||
<rect key="frame" x="214" y="20" width="64" height="64"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="37"/>
|
||||
<state key="normal" title="⏪">
|
||||
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="highlighted">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="rewind:" destination="-1" eventType="touchUpInside" id="wCj-ym-Zbp"/>
|
||||
</connections>
|
||||
</button>
|
||||
<button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oIG-ts-Ybg">
|
||||
<rect key="frame" x="142" y="20" width="64" height="64"/>
|
||||
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
|
||||
<fontDescription key="fontDescription" type="boldSystem" pointSize="37"/>
|
||||
<state key="normal" title="🔴">
|
||||
<color key="titleColor" red="0.19607843459999999" green="0.30980393290000002" blue="0.52156865600000002" alpha="1" colorSpace="calibratedRGB"/>
|
||||
<color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<state key="highlighted">
|
||||
<color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||
</state>
|
||||
<connections>
|
||||
<action selector="record:" destination="-1" eventType="touchUpInside" id="FDc-fT-H5V"/>
|
||||
</connections>
|
||||
</button>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="0.93725490196078431" green="0.93725490196078431" blue="0.95686274509803926" alpha="0.80000000000000004" colorSpace="calibratedRGB"/>
|
||||
<freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
|
||||
</view>
|
||||
</objects>
|
||||
</document>
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
// clang-format off
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/interappaudio/InterAppAudioExample/VSTInterAppAudioHostUIControllerViewController.h
|
||||
// Created by : Steinberg, 08/2013
|
||||
// Description :
|
||||
// Flags : clang-format SMTGSequencer
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
// clang-format on
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@interface VSTInterAppAudioHostUIControllerViewController : UIViewController
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
- (IBAction)hideView:(id)sender;
|
||||
|
||||
- (IBAction)switchToHost:(id)sender;
|
||||
- (IBAction)play:(id)sender;
|
||||
- (IBAction)rewind:(id)sender;
|
||||
- (IBAction)record:(id)sender;
|
||||
|
||||
@end
|
||||
|
||||
+116
@@ -0,0 +1,116 @@
|
||||
// clang-format off
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/interappaudio/InterAppAudioExample/VSTInterAppAudioHostUIControllerViewController.mm
|
||||
// Created by : Steinberg, 08/2013
|
||||
// Description :
|
||||
// Flags : clang-format SMTGSequencer
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
// clang-format on
|
||||
|
||||
#import "VSTInterAppAudioHostUIControllerViewController.h"
|
||||
|
||||
#import "public.sdk/source/vst/interappaudio/AudioIO.h"
|
||||
|
||||
using namespace Steinberg::Vst::InterAppAudio;
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
static UIImage* scaleImageToSize (UIImage* image, CGSize newSize)
|
||||
{
|
||||
UIGraphicsBeginImageContextWithOptions (newSize, NO, 0.0);
|
||||
[image drawInRect:CGRectMake (0, 0, newSize.width, newSize.height)];
|
||||
UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext ();
|
||||
UIGraphicsEndImageContext ();
|
||||
|
||||
return newImage;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@interface VSTInterAppAudioHostUIControllerViewController ()
|
||||
//------------------------------------------------------------------------
|
||||
@property (assign) IBOutlet UIButton* hostButton;
|
||||
|
||||
@end
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
@implementation VSTInterAppAudioHostUIControllerViewController
|
||||
//------------------------------------------------------------------------
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (id)init
|
||||
{
|
||||
self = [super initWithNibName:@"VSTInterAppAudioHostUIControllerView" bundle:nil];
|
||||
if (self)
|
||||
{
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (void)viewDidLoad
|
||||
{
|
||||
[super viewDidLoad];
|
||||
|
||||
UIImage* image = AudioIO::instance ()->getHostIcon ();
|
||||
if (image)
|
||||
{
|
||||
image = scaleImageToSize (image, self.hostButton.bounds.size);
|
||||
[self.hostButton setTitle:@"" forState:UIControlStateNormal];
|
||||
[self.hostButton setImage:image forState:UIControlStateNormal];
|
||||
}
|
||||
|
||||
self.view.layer.shadowColor = [[UIColor blackColor] CGColor];
|
||||
self.view.layer.shadowOpacity = 0.5;
|
||||
self.view.layer.shadowRadius = 5;
|
||||
self.view.layer.shadowOffset = CGSizeMake (5, -5);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (IBAction)hideView:(id)sender
|
||||
{
|
||||
[UIView animateWithDuration:0.3
|
||||
animations:^{
|
||||
CGRect frame = self.view.frame;
|
||||
frame.origin.y += frame.size.height;
|
||||
self.view.frame = frame;
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
[self.view removeFromSuperview];
|
||||
[self removeFromParentViewController];
|
||||
}];
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (IBAction)switchToHost:(id)sender
|
||||
{
|
||||
AudioIO::instance ()->switchToHost ();
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (IBAction)play:(id)sender
|
||||
{
|
||||
AudioIO::instance ()->sendRemoteControlEvent (kAudioUnitRemoteControlEvent_TogglePlayPause);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (IBAction)rewind:(id)sender
|
||||
{
|
||||
AudioIO::instance ()->sendRemoteControlEvent (kAudioUnitRemoteControlEvent_Rewind);
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
- (IBAction)record:(id)sender
|
||||
{
|
||||
AudioIO::instance ()->sendRemoteControlEvent (kAudioUnitRemoteControlEvent_ToggleRecord);
|
||||
}
|
||||
|
||||
@end
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
/* Localized versions of Info.plist keys */
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// Project : VST SDK
|
||||
//
|
||||
// Category : Examples
|
||||
// Filename : public.sdk/samples/vst/interappaudio/InterAppAudioExample/main.m
|
||||
// Created by : Steinberg, 08/2013
|
||||
// Description :
|
||||
//
|
||||
//-----------------------------------------------------------------------------
|
||||
// This file is part of a Steinberg SDK. It is subject to the license terms
|
||||
// in the LICENSE file found in the top-level directory of this distribution
|
||||
// and at www.steinberg.net/sdklicenses.
|
||||
// No part of the SDK, including this file, may be copied, modified, propagated,
|
||||
// or distributed except according to the terms contained in the LICENSE file.
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "VSTInterAppAudioAppDelegate.h"
|
||||
|
||||
int main(int argc, char * argv[])
|
||||
{
|
||||
@autoreleasepool {
|
||||
return UIApplicationMain (argc, argv, nil, NSStringFromClass ([VSTInterAppAudioAppDelegate class]));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user