Cleaned up a little.

CQTexperiment
vspader 2007-02-18 21:48:37 +00:00
parent 9c4bab29e5
commit 4a2cddb8ab
5 changed files with 16 additions and 11 deletions

View File

@ -161,10 +161,9 @@
{
PlaylistEntry *pe =[entries objectAtIndex:i];
[pe readInfoThread];
// [pe performSelectorOnMainThread:@selector(readInfoThread) withObject:nil waitUntilDone:YES];
[pe readTagsThread];
// [pe performSelectorOnMainThread:@selector(readTagsThread) withObject:nil waitUntilDone:YES];
[pe readInfoThreaded];
[pe readTagsThreaded];
//Hack so the display gets updated
if (pe == [self currentEntry])

View File

@ -73,6 +73,8 @@
- (float)sampleRate;
- (void)readTags;
- (void)readTagsThreaded;
- (void)readInfo;
- (void)readInfoThreaded;
@end

View File

@ -233,7 +233,7 @@
// [sp close];
}
- (void)readInfoThreadSetVariables:(SoundFile *)sf
- (void)readInfoThreadedSetVariables:(SoundFile *)sf
{
[self setLength:[sf length]];
[self setBitrate:[sf bitrate]];
@ -246,13 +246,13 @@
[sf release];
}
- (void)readInfoThread
- (void)readInfoThreaded
{
SoundFile *sf = [SoundFile readInfo:filename];
if (sf == nil)
return;
[self performSelectorOnMainThread:@selector(readInfoThreadSetVariables:) withObject:sf waitUntilDone:YES];
[self performSelectorOnMainThread:@selector(readInfoThreadedSetVariables:) withObject:sf waitUntilDone:YES];
}
- (NSString *)lengthString
@ -378,7 +378,7 @@
}
}
- (void)readTagsThreadSetVariables: (NSArray *)a
- (void)readTagsThreadedSetVariables: (NSArray *)a
{
NSLog(@"SETTING TITLE TO: %@", [a objectAtIndex:0]);
[self setDisplay:[a objectAtIndex:0]];
@ -396,7 +396,7 @@
[self setTrack:[[a objectAtIndex:6] intValue]];
}
- (void)readTagsThread
- (void)readTagsThreaded
{
NSString *lDisplay = @"", *lArtist = @"", *lTitle = @"", *lAlbum = @"", *lGenre = @"";
int lYear = 0, lTrack = 0;
@ -468,7 +468,7 @@
lTitle = [filename lastPathComponent];
}
NSLog(@"TITLE IS: %@", lTitle);
[self performSelectorOnMainThread:@selector(readTagsThreadSetVariables:) withObject:
[self performSelectorOnMainThread:@selector(readTagsThreadedSetVariables:) withObject:
[NSArray arrayWithObjects:
lDisplay,
lTitle,

View File

@ -30,7 +30,7 @@
- (BufferChain *) bufferChain;
- (id)initWithDelegate:(id)d;
- (void)play:(NSString *)filename;
- (void)play:(PlaylistEntry *)pe;
- (void)stop;
- (void)pause;
- (void)resume;

View File

@ -21,6 +21,10 @@
//#import "GameFile.h"
#import "MadFile.h"
//Something is redefining BOOL
#undef BOOL
extern "C" {
BOOL hostIsBigEndian()
{