Fixed 100% CPU usage on shorten file change by disabling optimizatins in Shorten framework. It seems to be a GCC optimization bug.
parent
8f595a0523
commit
04c2fe383c
|
@ -255,6 +255,7 @@
|
||||||
FRAMEWORK_VERSION = A;
|
FRAMEWORK_VERSION = A;
|
||||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||||
GCC_MODEL_TUNING = G5;
|
GCC_MODEL_TUNING = G5;
|
||||||
|
GCC_OPTIMIZATION_LEVEL = 0;
|
||||||
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
GCC_PRECOMPILE_PREFIX_HEADER = NO;
|
||||||
GCC_PREFIX_HEADER = "";
|
GCC_PREFIX_HEADER = "";
|
||||||
INFOPLIST_FILE = Info.plist;
|
INFOPLIST_FILE = Info.plist;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
int bitsPerSample;
|
int bitsPerSample;
|
||||||
float frequency;
|
float frequency;
|
||||||
double length;
|
double length;
|
||||||
|
bool seekTable;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -29,8 +29,8 @@
|
||||||
|
|
||||||
bufferSize = decoder->shn_get_buffer_block_size(NUM_DEFAULT_BUFFER_BLOCKS);
|
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();
|
length = decoder->shn_get_song_length();
|
||||||
|
|
||||||
decoder->go();
|
decoder->go();
|
||||||
|
@ -90,6 +90,7 @@
|
||||||
{
|
{
|
||||||
if(decoder)
|
if(decoder)
|
||||||
{
|
{
|
||||||
|
NSLog(@"Exiting decoder!");
|
||||||
decoder->exit();
|
decoder->exit();
|
||||||
delete decoder;
|
delete decoder;
|
||||||
decoder = NULL;
|
decoder = NULL;
|
||||||
|
@ -101,7 +102,7 @@
|
||||||
|
|
||||||
- (BOOL)seekable
|
- (BOOL)seekable
|
||||||
{
|
{
|
||||||
return YES;
|
return seekTable ? YES : NO;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSDictionary *)properties
|
- (NSDictionary *)properties
|
||||||
|
|
1
TODO
1
TODO
|
@ -1,4 +1,3 @@
|
||||||
Bug fixes:
|
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
|
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
|
||||||
|
|
Loading…
Reference in New Issue