Updated BASSMODS plugin to only handle IT modules.

CQTexperiment
Christopher Snowhill 2016-12-22 20:42:30 -08:00
parent 31a0f9155c
commit 07fef42863
1 changed files with 8 additions and 2 deletions

View File

@ -76,8 +76,6 @@ static void SyncProc( HSYNC handle, DWORD channel, DWORD data, void *user )
- (BOOL)open:(id<CogSource>)s - (BOOL)open:(id<CogSource>)s
{ {
[self setSource:s];
[source seek:0 whence:SEEK_END]; [source seek:0 whence:SEEK_END];
long size = [source tell]; long size = [source tell];
[source seek:0 whence:SEEK_SET]; [source seek:0 whence:SEEK_SET];
@ -90,7 +88,15 @@ static void SyncProc( HSYNC handle, DWORD channel, DWORD data, void *user )
free( data ); free( data );
data = try_data; data = try_data;
} }
if (memcmp(data, "IMPM", 4) != 0) {
ALog(@"BASS was passed a non-IT module");
free(data);
return NO;
}
[self setSource:s];
NSURL * url = [s url]; NSURL * url = [s url];
int track_num; int track_num;
if ([[url fragment] length] == 0) if ([[url fragment] length] == 0)