Invalid file fixes

This commit is contained in:
vspader 2005-06-07 21:04:15 +00:00
parent 9616339707
commit b56b17ba0a
8 changed files with 451 additions and 586 deletions

View file

@ -255,20 +255,20 @@
<array> <array>
<string>29B97314FDCFA39411CA2CEA</string> <string>29B97314FDCFA39411CA2CEA</string>
<string>080E96DDFE201D6D7F000001</string> <string>080E96DDFE201D6D7F000001</string>
<string>8EF6FA64082DA525006F7BE6</string>
<string>29B97317FDCFA39411CA2CEA</string> <string>29B97317FDCFA39411CA2CEA</string>
<string>8EAFD26D08465E4500107BA5</string>
<string>1C37FABC05509CD000000102</string> <string>1C37FABC05509CD000000102</string>
</array> </array>
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key> <key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array> <array>
<array> <array>
<integer>14</integer> <integer>36</integer>
<integer>1</integer> <integer>1</integer>
<integer>0</integer> <integer>0</integer>
</array> </array>
</array> </array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key> <key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
<string>{{0, 0}, {186, 565}}</string> <string>{{0, 438}, {186, 565}}</string>
</dict> </dict>
<key>PBXTopSmartGroupGIDs</key> <key>PBXTopSmartGroupGIDs</key>
<array/> <array/>
@ -305,7 +305,7 @@
<key>PBXProjectModuleGUID</key> <key>PBXProjectModuleGUID</key>
<string>1CE0B20306471E060097A5F4</string> <string>1CE0B20306471E060097A5F4</string>
<key>PBXProjectModuleLabel</key> <key>PBXProjectModuleLabel</key>
<string>SoundController.m</string> <string>Sound.m</string>
<key>PBXSplitModuleInNavigatorKey</key> <key>PBXSplitModuleInNavigatorKey</key>
<dict> <dict>
<key>Split0</key> <key>Split0</key>
@ -313,11 +313,11 @@
<key>PBXProjectModuleGUID</key> <key>PBXProjectModuleGUID</key>
<string>1CE0B20406471E060097A5F4</string> <string>1CE0B20406471E060097A5F4</string>
<key>PBXProjectModuleLabel</key> <key>PBXProjectModuleLabel</key>
<string>SoundController.m</string> <string>Sound.m</string>
<key>_historyCapacity</key> <key>_historyCapacity</key>
<integer>0</integer> <integer>0</integer>
<key>bookmark</key> <key>bookmark</key>
<string>8EABE78B08562281004DF882</string> <string>8E6535B60856432F00E468D9</string>
<key>history</key> <key>history</key>
<array> <array>
<string>8EF6FACD082DAA2B006F7BE6</string> <string>8EF6FACD082DAA2B006F7BE6</string>
@ -338,7 +338,6 @@
<string>8E14E4A5084D089100246BCC</string> <string>8E14E4A5084D089100246BCC</string>
<string>8EC156F5084FEB8900BB24E8</string> <string>8EC156F5084FEB8900BB24E8</string>
<string>8E2752B70850A92E001618CD</string> <string>8E2752B70850A92E001618CD</string>
<string>8E2BC83D0850F56200BEAC36</string>
<string>8EE2A5B808511A1800367489</string> <string>8EE2A5B808511A1800367489</string>
<string>8E72BC640851408F00E34F1D</string> <string>8E72BC640851408F00E34F1D</string>
<string>8EFC6D18085376D100C67D06</string> <string>8EFC6D18085376D100C67D06</string>
@ -347,12 +346,9 @@
<string>8EFC6DF0085380B800C67D06</string> <string>8EFC6DF0085380B800C67D06</string>
<string>8EFC6E29085386CE00C67D06</string> <string>8EFC6E29085386CE00C67D06</string>
<string>8E3EDBC9085477D0007C6A53</string> <string>8E3EDBC9085477D0007C6A53</string>
<string>8E3EDBCF085477D0007C6A53</string>
<string>8E3EDBD1085477D0007C6A53</string>
<string>8E8BAF10085494E000E9F14D</string> <string>8E8BAF10085494E000E9F14D</string>
<string>8E8BAF790854976A00E9F14D</string> <string>8E8BAF790854976A00E9F14D</string>
<string>8E91CCEE08549FEE0055EC68</string> <string>8E91CCEE08549FEE0055EC68</string>
<string>8EB30D890854BEF1009EA87F</string>
<string>8EB30D8A0854BEF1009EA87F</string> <string>8EB30D8A0854BEF1009EA87F</string>
<string>8EB30DAE0854BFEE009EA87F</string> <string>8EB30DAE0854BFEE009EA87F</string>
<string>8EB30DDB0854C261009EA87F</string> <string>8EB30DDB0854C261009EA87F</string>
@ -362,7 +358,6 @@
<string>8EB30DDF0854C261009EA87F</string> <string>8EB30DDF0854C261009EA87F</string>
<string>8EB30DE00854C261009EA87F</string> <string>8EB30DE00854C261009EA87F</string>
<string>8EB30E1F0854C36A009EA87F</string> <string>8EB30E1F0854C36A009EA87F</string>
<string>8EB30E200854C36A009EA87F</string>
<string>8E4D66E90854CD2C00816BEE</string> <string>8E4D66E90854CD2C00816BEE</string>
<string>8E4D66EA0854CD2C00816BEE</string> <string>8E4D66EA0854CD2C00816BEE</string>
<string>8E4D67210854D2E700816BEE</string> <string>8E4D67210854D2E700816BEE</string>
@ -370,29 +365,33 @@
<string>8E8F3F20085543D700BCF803</string> <string>8E8F3F20085543D700BCF803</string>
<string>8E8F3F21085543D700BCF803</string> <string>8E8F3F21085543D700BCF803</string>
<string>8E8F3F22085543D700BCF803</string> <string>8E8F3F22085543D700BCF803</string>
<string>8E8F3F23085543D700BCF803</string>
<string>8E8F3F400855457A00BCF803</string>
<string>8E8F3F59085546B300BCF803</string> <string>8E8F3F59085546B300BCF803</string>
<string>8E8F3F780855483300BCF803</string> <string>8E8F3F780855483300BCF803</string>
<string>8E8F3F790855483300BCF803</string>
<string>8E8F3FA408554B8000BCF803</string> <string>8E8F3FA408554B8000BCF803</string>
<string>8EF45A7A08557C4D00D2D5D0</string> <string>8EF45A7A08557C4D00D2D5D0</string>
<string>8E287CDC0855D60A00562C66</string> <string>8E287CDC0855D60A00562C66</string>
<string>8E287CDD0855D60A00562C66</string> <string>8E287CDD0855D60A00562C66</string>
<string>8E287E580855F35400562C66</string>
<string>8E287E7F0855F60E00562C66</string> <string>8E287E7F0855F60E00562C66</string>
<string>8E287E830855F60E00562C66</string> <string>8E287E830855F60E00562C66</string>
<string>8EAB7544085621B10021C2BF</string> <string>8EAB7544085621B10021C2BF</string>
<string>8EAB7545085621B10021C2BF</string> <string>8EAB7545085621B10021C2BF</string>
<string>8EAB7547085621B10021C2BF</string>
<string>8EAB7549085621B10021C2BF</string> <string>8EAB7549085621B10021C2BF</string>
<string>8EAB754A085621B10021C2BF</string> <string>8EAB754A085621B10021C2BF</string>
<string>8EAB754B085621B10021C2BF</string> <string>8EAB754B085621B10021C2BF</string>
<string>8EAB754C085621B10021C2BF</string> <string>8EAB754C085621B10021C2BF</string>
<string>8EABE78408562281004DF882</string> <string>8EABE78408562281004DF882</string>
<string>8EABE78508562281004DF882</string> <string>8EABE7C308562FF3004DF882</string>
<string>8EABE78608562281004DF882</string> <string>8EABE7C408562FF3004DF882</string>
<string>8EABE78708562281004DF882</string> <string>8EABE7C508562FF3004DF882</string>
<string>8EABE7C608562FF3004DF882</string>
<string>8E5CC5020856316C00A299E0</string>
<string>8E98E5D308563D1B0078CAA1</string>
<string>8E65357F08563F6A00E468D9</string>
<string>8E65358008563F6A00E468D9</string>
<string>8E65358108563F6A00E468D9</string>
<string>8E65359D0856401D00E468D9</string>
<string>8E65359E0856401D00E468D9</string>
<string>8E65357E08563F6A00E468D9</string>
</array> </array>
<key>prevStack</key> <key>prevStack</key>
<array> <array>
@ -454,8 +453,6 @@
<string>8E14E4B5084D089100246BCC</string> <string>8E14E4B5084D089100246BCC</string>
<string>8EC18EBD084E57D500AE0BA9</string> <string>8EC18EBD084E57D500AE0BA9</string>
<string>8EC156F9084FEB8900BB24E8</string> <string>8EC156F9084FEB8900BB24E8</string>
<string>8E3EDBE0085477D0007C6A53</string>
<string>8E3EDBE4085477D0007C6A53</string>
<string>8E8BAEB208548C9600E9F14D</string> <string>8E8BAEB208548C9600E9F14D</string>
<string>8E8BAEB308548C9600E9F14D</string> <string>8E8BAEB308548C9600E9F14D</string>
<string>8E8BAEB708548C9600E9F14D</string> <string>8E8BAEB708548C9600E9F14D</string>
@ -469,8 +466,14 @@
<string>8EAB7555085621B10021C2BF</string> <string>8EAB7555085621B10021C2BF</string>
<string>8EAB755D085621B10021C2BF</string> <string>8EAB755D085621B10021C2BF</string>
<string>8EABE78808562281004DF882</string> <string>8EABE78808562281004DF882</string>
<string>8EABE78908562281004DF882</string> <string>8EABE7CA08562FF3004DF882</string>
<string>8EABE78A08562281004DF882</string> <string>8E65358208563F6A00E468D9</string>
<string>8E65358308563F6A00E468D9</string>
<string>8E65358408563F6A00E468D9</string>
<string>8E65358508563F6A00E468D9</string>
<string>8E65358608563F6A00E468D9</string>
<string>8E65359F0856401D00E468D9</string>
<string>8E6535A00856401D00E468D9</string>
</array> </array>
</dict> </dict>
<key>SplitCount</key> <key>SplitCount</key>
@ -528,9 +531,9 @@
</array> </array>
<key>TableOfContents</key> <key>TableOfContents</key>
<array> <array>
<string>8EABE78C08562281004DF882</string> <string>8E65358808563F6A00E468D9</string>
<string>1CE0B1FE06471DED0097A5F4</string> <string>1CE0B1FE06471DED0097A5F4</string>
<string>8EABE78D08562281004DF882</string> <string>8E65358908563F6A00E468D9</string>
<string>1CE0B20306471E060097A5F4</string> <string>1CE0B20306471E060097A5F4</string>
<string>1CE0B20506471E060097A5F4</string> <string>1CE0B20506471E060097A5F4</string>
</array> </array>
@ -664,6 +667,11 @@
<integer>5</integer> <integer>5</integer>
<key>WindowOrderList</key> <key>WindowOrderList</key>
<array> <array>
<string>8E65359208563F6A00E468D9</string>
<string>8E65359308563F6A00E468D9</string>
<string>8E7A9371083675B600771E14</string>
<string>1CD10A99069EF8BA00B06720</string>
<string>8E65359008563F6A00E468D9</string>
<string>1C0AD2B3069F1EA900FABCE6</string> <string>1C0AD2B3069F1EA900FABCE6</string>
<string>/Users/xugg/Projects/Cog/Cog.xcodeproj</string> <string>/Users/xugg/Projects/Cog/Cog.xcodeproj</string>
</array> </array>
@ -691,7 +699,7 @@
<key>PBXProjectModuleGUID</key> <key>PBXProjectModuleGUID</key>
<string>1CD0528F0623707200166675</string> <string>1CD0528F0623707200166675</string>
<key>PBXProjectModuleLabel</key> <key>PBXProjectModuleLabel</key>
<string>AppController.m</string> <string>Sound.m</string>
<key>StatusBarVisibility</key> <key>StatusBarVisibility</key>
<true/> <true/>
</dict> </dict>
@ -747,7 +755,7 @@
<key>TableOfContents</key> <key>TableOfContents</key>
<array> <array>
<string>8EF6FAA6082DA951006F7BE6</string> <string>8EF6FAA6082DA951006F7BE6</string>
<string>8E287D1F0855DA8900562C66</string> <string>8E98E5B808563ADC0078CAA1</string>
<string>1CD0528F0623707200166675</string> <string>1CD0528F0623707200166675</string>
<string>XCMainBuildResultsModuleGUID</string> <string>XCMainBuildResultsModuleGUID</string>
</array> </array>
@ -789,8 +797,8 @@
<string>yes</string> <string>yes</string>
<key>sizes</key> <key>sizes</key>
<array> <array>
<string>{{0, 0}, {184, 198}}</string> <string>{{0, 0}, {163, 194}}</string>
<string>{{184, 0}, {840, 198}}</string> <string>{{163, 0}, {861, 194}}</string>
</array> </array>
</dict> </dict>
<key>VerticalSplitView</key> <key>VerticalSplitView</key>
@ -805,8 +813,8 @@
<string>yes</string> <string>yes</string>
<key>sizes</key> <key>sizes</key>
<array> <array>
<string>{{0, 0}, {1024, 198}}</string> <string>{{0, 0}, {1024, 194}}</string>
<string>{{0, 198}, {1024, 386}}</string> <string>{{0, 194}, {1024, 390}}</string>
</array> </array>
</dict> </dict>
</dict> </dict>
@ -853,14 +861,14 @@
<key>TableOfContents</key> <key>TableOfContents</key>
<array> <array>
<string>1CD10A99069EF8BA00B06720</string> <string>1CD10A99069EF8BA00B06720</string>
<string>8E8F3E55085538AB00BCF803</string> <string>8E65358A08563F6A00E468D9</string>
<string>1C162984064C10D400B95A72</string> <string>1C162984064C10D400B95A72</string>
<string>8E8F3E56085538AB00BCF803</string> <string>8E65358B08563F6A00E468D9</string>
<string>8E8F3E57085538AB00BCF803</string> <string>8E65358C08563F6A00E468D9</string>
<string>8E8F3E58085538AB00BCF803</string> <string>8E65358D08563F6A00E468D9</string>
<string>8E8F3E59085538AB00BCF803</string> <string>8E65358E08563F6A00E468D9</string>
<string>8E8F3E5A085538AB00BCF803</string> <string>8E65358F08563F6A00E468D9</string>
<string>8E8F3E5B085538AB00BCF803</string> <string>8E65359008563F6A00E468D9</string>
</array> </array>
<key>ToolbarConfiguration</key> <key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.debug</string> <string>xcode.toolbar.config.debug</string>
@ -892,7 +900,7 @@
<key>PBXProjectModuleGUID</key> <key>PBXProjectModuleGUID</key>
<string>1CDD528C0622207200134675</string> <string>1CDD528C0622207200134675</string>
<key>PBXProjectModuleLabel</key> <key>PBXProjectModuleLabel</key>
<string>Sound.m</string> <string>DBLog.c</string>
<key>StatusBarVisibility</key> <key>StatusBarVisibility</key>
<true/> <true/>
</dict> </dict>
@ -950,8 +958,8 @@
<key>TableOfContents</key> <key>TableOfContents</key>
<array> <array>
<string>1C530D57069F1CE1000CFCEE</string> <string>1C530D57069F1CE1000CFCEE</string>
<string>8E4D67990854E47400816BEE</string> <string>8E37C10A0856312D00A0FFA6</string>
<string>8E4D679A0854E47400816BEE</string> <string>8E37C10B0856312D00A0FFA6</string>
<string>1CDD528C0622207200134675</string> <string>1CDD528C0622207200134675</string>
<string>1CD0528E0623707200166675</string> <string>1CD0528E0623707200166675</string>
</array> </array>
@ -960,7 +968,7 @@
<key>WindowToolGUID</key> <key>WindowToolGUID</key>
<string>1C530D57069F1CE1000CFCEE</string> <string>1C530D57069F1CE1000CFCEE</string>
<key>WindowToolIsVisible</key> <key>WindowToolIsVisible</key>
<false/> <true/>
</dict> </dict>
<dict> <dict>
<key>Identifier</key> <key>Identifier</key>
@ -1014,7 +1022,7 @@
<key>TableOfContents</key> <key>TableOfContents</key>
<array> <array>
<string>8E7A9371083675B600771E14</string> <string>8E7A9371083675B600771E14</string>
<string>8E8F3E5C085538AB00BCF803</string> <string>8E65359108563F6A00E468D9</string>
<string>1C78EAAC065D492600B07095</string> <string>1C78EAAC065D492600B07095</string>
</array> </array>
<key>WindowString</key> <key>WindowString</key>
@ -1059,8 +1067,8 @@
<string>yes</string> <string>yes</string>
<key>sizes</key> <key>sizes</key>
<array> <array>
<string>{{0, 0}, {367, 168}}</string> <string>{{0, 0}, {493, 168}}</string>
<string>{{0, 173}, {367, 270}}</string> <string>{{0, 173}, {493, 270}}</string>
</array> </array>
</dict> </dict>
<key>VerticalSplitView</key> <key>VerticalSplitView</key>
@ -1109,9 +1117,9 @@
<key>TableOfContents</key> <key>TableOfContents</key>
<array> <array>
<string>1C0AD2B3069F1EA900FABCE6</string> <string>1C0AD2B3069F1EA900FABCE6</string>
<string>8EABE77B085621E4004DF882</string> <string>8E65356C08563D5600E468D9</string>
<string>1CD0528B0623707200166675</string> <string>1CD0528B0623707200166675</string>
<string>8EABE77C085621E4004DF882</string> <string>8E65356D08563D5600E468D9</string>
</array> </array>
<key>ToolbarConfiguration</key> <key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.run</string> <string>xcode.toolbar.config.run</string>

