Skip to content

Commit

Permalink
various things ;-)
Browse files Browse the repository at this point in the history
  • Loading branch information
audionuma committed Apr 13, 2013
1 parent b2192b3 commit 0b36c2f
Show file tree
Hide file tree
Showing 39 changed files with 2,137 additions and 171 deletions.
Binary file added builds/r128x-cli
Binary file not shown.
48 changes: 48 additions & 0 deletions builds/r128x-gui.app/Contents/Info.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?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>BuildMachineOSBuild</key>
<string>12D78</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>r128x-gui</string>
<key>CFBundleIdentifier</key>
<string>net.audionuma.r128x-gui</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>r128x-gui</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>DTCompiler</key>
<string></string>
<key>DTPlatformBuild</key>
<string>4H512</string>
<key>DTPlatformVersion</key>
<string>GM</string>
<key>DTSDKBuild</key>
<string>12D75</string>
<key>DTSDKName</key>
<string>macosx10.8</string>
<key>DTXcode</key>
<string>0461</string>
<key>DTXcodeBuild</key>
<string>4H512</string>
<key>LSMinimumSystemVersion</key>
<string>10.8</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2012-2013 Manuel Naudin.</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>
Binary file added builds/r128x-gui.app/Contents/MacOS/r128x-gui
Binary file not shown.
1 change: 1 addition & 0 deletions builds/r128x-gui.app/Contents/PkgInfo
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
APPL????
Binary file not shown.
17 changes: 17 additions & 0 deletions builds/r128x-gui.app/Contents/Resources/en.lproj/Credits.rtf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{\rtf1\ansi\ansicpg1252\cocoartf1187\cocoasubrtf370
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720

\f0\b\fs24 \cf0 r128x\
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
\b0 \cf0 A software for measuring loudness of audio files.\
\
Should not be used for serious things like managing nuclear power plants or hospitals.\
\
Released under GPL license.\
\
Includes code from libebur128 by Jan Kokem\'fcller\
https://github.com/jiixyj/libebur128}
Binary file not shown.
674 changes: 674 additions & 0 deletions gpl.txt

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions license.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
r128x, a command line tool for loudness measurement of files on Mac OSX Intel.

License

The libebur128 files are from the libebur128 project, https://github.com/jiixyj/libebur128.

This is the original license for libebur128 :


Copyright (c) 2011 Jan Kokemüller


Permission is hereby granted, free of charge, to any person obtaining a copy

of this software and associated documentation files (the "Software"), to deal

in the Software without restriction, including without limitation the rights

to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

copies of the Software, and to permit persons to whom the Software is

furnished to do so, subject to the following conditions:


The above copyright notice and this permission notice shall be included in

all copies or substantial portions of the Software.


THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN

THE SOFTWARE.


The license for r128x is as follow :


Copyright (c) 2012-2013 Manuel Naudin ([email protected])


This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
25 changes: 21 additions & 4 deletions r128x-cli/CliController.h
Original file line number Diff line number Diff line change
@@ -1,13 +1,30 @@
// CliController.h
// This file is part of r128x.
//
// CliController.h
// r128x
// r128x is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Created by manu naudin on 08/04/13.
// Copyright (c) 2013 Manuel Naudin. All rights reserved.
// r128x is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Foobar. If not, see <http://www.gnu.org/licenses/>.
// copyright Manuel Naudin 2012-2013

#import <Foundation/Foundation.h>

@interface CliController : NSObject
@property NSString *filePath;
@property double il, lra;
@property Float32 maxTP;
@property SInt32 status;

- (id) initWithPath: (NSString *) thePath;

- (void) doMeasure;

@end
48 changes: 44 additions & 4 deletions r128x-cli/CliController.m
Original file line number Diff line number Diff line change
@@ -1,13 +1,53 @@
// CliController.m
// This file is part of r128x.
//
// CliController.m
// r128x
// r128x is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Created by manu naudin on 08/04/13.
// Copyright (c) 2013 Manuel Naudin. All rights reserved.
// r128x is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Foobar. If not, see <http://www.gnu.org/licenses/>.
// copyright Manuel Naudin 2012-2013

#import "CliController.h"
#import "ExtAudioProcessor.h"

@implementation CliController
- (id) initWithPath: (NSString *) thePath {
if (self = [super init]) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(progressUpdate:) name:@"R128X_Progress" object:nil];
self.filePath = thePath;
}
return self;

}

