Fixed 100% CPU usage on shorten file change by disabling optimizatins in Shorten framework. It seems to be a GCC optimization bug.

CQTexperiment
vspader 2007-05-27 14:48:01 +00:00
parent 8f595a0523
commit 04c2fe383c
4 changed files with 6 additions and 4 deletions

View File

@ -255,6 +255,7 @@
FRAMEWORK_VERSION = A;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = NO;
GCC_PREFIX_HEADER = "";
INFOPLIST_FILE = Info.plist;

View File

@ -22,6 +22,7 @@
int bitsPerSample;
float frequency;
double length;
bool seekTable;
}
@end

View File

@ -29,8 +29,8 @@
bufferSize = decoder->shn_get_buffer_block_size(NUM_DEFAULT_BUFFER_BLOCKS);
decoder->file_info(NULL, &channels, &frequency, NULL, &bitsPerSample, NULL);
decoder->file_info(NULL, &channels, &frequency, NULL, &bitsPerSample, &seekTable);
NSLog(@"Seek table: %i", seekTable);
length = decoder->shn_get_song_length();
decoder->go();
@ -90,6 +90,7 @@
{
if(decoder)
{
NSLog(@"Exiting decoder!");
decoder->exit();
delete decoder;
decoder = NULL;
@ -101,7 +102,7 @@
- (BOOL)seekable
{
return YES;
return seekTable ? YES : NO;
}
- (NSDictionary *)properties

1
TODO
View File

@ -1,4 +1,3 @@
Bug fixes:
SHN resulting in high CPU usage: http://sbooth.org/forums/viewtopic.php?p=4711#4711
Fix playlist/file loading so it never loads duplicates in a single action. Ex: If you load (an m3u containing a bunch of files) AND (the files themselves), only load them once! However, if you load the m3u, THEN load the group of files, they should appear twice! http://sbooth.org/forums/viewtopic.php?t=1434