mirror of
https://github.com/microtherion/VocalEasel.git
synced 2024-12-22 19:23:59 +00:00
Added changedFileWrapper to avoid annoying warnings
This commit is contained in:
parent
8a9e650e75
commit
44f4f86173
|
@ -54,6 +54,7 @@
|
||||||
- (NSString *) baseName;
|
- (NSString *) baseName;
|
||||||
- (NSURL *) fileURLWithExtension:(NSString*)extension;
|
- (NSURL *) fileURLWithExtension:(NSString*)extension;
|
||||||
- (NSTask *) taskWithLaunchPath:(NSString *)path arguments:(NSArray *)args;
|
- (NSTask *) taskWithLaunchPath:(NSString *)path arguments:(NSArray *)args;
|
||||||
|
- (void) changedFileWrapper;
|
||||||
- (void) willChangeSong;
|
- (void) willChangeSong;
|
||||||
- (void) didChangeSong;
|
- (void) didChangeSong;
|
||||||
|
|
||||||
|
|
|
@ -316,6 +316,16 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) changedFileWrapper
|
||||||
|
{
|
||||||
|
if (NSURL * url = [self fileURL])
|
||||||
|
if (NSDate * modDate =
|
||||||
|
[[[NSFileManager defaultManager] fileAttributesAtPath:[url path]
|
||||||
|
traverseLink:YES]
|
||||||
|
objectForKey:NSFileModificationDate])
|
||||||
|
[self setFileModificationDate:modDate];
|
||||||
|
}
|
||||||
|
|
||||||
- (NSTask *) taskWithLaunchPath:(NSString *)launch arguments:(NSArray *)args;
|
- (NSTask *) taskWithLaunchPath:(NSString *)launch arguments:(NSArray *)args;
|
||||||
{
|
{
|
||||||
NSTask * task = [[NSTask alloc] init];
|
NSTask * task = [[NSTask alloc] init];
|
||||||
|
@ -372,6 +382,7 @@
|
||||||
} else {
|
} else {
|
||||||
NSBeep();
|
NSBeep();
|
||||||
}
|
}
|
||||||
|
[self changedFileWrapper];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (IBAction) play:(id)sender
|
- (IBAction) play:(id)sender
|
||||||
|
@ -379,6 +390,7 @@
|
||||||
NSError * err;
|
NSError * err;
|
||||||
[self writeToURL:[self fileURLWithExtension:@"mid"]
|
[self writeToURL:[self fileURLWithExtension:@"mid"]
|
||||||
ofType:@"VLMIDIType" error:&err];
|
ofType:@"VLMIDIType" error:&err];
|
||||||
|
[self changedFileWrapper];
|
||||||
VLSoundOut::Instance()->PlayFile(
|
VLSoundOut::Instance()->PlayFile(
|
||||||
CFDataRef([NSData dataWithContentsOfURL:
|
CFDataRef([NSData dataWithContentsOfURL:
|
||||||
[self fileURLWithExtension:@"mid"]]));
|
[self fileURLWithExtension:@"mid"]]));
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
NSError * err;
|
NSError * err;
|
||||||
NSURL * mmaURL = [self fileURLWithExtension:@"mma"];
|
NSURL * mmaURL = [self fileURLWithExtension:@"mma"];
|
||||||
[self writeToURL: mmaURL ofType:@"VLMMAType" error:&err];
|
[self writeToURL: mmaURL ofType:@"VLMMAType" error:&err];
|
||||||
|
[self changedFileWrapper];
|
||||||
|
|
||||||
NSString * launch =
|
NSString * launch =
|
||||||
[mainBundle pathForResource:@"mmaWrapper" ofType:@""
|
[mainBundle pathForResource:@"mmaWrapper" ofType:@""
|
||||||
|
@ -50,4 +51,15 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
- (void)mmaDone:(NSNotification *)notification {
|
||||||
|
[[NSNotificationCenter defaultCenter] removeObserver: self];
|
||||||
|
int status = [[notification object] terminationStatus];
|
||||||
|
if (!status) {
|
||||||
|
;
|
||||||
|
} else {
|
||||||
|
NSBeep();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user