File diff suppressed because it is too large Load diff

View file

@ -23,7 +23,7 @@
- (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo - (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo
{ {
NSLog(@"CONTEXT: %i", contextInfo); DBLog(@"CONTEXT: %i", contextInfo);
if (contextInfo == YES) if (contextInfo == YES)
{ {
[feedbackWindow close]; [feedbackWindow close];

View file

@ -42,7 +42,7 @@ NSString *encodeForURL(NSString *s)
NSURLResponse* response; NSURLResponse* response;
NSData* resultData = [NSURLConnection sendSynchronousRequest:post returningResponse:&response error:&error]; NSData* resultData = [NSURLConnection sendSynchronousRequest:post returningResponse:&response error:&error];
NSString *resultString = [[[NSString alloc] initWithData:resultData encoding:NSASCIIStringEncoding] autorelease]; NSString *resultString = [[[NSString alloc] initWithData:resultData encoding:NSASCIIStringEncoding] autorelease];
NSLog(@"RESULT: %@", resultString); DBLog(@"RESULT: %@", resultString);
if ([resultString caseInsensitiveCompare:@"SUCCESS"] == NSOrderedSame) if ([resultString caseInsensitiveCompare:@"SUCCESS"] == NSOrderedSame)
{ {
[self performSelectorOnMainThread:@selector(returnSuccess:) withObject:nil waitUntilDone:NO]; [self performSelectorOnMainThread:@selector(returnSuccess:) withObject:nil waitUntilDone:NO];

View file

@ -222,7 +222,7 @@
if (tag) if (tag)
{ {
NSLog(@"TAG: %i", tag); DBLog(@"TAG: %i", tag);
char *pArtist, *pTitle, *pAlbum, *pGenre, *pComment; char *pArtist, *pTitle, *pAlbum, *pGenre, *pComment;

View file

@ -121,7 +121,7 @@ enum
- (void)playFile:(NSString *)filename; - (void)playFile:(NSString *)filename;
- (void)changeFile:(NSString *)filename; - (void)changeFile:(NSString *)filename;
- (void)setSoundFile:(NSString *)filename; - (BOOL)setSoundFile:(NSString *)filename;
//helper function //helper function
- (double)calculateTime:(unsigned long) pos; - (double)calculateTime:(unsigned long) pos;

35
Sound.m
View file

@ -93,7 +93,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
amountAvailable = [sound->readRingBuffer lengthAvailableToReadReturningPointer:&readPointer]; amountAvailable = [sound->readRingBuffer lengthAvailableToReadReturningPointer:&readPointer];
if (sound->playbackStatus == kCogStatusEndOfFile && amountAvailable == 0) if (sound->playbackStatus == kCogStatusEndOfFile && amountAvailable == 0)
{ {
// DBLog(@"FILE CHANGED!!!!!"); DBLog(@"FILE CHANGED!!!!!");
[sound sendPortMessage:kCogFileChangedMessage]; [sound sendPortMessage:kCogFileChangedMessage];
sound->readRingBuffer = [sound oppositeBuffer:sound->readRingBuffer]; sound->readRingBuffer = [sound oppositeBuffer:sound->readRingBuffer];
@ -249,10 +249,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
if (portMessage) if (portMessage)
{ {
NSDate *date = [[NSDate alloc] initWithTimeIntervalSinceNow:20.0];//give shit a little time to send, just in case...may come back to bite me NSDate *date = [[NSDate alloc] initWithTimeIntervalSinceNow:20.0];//give shit a little time to send, just in case...may come back to bite me
if ([date laterDate:[NSDate date]] != date)
{
DBLog(@"WTF");
}
[portMessage setMsgid:msgid]; [portMessage setMsgid:msgid];
DBLog(@"Sending message: %i", msgid); DBLog(@"Sending message: %i", msgid);
@ -311,7 +308,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
{ {
[self playFile:s]; [self playFile:s];
} }
else if (kCogChangeFileMessage) //change the file, usually in response to a nexttrack request else if (msgid == kCogChangeFileMessage) //change the file, usually in response to a nexttrack request
{ {
[self changeFile:s]; [self changeFile:s];
} }
@ -414,7 +411,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
// convertedSize = [self convert:writePointer packets:(amountAvailable/deviceFormat.mBytesPerPacket)]; // convertedSize = [self convert:writePointer packets:(amountAvailable/deviceFormat.mBytesPerPacket)];
if (playbackStatus == kCogStatusPlaying && convertedSize == 0) if (playbackStatus == kCogStatusPlaying && convertedSize == 0)
{ {
// DBLog(@"NEXT!!!!"); DBLog(@"NEXT!!!!");
[self sendPortMessage:kCogRequestNextFileMessage]; [self sendPortMessage:kCogRequestNextFileMessage];
writeRingBuffer = [self oppositeBuffer:writeRingBuffer]; writeRingBuffer = [self oppositeBuffer:writeRingBuffer];
@ -680,8 +677,14 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
// [self stop]; // [self stop];
DBLog(@"PLAYING FILE"); DBLog(@"PLAYING FILE");
[self setSoundFile:filename]; if (![self setSoundFile:filename])
{
DBLog(@"NOT PLAYING FILE");
[self stop];
return;
}
DBLog(@"DONT LIKE THIS, HUH?"); DBLog(@"DONT LIKE THIS, HUH?");
[readLock lock]; [readLock lock];
@ -704,8 +707,8 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
- (void)changeFile:(NSString *)filename - (void)changeFile:(NSString *)filename
{ {
[self setSoundFile:filename]; if ([self setSoundFile:filename])
[self fireFillTimer]; [self fireFillTimer];
} }
- (void)resetBuffer - (void)resetBuffer
@ -725,16 +728,26 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
[writeLock unlock]; [writeLock unlock];
} }
- (void)setSoundFile:(NSString *)filename - (BOOL)setSoundFile:(NSString *)filename
{ {
[self cleanUpSoundFile]; [self cleanUpSoundFile];
[soundFile release]; [soundFile release];
//GO THROUGH HELLA SHIT TO DETERMINE FILE...NEED TO MAKE SOME KIND OF REGISTERING MECHANISM //GO THROUGH HELLA SHIT TO DETERMINE FILE...NEED TO MAKE SOME KIND OF REGISTERING MECHANISM
soundFile = [SoundFile open:filename]; soundFile = [SoundFile open:filename];
if (!soundFile)
{
DBLog(@"NEW SONG SETSOUNDFILE");
[self sendPortMessage:kCogFileChangedMessage];
[self setPlaybackStatus:kCogStatusEndOfPlaylist];
// [self sendPortMessage:kCogRequestNextFileMessage];
return NO;
}
// DBLog(@"File opened: %s", [filename UTF8String]); // DBLog(@"File opened: %s", [filename UTF8String]);
[self prepareSoundFile]; [self prepareSoundFile];
return YES;
} }

View file

@ -56,7 +56,7 @@
{ {
SoundFile *soundFile; SoundFile *soundFile;
if ([[filename pathExtension] isEqualToString:@"wav"] || [[filename pathExtension] isEqualToString:@"aiff"]) if ([[filename pathExtension] isEqualToString:@"wav"] || [[filename pathExtension] isEqualToString:@"aiff"] || [[filename pathExtension] isEqualToString:@"aif"])
{ {
soundFile = [[WaveFile alloc] init]; soundFile = [[WaveFile alloc] init];
} }