Skip to content

Commit

Permalink
Merge pull request #73 from semvis123/sound-position-and-vpt-macos-gui
Browse files Browse the repository at this point in the history
Sound position and vpt macos gui
Plutoberth authored Jun 24, 2022
2 parents c360d10 + fbe7dad commit e9cef0b
Showing 5 changed files with 215 additions and 71 deletions.
1 change: 1 addition & 0 deletions Client/macos/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
#import <stdio.h>
#import <IOBluetoothUI/IOBluetoothUI.h>
#import "BluetoothWrapper.h"
#import "Headphones.h"
#import "MacOSBluetoothConnector.h"

@interface AppDelegate : NSObject <NSApplicationDelegate>
115 changes: 96 additions & 19 deletions Client/macos/Main.storyboard
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="17701" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<document type="com.apple.InterfaceBuilder3.Cocoa.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" initialViewController="B8D-0N-5wS">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="17701"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="20037"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<scenes>
@@ -131,10 +131,10 @@
<windowController id="B8D-0N-5wS" sceneMemberID="viewController">
<window key="window" title="SonyHeadphonesClient" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" animationBehavior="default" id="IQv-IB-iLA">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<rect key="contentRect" x="0.0" y="995" width="423" height="221"/>
<rect key="contentRect" x="0.0" y="995" width="423" height="310"/>
<rect key="screenRect" x="0.0" y="0.0" width="1920" height="1200"/>
<value key="minSize" type="size" width="423" height="221"/>
<value key="maxSize" type="size" width="423" height="221"/>
<value key="minSize" type="size" width="423" height="310"/>
<value key="maxSize" type="size" width="423" height="310"/>
</window>
<connections>
<segue destination="XfG-lQ-9wD" kind="relationship" relationship="window.shadowedContentViewController" id="lIw-zv-7Km"/>
@@ -149,11 +149,11 @@
<objects>
<viewController id="XfG-lQ-9wD" customClass="ViewController" sceneMemberID="viewController">
<view key="view" wantsLayer="YES" id="m2S-Jp-Qdl">
<rect key="frame" x="0.0" y="0.0" width="423" height="221"/>
<rect key="frame" x="0.0" y="0.0" width="423" height="310"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aqv-Ws-wbl">
<rect key="frame" x="13" y="128" width="397" height="32"/>
<rect key="frame" x="13" y="217" width="397" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="push" title="Connect to Bluetooth device" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="FJH-jh-019">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@@ -164,7 +164,7 @@
</connections>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" fixedFrame="YES" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="T72-Gf-fe7">
<rect key="frame" x="18" y="163" width="387" height="38"/>
<rect key="frame" x="18" y="252" width="387" height="38"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" selectable="YES" id="402-em-glw">
<font key="font" metaFont="system"/>
@@ -175,7 +175,7 @@ Source: https://github.com/Plutoberth/SonyHeadphonesClient</string>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="V6f-ZQ-bKY">
<rect key="frame" x="18" y="112" width="387" height="16"/>
<rect key="frame" x="18" y="201" width="387" height="16"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" truncatesLastVisibleLine="YES" title="Not connected" id="YBf-lp-MdN">
<font key="font" metaFont="system"/>
@@ -184,7 +184,7 @@ Source: https://github.com/Plutoberth/SonyHeadphonesClient</string>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HVf-Ir-otU">
<rect key="frame" x="252" y="48" width="144" height="16"/>
<rect key="frame" x="252" y="136" width="144" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="Ambient Sound Level:" id="e00-m9-yK3">
<font key="font" metaFont="system"/>
@@ -193,7 +193,7 @@ Source: https://github.com/Plutoberth/SonyHeadphonesClient</string>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="aux-7E-1O2">
<rect key="frame" x="392" y="48" width="33" height="16"/>
<rect key="frame" x="392" y="136" width="33" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="0" id="cRP-Qr-45A">
<font key="font" metaFont="system"/>
@@ -202,39 +202,111 @@ Source: https://github.com/Plutoberth/SonyHeadphonesClient</string>
</textFieldCell>
</textField>
<slider verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="O6v-na-xL2">
<rect key="frame" x="18" y="39" width="230" height="28"/>
<rect key="frame" x="18" y="127" width="230" height="28"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES"/>
<sliderCell key="cell" enabled="NO" state="on" alignment="left" maxValue="19" tickMarkPosition="below" numberOfTickMarks="20" allowsTickMarkValuesOnly="YES" sliderType="linear" id="q5G-me-sXi"/>
<connections>
<action selector="sendData:" target="XfG-lQ-9wD" id="5p1-OX-wuC"/>
<action selector="ANCSliderChanged:" target="XfG-lQ-9wD" id="eNN-mn-mkT"/>
</connections>
</slider>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ANG-u3-UEi">
<rect key="frame" x="18" y="75" width="326" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="Only one of the options below may be used at a time." id="sY6-Wg-LlC">
<font key="font" metaFont="system"/>
<color key="textColor" name="tertiaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="2eb-Pg-R0U">
<rect key="frame" x="18" y="81" width="228" height="24"/>
<rect key="frame" x="18" y="170" width="228" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="check" title="Enable Ambient Sound Control" bezelStyle="regularSquare" imagePosition="left" alignment="left" enabled="NO" inset="2" id="PiW-GG-RdM">
<behavior key="behavior" pushIn="YES" changeContents="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="sendData:" target="XfG-lQ-9wD" id="NRS-p8-lU5"/>
<action selector="ANCEnabledButtonChanged:" target="XfG-lQ-9wD" id="T2G-mZ-Zg4"/>
</connections>
</button>
<box verticalHuggingPriority="750" fixedFrame="YES" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="bHH-7z-47s">
<rect key="frame" x="0.0" y="71" width="423" height="5"/>
<rect key="frame" x="0.0" y="159" width="423" height="5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</box>
<button verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ALy-EG-jxf">
<rect key="frame" x="18" y="19" width="279" height="18"/>
<rect key="frame" x="18" y="107" width="279" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="check" title="Focus on Voice isn't enabled on this level." bezelStyle="regularSquare" imagePosition="left" enabled="NO" inset="2" id="MPt-8r-xfv">
<behavior key="behavior" changeContents="YES" doesNotDimImage="YES" lightByContents="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="sendData:" target="XfG-lQ-9wD" id="VS7-xg-wZb"/>
<action selector="focusOnVoiceChanged:" target="XfG-lQ-9wD" id="5Hg-63-w5X"/>
</connections>
</button>
<box verticalHuggingPriority="750" fixedFrame="YES" boxType="separator" translatesAutoresizingMaskIntoConstraints="NO" id="Ocw-OM-fwY">
<rect key="frame" x="0.0" y="97" width="423" height="5"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</box>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Aj9-d1-8g1" userLabel="Position">
<rect key="frame" x="17" y="43" width="149" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<popUpButtonCell key="cell" type="push" title="Off" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" enabled="NO" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="J2q-XO-Abs" id="rkB-Zq-SCR" userLabel="Off">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="t3k-gD-kSW">
<items>
<menuItem title="Off" state="on" id="J2q-XO-Abs"/>
<menuItem title="Front Left" id="fqN-RS-4np" userLabel="Top Left"/>
<menuItem title="Front Right" id="xt2-oK-Re2"/>
<menuItem title="Front" id="2Qy-Ch-NBy"/>
<menuItem title="Rear Left" id="kyy-Uf-0AB"/>
<menuItem title="Rear Right" id="E3I-o0-0ot"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="soundPositionChanged:" target="XfG-lQ-9wD" id="p3l-dZ-i7D"/>
</connections>
</popUpButton>
<popUpButton verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="w97-Mz-47B" userLabel="Surround">
<rect key="frame" x="17" y="13" width="149" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<popUpButtonCell key="cell" type="push" title="Off" bezelStyle="rounded" alignment="left" lineBreakMode="truncatingTail" enabled="NO" state="on" borderStyle="borderAndBezel" imageScaling="proportionallyDown" inset="2" selectedItem="ngc-cy-31V" id="t6e-ka-vVD" userLabel="Off">
<behavior key="behavior" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="menu"/>
<menu key="menu" id="G8M-jo-anF">
<items>
<menuItem title="Off" state="on" id="ngc-cy-31V"/>
<menuItem title="Outdoor Festival" id="Quk-Ov-sTu"/>
<menuItem title="Arena" id="Wki-TQ-xXB"/>
<menuItem title="Concert Hall" id="kwT-jH-D9N"/>
<menuItem title="Club" id="jrr-IS-UGA"/>
</items>
</menu>
</popUpButtonCell>
<connections>
<action selector="surroundChanged:" target="XfG-lQ-9wD" id="5lT-Xg-ED6"/>
</connections>
</popUpButton>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="8E2-4g-KE4">
<rect key="frame" x="168" y="51" width="95" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="Sound Position" id="JAE-Tt-0iL">
<font key="font" metaFont="system"/>
<color key="textColor" name="tertiaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="jdH-0J-cfw">
<rect key="frame" x="168" y="23" width="99" height="16"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES"/>
<textFieldCell key="cell" lineBreakMode="truncatingTail" title="Surround (VPT)" id="xDG-GS-uDw">
<font key="font" metaFont="system"/>
<color key="textColor" name="tertiaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
</view>
<connections>
@@ -245,11 +317,16 @@ Source: https://github.com/Plutoberth/SonyHeadphonesClient</string>
<outlet property="connectButton" destination="aqv-Ws-wbl" id="Nb4-ol-PCV"/>
<outlet property="connectedLabel" destination="V6f-ZQ-bKY" id="72M-GZ-WnM"/>
<outlet property="focusOnVoice" destination="ALy-EG-jxf" id="blO-Rb-V33"/>
<outlet property="soundPosition" destination="Aj9-d1-8g1" id="659-KC-9lq"/>
<outlet property="soundPositionLabel" destination="8E2-4g-KE4" id="sQX-yz-OCS"/>
<outlet property="surround" destination="w97-Mz-47B" id="gJ7-ii-H7x"/>
<outlet property="surroundLabel" destination="jdH-0J-cfw" id="GAQ-jZ-24u"/>
<outlet property="virtualSoundLabel" destination="ANG-u3-UEi" id="2uj-CL-mix"/>
</connections>
</viewController>
<customObject id="rPt-NT-nkU" userLabel="First Responder" customClass="NSResponder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="75.5" y="723.5"/>
<point key="canvasLocation" x="75.5" y="768"/>
</scene>
</scenes>
</document>
Loading

0 comments on commit e9cef0b

Please sign in to comment.