Skip to content

Commit

Permalink
Added AACGain support
Browse files Browse the repository at this point in the history
  • Loading branch information
Sappharad authored and Sappharad committed May 29, 2017
1 parent fa9a679 commit 75c3ffe
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
8 changes: 4 additions & 4 deletions MP3GainExpress.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
9E3A2AFB13C23D5200E49A59 /* AddFolder.png in Resources */ = {isa = PBXBuildFile; fileRef = 9E3A2AF813C23D5200E49A59 /* AddFolder.png */; };
9E3A2AFC13C23D5200E49A59 /* ClearAll.png in Resources */ = {isa = PBXBuildFile; fileRef = 9E3A2AF913C23D5200E49A59 /* ClearAll.png */; };
9E3A2AFD13C23D5200E49A59 /* ClearSong.png in Resources */ = {isa = PBXBuildFile; fileRef = 9E3A2AFA13C23D5200E49A59 /* ClearSong.png */; };
9E3AC90C1D4EDFEF007F69C8 /* mp3gain in Resources */ = {isa = PBXBuildFile; fileRef = 9E3AC90B1D4EDFEF007F69C8 /* mp3gain */; };
9E4132901D52DEE600F0A004 /* Mp3GainTask.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E41328F1D52DEE600F0A004 /* Mp3GainTask.m */; };
9E431AEF1D4AFBE100A69E9D /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E93CC6715E85A99005A76C5 /* Sparkle.framework */; };
9E431AF11D4AFBE700A69E9D /* Sparkle.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9E93CC6715E85A99005A76C5 /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
9E431AF41D4AFC2800A69E9D /* CoreFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E431AF31D4AFC2800A69E9D /* CoreFoundation.framework */; };
9E431AF61D4AFC3700A69E9D /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9E431AF51D4AFC3700A69E9D /* AppKit.framework */; };
9E46184C1EDBC36100C12330 /* aacgain in Resources */ = {isa = PBXBuildFile; fileRef = 9E46184B1EDBC36100C12330 /* aacgain */; };
9E48BC2A13C3F34A003BDC4F /* m3gInputList.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E48BC2913C3F34A003BDC4F /* m3gInputList.m */; };
9E5E0AC11ED8D0E500B2D422 /* m3gPreferences.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E5E0AC01ED8D0E500B2D422 /* m3gPreferences.m */; };
9E93CC6515E85107005A76C5 /* ui_text.strings in Resources */ = {isa = PBXBuildFile; fileRef = 9E93CC6315E85107005A76C5 /* ui_text.strings */; };
Expand Down Expand Up @@ -64,11 +64,11 @@
9E3A2AF813C23D5200E49A59 /* AddFolder.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AddFolder.png; sourceTree = "<group>"; };
9E3A2AF913C23D5200E49A59 /* ClearAll.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ClearAll.png; sourceTree = "<group>"; };
9E3A2AFA13C23D5200E49A59 /* ClearSong.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ClearSong.png; sourceTree = "<group>"; };
9E3AC90B1D4EDFEF007F69C8 /* mp3gain */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = mp3gain; sourceTree = "<group>"; };
9E41328E1D52DEE600F0A004 /* Mp3GainTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Mp3GainTask.h; sourceTree = "<group>"; };
9E41328F1D52DEE600F0A004 /* Mp3GainTask.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Mp3GainTask.m; sourceTree = "<group>"; };
9E431AF31D4AFC2800A69E9D /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; };
9E431AF51D4AFC3700A69E9D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
9E46184B1EDBC36100C12330 /* aacgain */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.executable"; path = aacgain; sourceTree = "<group>"; };
9E48BC2813C3F34A003BDC4F /* m3gInputList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = m3gInputList.h; sourceTree = "<group>"; };
9E48BC2913C3F34A003BDC4F /* m3gInputList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = m3gInputList.m; sourceTree = "<group>"; };
9E5E0ABF1ED8D0E500B2D422 /* m3gPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = m3gPreferences.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -131,7 +131,7 @@
9E3A2ADF13C231B400E49A59 /* Mp3GainMac */ = {
isa = PBXGroup;
children = (
9E3AC90B1D4EDFEF007F69C8 /* mp3gain */,
9E46184B1EDBC36100C12330 /* aacgain */,
9E48BC2813C3F34A003BDC4F /* m3gInputList.h */,
9E48BC2913C3F34A003BDC4F /* m3gInputList.m */,
9EA9F17513C278550036B145 /* m3gInputItem.h */,
Expand Down Expand Up @@ -226,11 +226,11 @@
files = (
9E3A2AE413C231B400E49A59 /* InfoPlist.strings in Resources */,
9EB6852C1EB839E7003DD377 /* Resources.xcassets in Resources */,
9E46184C1EDBC36100C12330 /* aacgain in Resources */,
9E3A2AEA13C231B400E49A59 /* Credits.rtf in Resources */,
9E3A2AF013C231B400E49A59 /* MainMenu.xib in Resources */,
9E3A2AF713C237A000E49A59 /* AddSong.png in Resources */,
9E14A37B1DA358940083378F /* FileProgressViewItem.xib in Resources */,
9E3AC90C1D4EDFEF007F69C8 /* mp3gain in Resources */,
9E3A2AFB13C23D5200E49A59 /* AddFolder.png in Resources */,
9E3A2AFC13C23D5200E49A59 /* ClearAll.png in Resources */,
9E3A2AFD13C23D5200E49A59 /* ClearSong.png in Resources */,
Expand Down
3 changes: 1 addition & 2 deletions Mp3GainMac/Mp3GainMacAppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ - (IBAction)btnAddFolder:(id)sender {
[ddlSubfolders addItemWithTitle:NSLocalizedStringFromTable(@"5_Below", @"ui_text", @"5_Below")];
[fbox setAccessoryView:vwSubfolderPicker];
if([fbox respondsToSelector:@selector(isAccessoryViewDisclosed)]){

fbox.accessoryViewDisclosed = YES;
}
fbox.accessoryViewDisclosed = YES;
[fbox beginSheetModalForWindow:_window completionHandler:^(NSInteger result) {
if(result == NSOKButton){
uint folderCount = (uint)[[fbox URLs] count];
Expand Down
2 changes: 1 addition & 1 deletion Mp3GainMac/Mp3GainTask.m
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ -(void)UndoGain{

-(void)doProcessing:(NSArray<NSString*>*)arguments{
_task = [NSTask new];
NSString* launchPath = [[NSBundle mainBundle] pathForResource:@"mp3gain" ofType:nil];
NSString* launchPath = [[NSBundle mainBundle] pathForResource:@"aacgain" ofType:nil];
[_task setLaunchPath:launchPath];
[_task setArguments:arguments];

Expand Down
Binary file added Mp3GainMac/aacgain
Binary file not shown.
4 changes: 3 additions & 1 deletion Mp3GainMac/m3gInputList.m
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ -(BOOL)tableView:(NSTableView *)tableView acceptDrop:(id<NSDraggingInfo>)info ro

-(void)addFile:(NSString*)filePath{
//Note: Assumes file already exists. You should check this before calling this.
if([[filePath lowercaseString] hasSuffix:@".mp3"]) {
if([[filePath lowercaseString] hasSuffix:@".mp3"] ||
[[filePath lowercaseString] hasSuffix:@".mp4"] ||
[[filePath lowercaseString] hasSuffix:@".m4a"]) {
m3gInputItem* itemToAdd = [[m3gInputItem alloc] init];
itemToAdd.filePath = [NSURL fileURLWithPath:filePath];
[self addObject:itemToAdd];
Expand Down
Binary file removed Mp3GainMac/mp3gain
Binary file not shown.

0 comments on commit 75c3ffe

Please sign in to comment.