Skip to content

Commit

Permalink
Initial release
Browse files Browse the repository at this point in the history
  • Loading branch information
tillt committed Jan 13, 2023
1 parent 60ec7a4 commit 958ae14
Show file tree
Hide file tree
Showing 128 changed files with 11,738 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

## User settings
xcuserdata/
*.xcuserstate

build/

## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9)
*.xcscmblueprint
*.xccheckout

## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4)
build/
DerivedData/
*.moved-aside
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3

## Obj-C/Swift specific
*.hmap

## App packaging
*.ipa
*.dSYM.zip
*.dSYM

# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts

Carthage/Build/

# fastlane
#
# It is recommended to not store the screenshots in the git repo.
# Instead, use fastlane to re-generate the screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
643 changes: 643 additions & 0 deletions PlayEm.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions PlayEm.xcodeproj/project.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?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">
<array/>
</plist>
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<VariablesViewState
version = "1.0">
<ContextStates>
<ContextState
contextName = "-[VisualSample initWithSample:]:VisualSample.m">
</ContextState>
<ContextState
contextName = "+[Visualizer imageFromVisualSample:start:duration:size:]:Visualizer.m">
<PersistentStrings>
<PersistentString
value = "data[sampleIndex]">
</PersistentString>
</PersistentStrings>
</ContextState>
</ContextStates>
</VariablesViewState>
88 changes: 88 additions & 0 deletions PlayEm.xcodeproj/xcshareddata/xcschemes/PlayEm.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1400"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BBD24D5C2432948800DC2A81"
BuildableName = "PlayEm.app"
BlueprintName = "PlayEm"
ReferencedContainer = "container:PlayEm.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
enableASanStackUseAfterReturn = "YES"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUFrameCaptureMode = "1"
enableGPUValidationMode = "1"
allowLocationSimulation = "NO">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BBD24D5C2432948800DC2A81"
BuildableName = "PlayEm.app"
BlueprintName = "PlayEm"
ReferencedContainer = "container:PlayEm.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<EnvironmentVariables>
<EnvironmentVariable
key = "MALLOC_PERMIT_INSANE_REQUESTS"
value = "1"
isEnabled = "YES">
</EnvironmentVariable>
</EnvironmentVariables>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "BBD24D5C2432948800DC2A81"
BuildableName = "PlayEm.app"
BlueprintName = "PlayEm"
ReferencedContainer = "container:PlayEm.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
uuid = "37E70EE5-DBE3-48DC-AEDD-40FFC38F034C"
type = "1"
version = "2.0">
</Bucket>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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>SchemeUserState</key>
<dict>
<key>PlayEm.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>0</integer>
</dict>
<key>PlayEmTV.xcscheme_^#shared#^_</key>
<dict>
<key>orderHint</key>
<integer>1</integer>
</dict>
</dict>
<key>SuppressBuildableAutocreation</key>
<dict>
<key>BBD24D5C2432948800DC2A81</key>
<dict>
<key>primary</key>
<true/>
</dict>
</dict>
</dict>
</plist>
18 changes: 18 additions & 0 deletions PlayEm/AVMetadataItem+THAdditions.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
//
// AVMetadataItem+THAdditions.h
// PlayEm
//
// Created by Till Toenshoff on 15.09.22.
// Copyright © 2022 Till Toenshoff. All rights reserved.
//
#import <AVFoundation/AVFoundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface AVMetadataItem (THAdditions)

@property (readonly) NSString *keyString;

@end

NS_ASSUME_NONNULL_END
46 changes: 46 additions & 0 deletions PlayEm/AVMetadataItem+THAdditions.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
//
// AVMediadataItem+THAdditions.m
// PlayEm
//
// Created by Till Toenshoff on 15.09.22.
// Copyright © 2022 Till Toenshoff. All rights reserved.
//

#import "AVMetadataItem+THAdditions.h"

@implementation AVMetadataItem (THAdditions)

- (NSString *)keyString {
if ([self.key isKindOfClass:[NSString class]]) {
return (NSString *)self.key;
} else if ([self.key isKindOfClass:[NSNumber class]]) {
UInt32 keyValue = [(NSNumber *) self.key unsignedIntValue];

size_t length = sizeof(UInt32);
if ((keyValue >> 24) == 0) --length;
if ((keyValue >> 16) == 0) --length;
if ((keyValue >> 8) == 0) --length;
if ((keyValue >> 0) == 0) --length;

long address = (unsigned long)&keyValue;
address += (sizeof(UInt32) - length);

keyValue = CFSwapInt32BigToHost(keyValue);

char cstring[length+1];
strncpy(cstring, (char *) address, length);
cstring[length] = '\0';

if (cstring[0] == '\xA9') {
cstring[0] = '@';
}

return [NSString stringWithCString:(char *)cstring
encoding:NSUTF8StringEncoding];
}
else {
return @"<<unknown>>";
}
}

@end
15 changes: 15 additions & 0 deletions PlayEm/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
//
// AppDelegate.h
// PlayEm
//
// Created by Till Toenshoff on 30.03.20.
// Copyright © 2020 Till Toenshoff. All rights reserved.
//

#import <Cocoa/Cocoa.h>

@interface AppDelegate : NSObject <NSApplicationDelegate>


@end

55 changes: 55 additions & 0 deletions PlayEm/AppDelegate.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
//
// AppDelegate.m
// PlayEm
//
// Created by Till Toenshoff on 30.03.20.
// Copyright © 2020 Till Toenshoff. All rights reserved.
//

#import "AppDelegate.h"

#import <AVFoundation/AVFoundation.h>
#import <AppKit/NSOpenPanel.h>

#import "WaveWindowController.h"

@interface AppDelegate ()

@property (weak, nonatomic) IBOutlet NSWindow *waveWindow;
@property (strong, nonatomic) WaveWindowController *waveController;

@end


@implementation AppDelegate

- (WaveWindowController*)waveController
{
if (_waveController == nil) {
_waveController = [WaveWindowController new];
}
return _waveController;
}

- (BOOL)application:(NSApplication*)sender openFile:(NSString*)filename
{
NSError* error = nil;
return [[self waveController] loadDocumentFromURL:[NSURL fileURLWithPath:filename] meta:nil error:&error];
}

- (void)application:(NSApplication*)application openURLs:(NSArray<NSURL*>*)urls
{
NSError* error = nil;
[[self waveController] loadDocumentFromURL:urls[0] meta:nil error:&error];
}

- (void)applicationDidFinishLaunching:(NSNotification*)aNotification
{
[[[self waveController] window] makeKeyAndOrderFront:self];
}

- (void)applicationWillTerminate:(NSNotification*)aNotification
{
}

@end
Binary file added PlayEm/Assets.xcassets/AppIcon.appiconset/128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PlayEm/Assets.xcassets/AppIcon.appiconset/16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PlayEm/Assets.xcassets/AppIcon.appiconset/256.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PlayEm/Assets.xcassets/AppIcon.appiconset/32.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added PlayEm/Assets.xcassets/AppIcon.appiconset/64.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 958ae14

Please sign in to comment.