Skip to content

Commit

Permalink
Merge pull request #5 from ragnaringi/ios_native
Browse files Browse the repository at this point in the history
iOS native
  • Loading branch information
ragnaringi authored Aug 30, 2018
2 parents 1c99015 + 52b9e31 commit b201097
Show file tree
Hide file tree
Showing 8 changed files with 260 additions and 711 deletions.
106 changes: 24 additions & 82 deletions ESMusicExtractor.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions src/ESExtractor.mm
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ @implementation ESExtractor

- (NSDictionary *)analyseTrack:(NSURL *)url {
essentia_main(url.path.UTF8String, [self tempFile].path.UTF8String, "");
return ({
NSData* data = [NSData dataWithContentsOfURL:[self tempFile]];
[NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
});
NSData* data = [NSData dataWithContentsOfURL:[self tempFile]];
@try {
return [NSJSONSerialization JSONObjectWithData:data options:kNilOptions error:nil];
} @catch (NSException *exception) {
return nil;
}
}

- (NSURL *)tempFile {
Expand Down
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit b201097

Please sign in to comment.