- (void) doMeasure {
OSStatus err = noErr;
double il, lra;
Float32 max_tp;
self.status = ExtAudioReader((__bridge CFStringRef)(self.filePath), &il, &lra, &max_tp);
if (self.status != noErr) {
self.il = NAN;
self.lra = NAN;
self.maxTP = NAN;
} else {
self.il = il;
self.lra = lra;
self.maxTP = max_tp;
self.status = err;
//printf("%.1f %.1f %.1f\n", il, lra, max_tp);
}
}

- (void) progressUpdate: (NSNotification *) notification {
NSNumber *f = [notification object];
//printf("%.1f\n", [f floatValue]);
}
@end
38 changes: 30 additions & 8 deletions r128x-cli/main.m
Original file line number Diff line number Diff line change
@@ -1,20 +1,42 @@
// main.m
// This file is part of r128x.
//
// main.m
// r128x-cli
// r128x is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Created by manu naudin on 08/04/13.
// Copyright (c) 2013 Manuel Naudin. All rights reserved.
// r128x is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Foobar. If not, see <http://www.gnu.org/licenses/>.
// copyright Manuel Naudin 2012-2013


#import <Foundation/Foundation.h>
#import "CliController.h"

int main(int argc, const char * argv[])
{

@autoreleasepool {

// insert code here...
NSLog(@"Hello, World!");
if (argc < 2) {
printf("Missing arguments\nYou should specify at least one audio file\nr128x /some/file\n");
return 0;
} else {
CliController *controller = [[CliController alloc] init];
[[NSNotificationCenter defaultCenter] addObserver:controller selector:@selector(progressUpdate:) name:@"R128X_Progress" object:nil];

for (int i = 1; i < argc; i++) {
[controller setFilePath:[NSString stringWithUTF8String:argv[i]]];
[controller doMeasure];
NSString *fileName = [[controller filePath] lastPathComponent];
printf("%s\t %.1f\t%.1f\t%.1f\n", [fileName UTF8String], [controller il], [controller lra], [controller maxTP]);
}
}

}
return 0;
Expand Down
38 changes: 34 additions & 4 deletions r128x-gui/AppDelegate.h
Original file line number Diff line number Diff line change
@@ -1,15 +1,45 @@
// AppDelegate.h
// This file is part of r128x.
//
// AppDelegate.h
// r128x-gui
// r128x is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Created by Manuel Naudin on 08/04/13.
// Copyright (c) 2013 Manuel Naudin. All rights reserved.
// r128x is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Foobar. If not, see <http://www.gnu.org/licenses/>.
// copyright Manuel Naudin 2012-2013

#import <Cocoa/Cocoa.h>

@interface AppDelegate : NSObject <NSApplicationDelegate>

@property (assign) IBOutlet NSWindow *window;

@property (unsafe_unretained) IBOutlet NSButton *fileSelectBtn;
@property (unsafe_unretained) IBOutlet NSTextField *filesInQueueFld;
@property (unsafe_unretained) IBOutlet NSTextField *currentFileProcessedFld;
@property (unsafe_unretained) IBOutlet NSArrayController *myArrayController;
@property (unsafe_unretained) IBOutlet NSTableView *myTableView;
@property (unsafe_unretained) IBOutlet NSLevelIndicatorCell *progressIndicator;
@property NSMutableArray *filesQueue;
@property NSThread *workingThread;

- (IBAction)selectBtnPressed:(id)sender;

- (void) timerFire;

- (void) updateView;

- (void) droppedFiles: (NSNotification *) notification;

- (void) processedFiles: (NSNotification *) notification;

- (void) progressUpdate: (NSNotification *) notification;

@end
Loading

0 comments on commit 0b36c2f

Please sign in to comment.