Clean up lots of warnings and minor issues.

CQTexperiment
Chris Moeller 2016-06-29 22:10:29 -07:00
parent 7876a4492f
commit 17272ce43c
160 changed files with 7155 additions and 7357 deletions

View File

@ -154,8 +154,8 @@
[[playlistController undoManager] enableUndoRegistration];
int lastStatus = [[NSUserDefaults standardUserDefaults] integerForKey:@"lastPlaybackStatus"];
int lastIndex = [[NSUserDefaults standardUserDefaults] integerForKey:@"lastTrackPlaying"];
int lastStatus = (int) [[NSUserDefaults standardUserDefaults] integerForKey:@"lastPlaybackStatus"];
int lastIndex = (int) [[NSUserDefaults standardUserDefaults] integerForKey:@"lastTrackPlaying"];
if (lastStatus != kCogStatusStopped && lastIndex >= 0)
{

View File

@ -122,7 +122,7 @@ NSString *CogPlaybackDidStopNotficiation = @"CogPlaybackDidStopNotficiation";
[playlistView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
if ([playlistView selectedRow] > -1)
[self playEntryAtIndex:[playlistView selectedRow]];
[self playEntryAtIndex:(int)[playlistView selectedRow]];
}
NSDictionary * makeRGInfo(PlaylistEntry *pe)

View File

@ -80,7 +80,7 @@
- (BOOL)endOfInputReached:(BufferChain *)sender;
- (void)setShouldContinue:(BOOL)s;
- (BufferChain *)bufferChain;
//- (BufferChain *)bufferChain;
- (void)launchOutputThread;
- (void)endOfInputPlayed;
- (void)sendDelegateMethod:(SEL)selector withObject:(id)obj waitUntilDone:(BOOL)wait;

View File

@ -55,7 +55,7 @@
- (Semaphore *)semaphore;
-(void)resetBuffer;
//-(void)resetBuffer;
- (BOOL)endOfStream;
- (void)setEndOfStream:(BOOL)e;

View File

@ -362,7 +362,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
TargetAttributes = {
8DC2EF4F0486A6940098B216 = {
DevelopmentTeam = N6E749HJ2X;
@ -485,9 +485,23 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
@ -501,9 +515,22 @@
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PREBINDING = NO;

View File

@ -68,7 +68,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
NSNumber *deviceID = [device objectForKey:@"deviceID"];
[self setOutputDevice:[deviceID longValue]];
[self setOutputDevice:(AudioDeviceID)[deviceID longValue]];
}
}
@ -151,7 +151,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
// Setup the output device before mucking with settings
NSDictionary *device = [[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"outputDevice"];
if (device) {
BOOL ok = [self setOutputDevice:[[device objectForKey:@"deviceID"] longValue]];
BOOL ok = [self setOutputDevice:(AudioDeviceID)[[device objectForKey:@"deviceID"] longValue]];
if (!ok) {
//Ruh roh.
[self setOutputDevice: -1];
@ -276,7 +276,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc
&deviceFormat,
size);
size = sizeof(deviceChannelMap);
size = (unsigned int) sizeof(deviceChannelMap);
err = AudioUnitSetProperty(outputUnit,
kAudioOutputUnitProperty_ChannelMap,
kAudioUnitScope_Output,

View File

@ -34,7 +34,7 @@ static void deallocateVirtualBuffer(void *buffer, UInt32 bufferLength);
return nil;
// We need to allocate entire VM pages, so round the specified length up to the next page if necessary.
bufferLength = round_page(length);
bufferLength = (UInt32) round_page(length);
buffer = allocateVirtualBuffer(bufferLength);
if (buffer) {
@ -106,10 +106,10 @@ static void deallocateVirtualBuffer(void *buffer, UInt32 bufferLength);
length = 0;
} else if (localWritePointer > readPointer) {
// Write is ahead of read in the buffer
length = localWritePointer - readPointer;
length = (UInt32)(localWritePointer - readPointer);
} else {
// Write has wrapped around past read, OR write == read (the buffer is full)
length = bufferLength - (readPointer - localWritePointer);
length = (UInt32)(bufferLength - (readPointer - localWritePointer));
}
*returnedReadPointer = readPointer;
@ -165,10 +165,10 @@ static void deallocateVirtualBuffer(void *buffer, UInt32 bufferLength);
length = bufferLength;
} else if (writePointer <= localReadPointer) {
// Write is before read in the buffer, OR write == read (meaning that the buffer is full).
length = localReadPointer - writePointer;
length = (UInt32)(localReadPointer - writePointer);
} else {
// Write is behind read in the buffer. The available space wraps around.
length = (bufferEnd - writePointer) + (localReadPointer - buffer);
length = (UInt32)((bufferEnd - writePointer) + (localReadPointer - buffer));
}
*returnedWritePointer = writePointer;

View File

@ -95,7 +95,7 @@ addressForHost(NSString *hostname)
- (void) send:(NSString *)data
{
const char *utf8data = [data UTF8String];
unsigned len = strlen(utf8data);
unsigned len = (unsigned int) strlen(utf8data);
unsigned bytesToSend = len;
unsigned totalBytesSent = 0;
ssize_t bytesSent = 0;

View File

@ -10,7 +10,7 @@
07D971E60ED1DAA800E7602E /* TagEditorController.m in Sources */ = {isa = PBXBuildFile; fileRef = 07D971E50ED1DAA800E7602E /* TagEditorController.m */; };
07E18DF30D62B38400BB0E11 /* NSArray+ShuffleUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 07E18DF20D62B38400BB0E11 /* NSArray+ShuffleUtils.m */; };
170680630B950158006BA573 /* Growl.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 170680620B950158006BA573 /* Growl.framework */; };
170680840B950164006BA573 /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 170680620B950158006BA573 /* Growl.framework */; };
170680840B950164006BA573 /* Growl.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 170680620B950158006BA573 /* Growl.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
170B55940D6E5E7B006B9E92 /* StatusImageTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 170B55930D6E5E7B006B9E92 /* StatusImageTransformer.m */; };
171B57DD0C091F2B00F6AFAF /* flac.icns in Resources */ = {isa = PBXBuildFile; fileRef = 171B57D90C091F2B00F6AFAF /* flac.icns */; };
171B57DE0C091F2B00F6AFAF /* m4a.icns in Resources */ = {isa = PBXBuildFile; fileRef = 171B57DA0C091F2B00F6AFAF /* m4a.icns */; };
@ -88,17 +88,17 @@
17BB5CFA0B8A86350009ACB1 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17BB5CF70B8A86350009ACB1 /* CoreAudio.framework */; };
17BB5CFB0B8A86350009ACB1 /* CoreAudioKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17BB5CF80B8A86350009ACB1 /* CoreAudioKit.framework */; };
17BB5EA60B8A87850009ACB1 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17BB5EA50B8A87850009ACB1 /* IOKit.framework */; };
17C809910C3BD201005707C4 /* WavPack.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808C80C3BD1DD005707C4 /* WavPack.bundle */; };
17C809920C3BD206005707C4 /* Vorbis.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808BF0C3BD1D2005707C4 /* Vorbis.bundle */; };
17C809930C3BD21D005707C4 /* TagLib.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808B60C3BD1C5005707C4 /* TagLib.bundle */; };
17C809940C3BD220005707C4 /* Shorten.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808AF0C3BD1BA005707C4 /* Shorten.bundle */; };
17C809950C3BD223005707C4 /* Musepack.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808A60C3BD1AB005707C4 /* Musepack.bundle */; };
17C809980C3BD22E005707C4 /* HTTPSource.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C8088B0C3BD181005707C4 /* HTTPSource.bundle */; };
17C809990C3BD231005707C4 /* Flac.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808820C3BD173005707C4 /* Flac.bundle */; };
17C8099A0C3BD233005707C4 /* FileSource.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808790C3BD167005707C4 /* FileSource.bundle */; };
17C809E60C3BD487005707C4 /* CoreAudio.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C809E30C3BD46D005707C4 /* CoreAudio.bundle */; };
17C8F3CF0CBED66C008D969D /* GME.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C8F3CD0CBED663008D969D /* GME.bundle */; };
17C8F7D80CBEF3EF008D969D /* Dumb.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C8F7D70CBEF3E8008D969D /* Dumb.bundle */; };
17C809910C3BD201005707C4 /* WavPack.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808C80C3BD1DD005707C4 /* WavPack.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C809920C3BD206005707C4 /* Vorbis.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808BF0C3BD1D2005707C4 /* Vorbis.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C809930C3BD21D005707C4 /* TagLib.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808B60C3BD1C5005707C4 /* TagLib.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C809940C3BD220005707C4 /* Shorten.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808AF0C3BD1BA005707C4 /* Shorten.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C809950C3BD223005707C4 /* Musepack.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808A60C3BD1AB005707C4 /* Musepack.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C809980C3BD22E005707C4 /* HTTPSource.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C8088B0C3BD181005707C4 /* HTTPSource.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C809990C3BD231005707C4 /* Flac.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808820C3BD173005707C4 /* Flac.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C8099A0C3BD233005707C4 /* FileSource.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C808790C3BD167005707C4 /* FileSource.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C809E60C3BD487005707C4 /* CoreAudio.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C809E30C3BD46D005707C4 /* CoreAudio.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C8F3CF0CBED66C008D969D /* GME.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C8F3CD0CBED663008D969D /* GME.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17C8F7D80CBEF3EF008D969D /* Dumb.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17C8F7D70CBEF3E8008D969D /* Dumb.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17D1B0D20F6320EA00694C57 /* InfoInspector.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17D1B0D00F6320EA00694C57 /* InfoInspector.xib */; };
17D1B1010F63255200694C57 /* InfoWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D1B1000F63255200694C57 /* InfoWindowController.m */; };
17D1B1680F632ABB00694C57 /* BlankZeroFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 17D1B1630F632ABB00694C57 /* BlankZeroFormatter.m */; };
@ -122,8 +122,8 @@
17E0D61C0F520F9F005B6FED /* VolumeButton.m in Sources */ = {isa = PBXBuildFile; fileRef = 17E0D6190F520F9F005B6FED /* VolumeButton.m */; };
17E0D61D0F520F9F005B6FED /* VolumeSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 17E0D61B0F520F9F005B6FED /* VolumeSlider.m */; };
17E41E070C130DFF00AC744D /* Credits.html in Resources */ = {isa = PBXBuildFile; fileRef = 17E41E060C130DFF00AC744D /* Credits.html */; };
17F3BB890CBC565900864489 /* CueSheet.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F3BB880CBC565100864489 /* CueSheet.bundle */; };
17F561400C3BD4F30019975C /* CogAudio.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F561330C3BD4DC0019975C /* CogAudio.framework */; };
17F3BB890CBC565900864489 /* CueSheet.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F3BB880CBC565100864489 /* CueSheet.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17F561400C3BD4F30019975C /* CogAudio.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F561330C3BD4DC0019975C /* CogAudio.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
17F562390C3BD91B0019975C /* General.preferencePane in Resources */ = {isa = PBXBuildFile; fileRef = 17F5622E0C3BD8FB0019975C /* General.preferencePane */; };
17F6C8070F603701000D9DA9 /* PlaybackEventController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17F6C8060F603701000D9DA9 /* PlaybackEventController.m */; };
17FAEBAC0F662985007C8707 /* ToolTipTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = 17FAEBAB0F662985007C8707 /* ToolTipTextField.m */; };
@ -137,14 +137,14 @@
832C1253180BD1E2005507C1 /* Cog.help in Resources */ = {isa = PBXBuildFile; fileRef = 832C1252180BD1E2005507C1 /* Cog.help */; };
8355D6B6180612F300D05687 /* NSData+MD5.m in Sources */ = {isa = PBXBuildFile; fileRef = 8355D6B5180612F300D05687 /* NSData+MD5.m */; };
8355D6B8180613FB00D05687 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8355D6B7180613FB00D05687 /* Security.framework */; };
8359009D17FF06570060F3ED /* ArchiveSource.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8359FF3117FEF35D0060F3ED /* ArchiveSource.bundle */; };
835CBC8118DA7A520087A03E /* modplay.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 835CBC7618DA79F80087A03E /* modplay.bundle */; };
8360EF6D17F92E56005208A4 /* HighlyComplete.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8360EF0517F92B24005208A4 /* HighlyComplete.bundle */; };
8359009D17FF06570060F3ED /* ArchiveSource.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8359FF3117FEF35D0060F3ED /* ArchiveSource.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
835CBC8118DA7A520087A03E /* modplay.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 835CBC7618DA79F80087A03E /* modplay.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
8360EF6D17F92E56005208A4 /* HighlyComplete.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8360EF0517F92B24005208A4 /* HighlyComplete.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
836D28A818086386005B7299 /* MiniModeMenuTitleTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 836D28A718086386005B7299 /* MiniModeMenuTitleTransformer.m */; };
836F5BF91A357A01002730CC /* sidplay.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8314D6411A354DFF00EEE8E6 /* sidplay.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
836F706218BDD1230095E648 /* vgmstream.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 836F6B2E18BDB80E0095E648 /* vgmstream.bundle */; };
836FB5A718206F2500B3AD2D /* Hively.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 836FB5471820538800B3AD2D /* Hively.bundle */; };
8375B36517FFEF130092A79F /* Opus.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8375B05717FFEA410092A79F /* Opus.bundle */; };
836F706218BDD1230095E648 /* vgmstream.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 836F6B2E18BDB80E0095E648 /* vgmstream.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
836FB5A718206F2500B3AD2D /* Hively.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 836FB5471820538800B3AD2D /* Hively.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
8375B36517FFEF130092A79F /* Opus.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8375B05717FFEA410092A79F /* Opus.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
83790D501809F4980073CF51 /* NSObject+SPInvocationGrabbing.m in Sources */ = {isa = PBXBuildFile; fileRef = 83790D4D1809F4980073CF51 /* NSObject+SPInvocationGrabbing.m */; };
83790D511809F4980073CF51 /* SPMediaKeyTap.m in Sources */ = {isa = PBXBuildFile; fileRef = 83790D4F1809F4980073CF51 /* SPMediaKeyTap.m */; };
838491211807F38A00E7332D /* NowPlayingBarView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8384911D1807F38A00E7332D /* NowPlayingBarView.m */; };
@ -180,15 +180,15 @@
83849173180843B200E7332D /* playDockBadgeColorful.png in Resources */ = {isa = PBXBuildFile; fileRef = 83849170180843B200E7332D /* playDockBadgeColorful.png */; };
83849174180843B200E7332D /* stopDockBadgeColorful.png in Resources */ = {isa = PBXBuildFile; fileRef = 83849171180843B200E7332D /* stopDockBadgeColorful.png */; };
838491871808591F00E7332D /* NDHotKey.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8384917E1808585D00E7332D /* NDHotKey.framework */; };
838491881808593200E7332D /* NDHotKey.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8384917E1808585D00E7332D /* NDHotKey.framework */; };
838491881808593200E7332D /* NDHotKey.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8384917E1808585D00E7332D /* NDHotKey.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
8399D4E21805A55000B503B1 /* XmlContainer.m in Sources */ = {isa = PBXBuildFile; fileRef = 8399D4E01805A55000B503B1 /* XmlContainer.m */; };
839BD010196521E600947767 /* BASSMODS.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 839BCFEC1965133F00947767 /* BASSMODS.bundle */; };
83A0F4E31816DBF900119DB4 /* playptmod.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83A0F4891816CE5E00119DB4 /* playptmod.bundle */; };
83B06704180D579E008E3612 /* MIDI.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83B066A1180D5669008E3612 /* MIDI.bundle */; };
83BCB8DE17FC971300760340 /* FFMPEG.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = B09E94350D747F7B0064F138 /* FFMPEG.bundle */; };
839BD010196521E600947767 /* BASSMODS.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 839BCFEC1965133F00947767 /* BASSMODS.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
83A0F4E31816DBF900119DB4 /* playptmod.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83A0F4891816CE5E00119DB4 /* playptmod.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
83B06704180D579E008E3612 /* MIDI.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83B066A1180D5669008E3612 /* MIDI.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
83BCB8DE17FC971300760340 /* FFMPEG.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = B09E94350D747F7B0064F138 /* FFMPEG.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
83E5E54C18087CA5001F3284 /* miniModeOffTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 83E5E54A18087CA5001F3284 /* miniModeOffTemplate.pdf */; };
83E5E54D18087CA5001F3284 /* miniModeOnTemplate.pdf in Resources */ = {isa = PBXBuildFile; fileRef = 83E5E54B18087CA5001F3284 /* miniModeOnTemplate.pdf */; };
83E6B7621816136F00D4576D /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83E6B759181612FD00D4576D /* Sparkle.framework */; };
83E6B7621816136F00D4576D /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83E6B759181612FD00D4576D /* Sparkle.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
83E6B7651816178200D4576D /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83E6B759181612FD00D4576D /* Sparkle.framework */; };
83EEAB241C965C56002761C5 /* Syntrax.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83EEAAFA1C9651D8002761C5 /* Syntrax.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
83F9D8071A884C54007ABEC2 /* SilenceDecoder.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 83F9D7F61A884B46007ABEC2 /* SilenceDecoder.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
@ -206,10 +206,10 @@
8E75757409F31D5A0080F1EE /* PlaylistView.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E75753209F31D5A0080F1EE /* PlaylistView.m */; };
8E75757509F31D5A0080F1EE /* Shuffle.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E75753409F31D5A0080F1EE /* Shuffle.m */; };
8E7575DB09F31E930080F1EE /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8E7575D909F31E930080F1EE /* Localizable.strings */; };
8E8D40880CBB038E00135C1B /* M3u.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8E8D40870CBB036600135C1B /* M3u.bundle */; };
8E8D41C80CBB0DA900135C1B /* Pls.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8E8D41C70CBB0DA000135C1B /* Pls.bundle */; };
8E8D40880CBB038E00135C1B /* M3u.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8E8D40870CBB036600135C1B /* M3u.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
8E8D41C80CBB0DA900135C1B /* Pls.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 8E8D41C70CBB0DA000135C1B /* Pls.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
8E9A30160BA792DC0091081B /* NSFileHandle+CreateFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E9A30140BA792DC0091081B /* NSFileHandle+CreateFile.m */; };
99EAACA80DD1BB7A00423C38 /* APL.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 566D321B0D538550004466A5 /* APL.bundle */; };
99EAACA80DD1BB7A00423C38 /* APL.bundle in CopyFiles */ = {isa = PBXBuildFile; fileRef = 566D321B0D538550004466A5 /* APL.bundle */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
B09E96630D74A7BC0064F138 /* stop_current.png in Resources */ = {isa = PBXBuildFile; fileRef = B09E96620D74A7BC0064F138 /* stop_current.png */; };
F6F96719102C709000D2C9B4 /* NSString+FinderCompare.m in Sources */ = {isa = PBXBuildFile; fileRef = F6F96718102C709000D2C9B4 /* NSString+FinderCompare.m */; };
/* End PBXBuildFile section */
@ -939,7 +939,7 @@
56DB08540D67185300453B6A /* NSArray+CogSort.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+CogSort.m"; path = "Spotlight/NSArray+CogSort.m"; sourceTree = "<group>"; };
8314D63B1A354DFE00EEE8E6 /* sidplay.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = sidplay.xcodeproj; path = Plugins/sidplay/sidplay.xcodeproj; sourceTree = "<group>"; };
832C1252180BD1E2005507C1 /* Cog.help */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Cog.help; sourceTree = "<group>"; };
833F681E1CDBCAA700AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
833F681E1CDBCAA700AFB9F0 /* es */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
833F681F1CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = "<group>"; };
833F68201CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/InfoInspector.xib; sourceTree = "<group>"; };
833F68211CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/MainMenu.xib; sourceTree = "<group>"; };
@ -1935,7 +1935,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0500;
LastUpgradeCheck = 0800;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Cog" */;
compatibilityVersion = "Xcode 3.2";
@ -2787,22 +2787,14 @@
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
ThirdParty/Frameworks/,
"\"$(SRCROOT)/build/Release\"",
);
FRAMEWORK_SEARCH_PATHS = ThirdParty/Frameworks;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/build/Release/FFMPEG.framework\"",
"\"$(SRCROOT)/ID3/libid3\"",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_CFLAGS = (
"-D__MACOSX__",
"-DHAVE_CONFIG_H",
@ -2813,10 +2805,10 @@
"-undefined",
dynamic_lookup,
);
PRODUCT_BUNDLE_IDENTIFIER = org.cogx.cog;
PRODUCT_NAME = Cog;
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
ZERO_LINK = NO;
};
name = Debug;
};
@ -2825,19 +2817,11 @@
buildSettings = {
CODE_SIGN_IDENTITY = "Developer ID Application";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
ThirdParty/Frameworks/,
"\"$(SRCROOT)/build/Release\"",
);
FRAMEWORK_SEARCH_PATHS = ThirdParty/Frameworks;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_MODEL_TUNING = G5;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/build/Release/FFMPEG.framework\"",
"\"$(SRCROOT)/ID3/libid3\"",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_CFLAGS = (
"-D__MACOSX__",
"-DHAVE_CONFIG_H",
@ -2849,7 +2833,9 @@
"-undefined",
dynamic_lookup,
);
PRODUCT_BUNDLE_IDENTIFIER = org.cogx.cog;
PRODUCT_NAME = Cog;
PROVISIONING_PROFILE_SPECIFIER = N6E749HJ2X/;
SDKROOT = macosx;
WRAPPER_EXTENSION = app;
};
@ -2858,9 +2844,25 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
@ -2872,9 +2874,23 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PREBINDING = NO;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0730"
LastUpgradeVersion = "0800"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"

View File

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11129.15" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1050" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
<deployment identifier="macosx"/>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11129.15"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="FeedbackController">
@ -15,7 +16,7 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Send Feedback" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="1" userLabel="FeedbackWindow">
<windowStyleMask key="styleMask" titled="YES" closable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>

View File

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11129.15" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1050" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
<deployment identifier="macosx"/>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11129.15"/>
<capability name="box content view" minToolsVersion="7.0"/>
</dependencies>
<objects>
@ -14,7 +15,7 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<customObject id="9" userLabel="FileTreeDataSource" customClass="FileTreeDataSource">
<connections>
<outlet property="outlineView" destination="69" id="88"/>
@ -47,7 +48,7 @@
</binding>
</connections>
</pathControl>
<box title="Box" boxType="custom" titlePosition="noTitle" id="147">
<box title="Box" boxType="custom" borderType="line" titlePosition="noTitle" id="147">
<rect key="frame" x="0.0" y="373" width="300" height="1"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" flexibleMinY="YES"/>
<view key="contentView" id="Dg2-ay-LZH">
@ -66,7 +67,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<outlineView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" selectionHighlightStyle="sourceList" columnReordering="NO" autosaveColumns="NO" autosaveName="FileTree" rowHeight="18" indentationPerLevel="14" autoresizesOutlineColumn="YES" outlineTableColumn="70" id="69" customClass="FileTreeOutlineView">
<rect key="frame" x="0.0" y="0.0" width="300" height="373"/>
<rect key="frame" x="0.0" y="0.0" width="300" height="23"/>
<autoresizingMask key="autoresizingMask" flexibleMaxY="YES"/>
<size key="intercellSpacing" width="3" height="5"/>
<color key="backgroundColor" name="_sourceListBackgroundColor" catalog="System" colorSpace="catalog"/>

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11129.15" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1050" defaultVersion="1070" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4510"/>
<deployment identifier="macosx"/>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11129.15"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication">
@ -12,14 +13,14 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<window title="Cog" allowsToolTipsWhenApplicationIsInactive="NO" oneShot="NO" releasedWhenClosed="NO" wantsToBeColor="NO" visibleAtLaunch="NO" frameAutosaveName="Cog" animationBehavior="default" id="21" userLabel="Window" customClass="MainWindow">
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Cog" allowsToolTipsWhenApplicationIsInactive="NO" oneShot="NO" releasedWhenClosed="NO" visibleAtLaunch="NO" frameAutosaveName="Cog" animationBehavior="default" id="21" userLabel="Window" customClass="MainWindow">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" unifiedTitleAndToolbar="YES"/>
<windowCollectionBehavior key="collectionBehavior" fullScreenPrimary="YES"/>
<windowPositionMask key="initialPositionMask" topStrut="YES"/>
<rect key="contentRect" x="331" y="367" width="800" height="400"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<value key="minSize" type="size" width="400" height="400"/>
<value key="minSize" type="size" width="400" height="200"/>
<view key="contentView" id="2">
<rect key="frame" x="0.0" y="0.0" width="800" height="400"/>
<autoresizingMask key="autoresizingMask"/>
@ -52,7 +53,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView focusRingType="none" verticalHuggingPriority="750" allowsExpansionToolTips="YES" alternatingRowBackgroundColors="YES" autosaveName="Playlist" rowHeight="18" headerView="1517" id="207" customClass="PlaylistView">
<rect key="frame" x="0.0" y="0.0" width="800" height="360"/>
<rect key="frame" x="0.0" y="0.0" width="800" height="24"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<size key="intercellSpacing" width="3" height="6"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
@ -85,7 +86,7 @@
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="headerColor" catalog="System" colorSpace="catalog"/>
</tableHeaderCell>
<imageCell key="dataCell" controlSize="small" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="B847B194-BBAF-4B8C-B139-D0EA4FFCEBAA" id="1801">
<imageCell key="dataCell" controlSize="small" refusesFirstResponder="YES" alignment="left" imageScaling="proportionallyDown" image="D5398B17-F6F7-4626-81A6-FA2C43FE26B4" id="1801">
<font key="font" metaFont="system"/>
</imageCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
@ -297,11 +298,11 @@
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" id="1516">
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="1516">
<rect key="frame" x="-100" y="-100" width="683" height="15"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" id="1515">
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="1515">
<rect key="frame" x="85" y="17" width="15" height="68"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
@ -333,7 +334,7 @@
<segmentedControl key="view" verticalHuggingPriority="750" id="1537" customClass="PlaybackButtons">
<rect key="frame" x="0.0" y="14" width="121" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<segmentedCell key="cell" state="on" alignment="left" style="automatic" trackingMode="momentary" id="1538">
<segmentedCell key="cell" state="on" borderStyle="border" alignment="left" style="automatic" trackingMode="momentary" id="1538">
<font key="font" metaFont="system"/>
<segments>
<segment toolTip="Previous" image="previousTemplate" imageScaling="none" width="28"/>
@ -353,7 +354,7 @@
<nil key="toolTip"/>
<size key="minSize" width="64" height="22"/>
<size key="maxSize" width="96" height="22"/>
<searchField key="view" verticalHuggingPriority="750" id="1531">
<searchField key="view" wantsLayer="YES" verticalHuggingPriority="750" id="1531">
<rect key="frame" x="0.0" y="14" width="96" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" placeholderString="All" bezelStyle="round" recentsAutosaveName="CogFilter" id="1532">
@ -381,20 +382,20 @@
</binding>
<binding destination="218" name="predicate4" keyPath="filterPredicate" previousBinding="1580" id="1582">
<dictionary key="options">
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<string key="NSDisplayName">Album</string>
<string key="NSPredicateFormat">artist contains[cd] $value</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSValidatesImmediately" value="0"/>
</dictionary>
</binding>
<binding destination="218" name="predicate5" keyPath="filterPredicate" previousBinding="1582" id="1583">
<dictionary key="options">
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<string key="NSDisplayName">Genre</string>
<string key="NSPredicateFormat">genre contains[cd] $value</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSValidatesImmediately" value="0"/>
</dictionary>
</binding>
</connections>
@ -423,7 +424,7 @@
<size key="minSize" width="46" height="15"/>
<size key="maxSize" width="58" height="15"/>
<textField key="view" verticalHuggingPriority="750" id="1566" customClass="TimeField">
<rect key="frame" x="16" y="14" width="46" height="15"/>
<rect key="frame" x="15" y="14" width="46" height="15"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" controlSize="small" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" borderStyle="bezel" alignment="center" title="0:00" usesSingleLineMode="YES" bezelStyle="round" id="1567">
<font key="font" metaFont="smallSystem"/>
@ -437,7 +438,7 @@
<size key="minSize" width="28" height="25"/>
<size key="maxSize" width="28" height="25"/>
<button key="view" verticalHuggingPriority="750" id="1608" customClass="VolumeButton">
<rect key="frame" x="10" y="14" width="28" height="25"/>
<rect key="frame" x="9" y="14" width="28" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="volume3Template" imagePosition="only" alignment="center" borderStyle="border" inset="2" id="1609">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -453,7 +454,7 @@
<size key="minSize" width="28" height="25"/>
<size key="maxSize" width="28" height="25"/>
<button key="view" verticalHuggingPriority="750" id="1627">
<rect key="frame" x="27" y="14" width="28" height="25"/>
<rect key="frame" x="26" y="14" width="28" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="infoTemplate" imagePosition="only" alignment="center" borderStyle="border" id="1628">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -469,7 +470,7 @@
<size key="minSize" width="28" height="25"/>
<size key="maxSize" width="28" height="25"/>
<button key="view" verticalHuggingPriority="750" id="1631">
<rect key="frame" x="13" y="14" width="28" height="25"/>
<rect key="frame" x="12" y="14" width="28" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="navigatorTemplate" imagePosition="only" alignment="center" borderStyle="border" id="1632">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -485,7 +486,7 @@
<size key="minSize" width="28" height="25"/>
<size key="maxSize" width="28" height="25"/>
<button key="view" verticalHuggingPriority="750" id="2467">
<rect key="frame" x="20" y="14" width="28" height="25"/>
<rect key="frame" x="19" y="14" width="28" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="randomizeTemplate" imagePosition="only" alignment="center" borderStyle="border" id="2468">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -501,7 +502,7 @@
<size key="minSize" width="28" height="25"/>
<size key="maxSize" width="28" height="25"/>
<button key="view" verticalHuggingPriority="750" id="1637">
<rect key="frame" x="8" y="14" width="28" height="25"/>
<rect key="frame" x="9" y="14" width="28" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="shuffleOffTemplate" imagePosition="only" alignment="center" borderStyle="border" id="1638">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -543,7 +544,7 @@
<size key="minSize" width="28" height="25"/>
<size key="maxSize" width="28" height="25"/>
<button key="view" verticalHuggingPriority="750" id="2533">
<rect key="frame" x="18" y="14" width="28" height="25"/>
<rect key="frame" x="17" y="14" width="28" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="miniModeOnTemplate" imagePosition="only" alignment="center" borderStyle="border" id="2534">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
@ -575,8 +576,8 @@
<connections>
<binding destination="1897" name="title" keyPath="content.display" id="1903">
<dictionary key="options">
<string key="NSNotApplicablePlaceholder">Cog</string>
<string key="NSNoSelectionPlaceholder">Cog</string>
<string key="NSNotApplicablePlaceholder">Cog</string>
<string key="NSNullPlaceholder">Cog</string>
</dictionary>
</binding>
@ -591,8 +592,8 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" texturedBackground="YES" unifiedTitleAndToolbar="YES"/>
<rect key="contentRect" x="192" y="547" width="480" height="0.0"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<value key="minSize" type="size" width="400" height="1"/>
<value key="maxSize" type="size" width="600" height="1"/>
<value key="minSize" type="size" width="400" height="0.0"/>
<value key="maxSize" type="size" width="600" height="0.0"/>
<view key="contentView" hidden="YES" wantsLayer="YES" id="2235">
<rect key="frame" x="0.0" y="0.0" width="480" height="0.0"/>
<autoresizingMask key="autoresizingMask"/>
@ -608,7 +609,7 @@
<segmentedControl key="view" verticalHuggingPriority="750" id="2295" customClass="PlaybackButtons">
<rect key="frame" x="0.0" y="14" width="121" height="25"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<segmentedCell key="cell" state="on" alignment="left" style="automatic" trackingMode="momentary" id="2296">
<segmentedCell key="cell" state="on" borderStyle="border" alignment="left" style="automatic" trackingMode="momentary" id="2296">
<font key="font" metaFont="system"/>
<segments>
<segment toolTip="Previous" image="previousTemplate" imageScaling="none" width="28"/>
@ -767,8 +768,8 @@
<connections>
<binding destination="1897" name="title" keyPath="content.display" id="2374">
<dictionary key="options">
<string key="NSNotApplicablePlaceholder">Cog</string>
<string key="NSNoSelectionPlaceholder">Cog</string>
<string key="NSNotApplicablePlaceholder">Cog</string>
<string key="NSNullPlaceholder">Cog</string>
</dictionary>
</binding>
@ -1003,12 +1004,12 @@
<action selector="stop:" target="705" id="1363"/>
<binding destination="1897" name="enabled" keyPath="content" id="2099">
<dictionary key="options">
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1023,12 +1024,12 @@
<action selector="eventSeekForward:" target="705" id="1698"/>
<binding destination="1897" name="enabled" keyPath="content" id="2104">
<dictionary key="options">
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1040,12 +1041,12 @@
<action selector="eventSeekBackward:" target="705" id="1697"/>
<binding destination="1897" name="enabled" keyPath="content" id="2107">
<dictionary key="options">
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1102,11 +1103,11 @@
<action selector="fade:" target="705" id="1887"/>
<binding destination="1897" name="enabled" keyPath="content" id="2105">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
</connections>
@ -1153,11 +1154,11 @@ CA
<action selector="showEntryInFinder:" target="218" id="1346"/>
<binding destination="218" name="enabled" keyPath="selection.index" id="1449">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="1"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
</connections>
@ -1204,13 +1205,13 @@ CA
<connections>
<binding destination="218" name="value" keyPath="repeat" id="1760">
<dictionary key="options">
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<string key="NSValueTransformerName">RepeatAllTransformer</string>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSConditionallySetsHidden" value="0"/>
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSValidatesImmediately" value="0"/>
<string key="NSValueTransformerName">RepeatAllTransformer</string>
</dictionary>
</binding>
</connections>
@ -1230,13 +1231,13 @@ CA
<connections>
<binding destination="218" name="value" keyPath="repeat" id="1763">
<dictionary key="options">
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<string key="NSValueTransformerName">RepeatOneTransformer</string>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSConditionallySetsHidden" value="0"/>
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSValidatesImmediately" value="0"/>
<string key="NSValueTransformerName">RepeatOneTransformer</string>
</dictionary>
</binding>
</connections>
@ -1245,13 +1246,13 @@ CA
<connections>
<binding destination="218" name="value" keyPath="repeat" id="1767">
<dictionary key="options">
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSAllowsEditingMultipleValuesSelection" value="0"/>
<string key="NSValueTransformerName">RepeatNoneTransformer</string>
<integer key="NSAlwaysPresentsApplicationModalAlerts" value="0"/>
<integer key="NSConditionallySetsEnabled" value="0"/>
<integer key="NSConditionallySetsHidden" value="0"/>
<integer key="NSValidatesImmediately" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<integer key="NSValidatesImmediately" value="0"/>
<string key="NSValueTransformerName">RepeatNoneTransformer</string>
</dictionary>
</binding>
</connections>
@ -1499,11 +1500,11 @@ Gw
<connections>
<binding destination="1897" name="title" keyPath="content.artist" id="2085">
<dictionary key="options">
<string key="NSNullPlaceholder">Not Playing</string>
<string key="NSNotApplicablePlaceholder"></string>
<string key="NSNoSelectionPlaceholder"></string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSMultipleValuesPlaceholder"></string>
<string key="NSNoSelectionPlaceholder"></string>
<string key="NSNotApplicablePlaceholder"></string>
<string key="NSNullPlaceholder">Not Playing</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
</dictionary>
</binding>
</connections>
@ -1513,11 +1514,11 @@ Gw
<connections>
<binding destination="1897" name="title" keyPath="content.title" id="2083">
<dictionary key="options">
<string key="NSNullPlaceholder">Not Playing</string>
<string key="NSNotApplicablePlaceholder"></string>
<string key="NSNoSelectionPlaceholder"></string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSMultipleValuesPlaceholder"></string>
<string key="NSNoSelectionPlaceholder"></string>
<string key="NSNotApplicablePlaceholder"></string>
<string key="NSNullPlaceholder">Not Playing</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
</dictionary>
</binding>
</connections>
@ -1527,12 +1528,12 @@ Gw
<connections>
<binding destination="1897" name="hidden" keyPath="content" id="2079">
<dictionary key="options">
<integer key="NSMultipleValuesPlaceholder" value="1"/>
<integer key="NSNoSelectionPlaceholder" value="1"/>
<integer key="NSNotApplicablePlaceholder" value="1"/>
<integer key="NSNullPlaceholder" value="1"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSValueTransformerName">NSIsNil</string>
<integer key="NSNotApplicablePlaceholder" value="1"/>
<integer key="NSNoSelectionPlaceholder" value="1"/>
<integer key="NSMultipleValuesPlaceholder" value="1"/>
<integer key="NSNullPlaceholder" value="1"/>
</dictionary>
</binding>
</connections>
@ -1547,12 +1548,12 @@ Gw
<action selector="stop:" target="705" id="726"/>
<binding destination="1897" name="enabled" keyPath="content" id="2096">
<dictionary key="options">
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
</dictionary>
</binding>
</connections>
@ -1610,22 +1611,22 @@ Gw
<action selector="toggleQueued:" target="218" id="1934"/>
<binding destination="2020" name="enabled" keyPath="selection" id="2068">
<dictionary key="options">
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
</dictionary>
</binding>
<binding destination="2020" name="title" keyPath="selection.queued" id="2042">
<dictionary key="options">
<string key="NSMultipleValuesPlaceholder">Toggle Queued</string>
<string key="NSNoSelectionPlaceholder">Toggle Queued</string>
<string key="NSNotApplicablePlaceholder">Toggle Queued</string>
<string key="NSNullPlaceholder">Toggle Queued</string>
<integer key="NSRaisesForNotApplicableKeys" value="1"/>
<string key="NSValueTransformerName">ToggleQueueTitleTransformer</string>
<string key="NSNotApplicablePlaceholder">Toggle Queued</string>
<string key="NSNoSelectionPlaceholder">Toggle Queued</string>
<string key="NSMultipleValuesPlaceholder">Toggle Queued</string>
<string key="NSNullPlaceholder">Toggle Queued</string>
</dictionary>
</binding>
</connections>
@ -1637,11 +1638,11 @@ Gw
<action selector="searchByArtist:" target="218" id="2118"/>
<binding destination="2020" name="enabled" keyPath="selection.artist" id="2066">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
</connections>
@ -1652,11 +1653,11 @@ Gw
<action selector="searchByAlbum:" target="218" id="2119"/>
<binding destination="2020" name="enabled" keyPath="selection.album" id="2067">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
</connections>
@ -1670,11 +1671,11 @@ Gw
<action selector="showEntryInFinder:" target="218" id="1345"/>
<binding destination="2020" name="enabled" keyPath="selection" id="2069">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
</connections>
@ -1685,11 +1686,11 @@ Gw
<action selector="remove:" target="218" id="1361"/>
<binding destination="2020" name="enabled" keyPath="selection" id="2070">
<dictionary key="options">
<string key="NSValueTransformerName">NSIsNotNil</string>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
</binding>
</connections>
@ -1702,8 +1703,8 @@ Gw
<binding destination="2020" name="enabled" keyPath="selection" id="Ff1-eV-AGk">
<dictionary key="options">
<integer key="NSMultipleValuesPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNoSelectionPlaceholder" value="0"/>
<integer key="NSNotApplicablePlaceholder" value="0"/>
<integer key="NSNullPlaceholder" value="0"/>
<string key="NSValueTransformerName">NSIsNotNil</string>
</dictionary>
@ -1794,90 +1795,154 @@ Gw
<customObject id="2434" customClass="FeedbackController"/>
</objects>
<resources>
<image name="B847B194-BBAF-4B8C-B139-D0EA4FFCEBAA" width="17" height="17">
<image name="D5398B17-F6F7-4626-81A6-FA2C43FE26B4" width="17" height="17">
<mutableData key="keyedArchiveRepresentation">
YnBsaXN0MDDUAQIDBAUGRkdYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK8QDwcI
ExQZHh8qKyw0NzpAQ1UkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5T
UmVwc1dOU0NvbG9ygAKADhIgwAAAgAOADFh7MTcsIDE3fdIVChYYWk5TLm9iamVjdHOhF4AEgAvSFQoa
HaIbHIAFgAaAChAA1iAhCiIjJCUmJygpHl8QEE5TQ2FjaGVXaW5kb3dCUFNfEBdOU0NhY2hlV2luZG93
Q29sb3JTcGFjZV8QFE5TVElGRlJlcHJlc2VudGF0aW9uXxAQTlNDYWNoZVdpbmRvd0JQUF8QFU5TQ2Fj
aGVXaW5kb3dJc1BsYW5hchAIgAiACYAHEBhPERAuTU0AKgAAA/iAACBQOCQWDQeEQmBAaBgmBvGFRGJR
OFB8LgcqCYGgYertuPM3xSRQoFwMIQMGwMJAcHhIRoYujo7g11tcNJZwBZiNBksc+QNpQQBUMMgQCAUQ
AsHg4RBenB8KBQLhwHg8GhgMBwPBsRiIPhUMhMPBIMBsKg16vh7AIaPldgAAuJtgBkh4zAAumAwG58vR
3J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A
AAYQAACuA5v0iCnPTo6AAAAAAAAAAAAAAAAAAAAAANIlJicoWiRjbGFzc25hbWVYJGNsYXNzZXNfEBBO
U0JpdG1hcEltYWdlUmVwoycpKlpOU0ltYWdlUmVwWE5TT2JqZWN00iUmLC1XTlNBcnJheaIsKtIlJi8w
Xk5TTXV0YWJsZUFycmF5oy8sKtMyMwo0NTZXTlNXaGl0ZVxOU0NvbG9yU3BhY2VEMCAwABADgAzSJSY4
OVdOU0NvbG9yojgq0iUmOzxXTlNJbWFnZaI7Kl8QD05TS2V5ZWRBcmNoaXZlctE/QFRyb290gAEACAAR
ABoAIwAtADIANwBGAEwAVwBeAGUAcgB5AIEAgwCFAIoAjACOAJcAnACnAKkAqwCtALIAtQC3ALkAuwC9
AMIA2QDbAN0gsyC4IMMgzCDfIOMg7iD3IPwhBCEHIQwhGyEfISYhLiE7IUAhQiFEIUkhUSFUIVkhYSFk
IXYheSF+AAAAAAAAAgEAAAAAAAAAQQAAAAAAAAAAAAAAAAAAIYA
</mutableData>
</image>
<image name="infoTemplate" width="16" height="16"/>
@ -1893,4 +1958,4 @@ Ek0SVRJYEmoSbRJyAAAAAAAAAgEAAAAAAAAASgAAAAAAAAAAAAAAAAAAEnQ
<image name="stopTemplate" width="16" height="16"/>
<image name="volume3Template" width="17" height="16"/>
</resources>
</document>
</document>

View File

@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4510" systemVersion="12F45" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11129.15" systemVersion="15F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment version="1050" defaultVersion="1070" identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4510"/>
<deployment identifier="macosx"/>
<development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11129.15"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="OpenURLPanel">
@ -12,8 +13,8 @@
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application"/>
<window title="Open URL" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" wantsToBeColor="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="OpenURLPanel" customClass="NSPanel">
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<window title="Open URL" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="OpenURLPanel" customClass="NSPanel">
<windowStyleMask key="styleMask" titled="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="70" y="875" width="506" height="100"/>
@ -67,4 +68,4 @@ Gw
</connections>
</window>
</objects>
</document>
</document>

File diff suppressed because it is too large Load Diff

View File

@ -124,7 +124,7 @@
{
PathNode *n = (item == nil ? rootNode : item);
return [[n subpaths] count];
return (int) [[n subpaths] count];
}

View File

@ -48,7 +48,7 @@
- (unsigned int)countOfSubpaths
{
return [[self subpaths] count];
return (unsigned int) [[self subpaths] count];
}
- (PathNode *)objectInSubpathsAtIndex:(unsigned int)index
@ -64,7 +64,7 @@
NSMutableArray *results = [NSMutableArray array];
MDQueryDisableUpdates(query);
int c = MDQueryGetResultCount(query);
int c = (int) MDQueryGetResultCount(query);
int i;
for (i = 0; i < c; i++)

View File

@ -485,7 +485,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Dumb" */;
compatibilityVersion = "Xcode 3.2";
@ -682,14 +682,29 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"VAR_ARRAYS=1",
"_USE_SSE=1",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
OBJROOT = ../../build;
@ -703,14 +718,28 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
"VAR_ARRAYS=1",
"_USE_SSE=1",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
OBJROOT = ../../build;

View File

@ -13,14 +13,14 @@ struct riff * riff_parse( DUMBFILE * f, long offset, long size, unsigned proper
if ( dumbfile_seek(f, offset, DFS_SEEK_SET) ) return 0;
if ( dumbfile_mgetl(f) != DUMB_ID('R','I','F','F') ) return 0;
stream_size = dumbfile_igetl(f);
stream_size = (int) dumbfile_igetl(f);
if ( stream_size + 8 > size ) return 0;
if ( stream_size < 4 ) return 0;
stream = (struct riff *) malloc( sizeof( struct riff ) );
if ( ! stream ) return 0;
stream->type = dumbfile_mgetl(f);
stream->type = (int) dumbfile_mgetl(f);
stream->chunk_count = 0;
stream->chunks = 0;
@ -33,8 +33,8 @@ struct riff * riff_parse( DUMBFILE * f, long offset, long size, unsigned proper
stream->chunks = ( struct riff_chunk * ) realloc( stream->chunks, ( stream->chunk_count + 1 ) * sizeof( struct riff_chunk ) );
if ( ! stream->chunks ) break;
chunk = stream->chunks + stream->chunk_count;
chunk->type = dumbfile_mgetl(f);
chunk->size = dumbfile_igetl(f);
chunk->type = (int) dumbfile_mgetl(f);
chunk->size = (int) dumbfile_igetl(f);
chunk->offset = dumbfile_pos(f);
stream_size -= 8;
if ( stream_size < chunk->size ) break;

View File

@ -88,7 +88,7 @@ static int it_asy_read_pattern( IT_PATTERN *pattern, DUMBFILE *f, unsigned char
++entry;
}
pattern->n_entries = entry - pattern->entry;
pattern->n_entries = (int)(entry - pattern->entry);
return 0;
}

View File

@ -87,7 +87,7 @@ static int it_mtm_assemble_pattern(IT_PATTERN *pattern, const unsigned char * tr
entry++;
}
pattern->n_entries = entry - pattern->entry;
pattern->n_entries = (int)(entry - pattern->entry);
return 0;
}
@ -330,7 +330,7 @@ static DUMB_IT_SIGDATA *it_mtm_load_sigdata(DUMBFILE *f, int * version)
if (!sigdata->song_message) goto error_fc;
for (m = 0, n = 0; n <= o; n += 40) {
int p = strlen_max(&comment[n], 40);
int p = (int) strlen_max(&comment[n], 40);
if (p) {
memcpy(sigdata->song_message + m, &comment[n], p);
m += p;

View File

@ -181,7 +181,7 @@ static int it_stm_read_pattern( IT_PATTERN *pattern, DUMBFILE *f, unsigned char
++entry;
}
pattern->n_entries = entry - pattern->entry;
pattern->n_entries = (int)(entry - pattern->entry);
return 0;
}

View File

@ -421,7 +421,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "flac" */;
compatibilityVersion = "Xcode 3.2";
@ -561,9 +561,23 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
@ -577,8 +591,21 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PREBINDING = NO;

View File

@ -129,6 +129,7 @@
8359009117FEF5830060F3ED /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 8359009017FEF5830060F3ED /* libz.dylib */; };
8359009F17FF073E0060F3ED /* 7zStream.c in Sources */ = {isa = PBXBuildFile; fileRef = 8359009E17FF073E0060F3ED /* 7zStream.c */; };
8359FF4A17FEF39F0060F3ED /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8359FF4817FEF39F0060F3ED /* InfoPlist.strings */; };
83756F621D23A95B003A7676 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83756F611D23A95B003A7676 /* CoreServices.framework */; };
83C2109719CD81F50093C461 /* headers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83C2108E19CD81F50093C461 /* headers.cpp */; };
83C2109819CD81F50093C461 /* headers5.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 83C2108F19CD81F50093C461 /* headers5.hpp */; };
83C2109B19CD88A30093C461 /* secpassword.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83C2109A19CD88A30093C461 /* secpassword.cpp */; };
@ -269,6 +270,7 @@
8359FFFB17FEF40E0060F3ED /* unpack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unpack.cpp; sourceTree = "<group>"; };
8359FFFC17FEF40E0060F3ED /* unpack.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = unpack.hpp; sourceTree = "<group>"; };
8359FFFF17FEF40E0060F3ED /* unrar.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unrar.cpp; sourceTree = "<group>"; };
83756F611D23A95B003A7676 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
83C2108E19CD81F50093C461 /* headers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = headers.cpp; sourceTree = "<group>"; };
83C2108F19CD81F50093C461 /* headers5.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = headers5.hpp; sourceTree = "<group>"; };
83C2109A19CD88A30093C461 /* secpassword.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = secpassword.cpp; sourceTree = "<group>"; };
@ -288,6 +290,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
83756F621D23A95B003A7676 /* CoreServices.framework in Frameworks */,
8359009117FEF5830060F3ED /* libz.dylib in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -315,6 +318,7 @@
8359FF3E17FEF39F0060F3ED /* Frameworks */ = {
isa = PBXGroup;
children = (
83756F611D23A95B003A7676 /* CoreServices.framework */,
8359009017FEF5830060F3ED /* libz.dylib */,
8359FF4117FEF39F0060F3ED /* Other Frameworks */,
);
@ -615,7 +619,7 @@
8359FF3317FEF39F0060F3ED /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 8359FF3617FEF39F0060F3ED /* Build configuration list for PBXProject "File_Extractor" */;
@ -737,6 +741,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -747,12 +752,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -776,6 +784,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -786,12 +795,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = _UNIX;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;

View File

@ -401,7 +401,7 @@
17C8F1ED0CBED286008D969D /* Ym2413_Emu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Ym2413_Emu.h; path = gme/Ym2413_Emu.h; sourceTree = "<group>"; };
17C8F1EE0CBED286008D969D /* Ym2612_Emu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Ym2612_Emu.cpp; path = gme/Ym2612_Emu.cpp; sourceTree = "<group>"; };
17C8F1EF0CBED286008D969D /* Ym2612_Emu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Ym2612_Emu.h; path = gme/Ym2612_Emu.h; sourceTree = "<group>"; };
833F68361CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
833F68361CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
8370B68D17F615FD001A4D7A /* Ay_Core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Ay_Core.cpp; path = gme/Ay_Core.cpp; sourceTree = "<group>"; };
8370B68E17F615FD001A4D7A /* Ay_Core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Ay_Core.h; path = gme/Ay_Core.h; sourceTree = "<group>"; };
8370B68F17F615FD001A4D7A /* blargg_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = blargg_common.cpp; path = gme/blargg_common.cpp; sourceTree = "<group>"; };
@ -1273,7 +1273,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "GME" */;
compatibilityVersion = "Xcode 3.2";
@ -1541,10 +1541,25 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
OBJROOT = ../../build;
@ -1558,9 +1573,23 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
OBJROOT = ../../build;

View File

@ -16,6 +16,8 @@
*/
#include <stdlib.h>
#include "mamedef.h"
#include "dac_control.h"

View File

@ -760,7 +760,7 @@ void multipcm_write_rom(void *_info, offs_t ROMSize, offs_t DataStart, offs_t Da
if (ptChip->ROMSize != ROMSize)
{
ptChip->ROM = (UINT8*)realloc(ptChip->ROM, ROMSize);
ptChip->ROM = (INT8*)realloc(ptChip->ROM, ROMSize);
ptChip->ROMSize = ROMSize;
for (ptChip->ROMMask = 1; ptChip->ROMMask < ROMSize; ptChip->ROMMask <<= 1)

View File

@ -24,6 +24,7 @@
#include "pwm.h"
#include <string.h>
#include <stdlib.h>
//#include "gens_core/mem/mem_sh2.h"
//#include "gens_core/cpu/sh2/sh2.h"

View File

@ -269,10 +269,10 @@ static void qsound_set_command(qsound_state *chip, UINT8 address, UINT16 data)
// bank, high bits unknown
ch = (ch + 1) & 0x0f; /* strange ... */
chip->channel[ch].bank = (data & 0x7f) << 16; // Note: The most recent MAME doesn't do "& 0x7F"
//#ifdef _DEBUG
#ifdef _DEBUG
if (data && !(data & 0x8000))
printf("QSound Ch %u: Bank = %04x\n",ch,data);
//#endif
#endif
break;
case 1:
// start/cur address
@ -290,10 +290,10 @@ static void qsound_set_command(qsound_state *chip, UINT8 address, UINT16 data)
}*/
break;
case 3:
//#ifdef _DEBUG
#ifdef _DEBUG
if (chip->channel[ch].enabled && data != 0x8000)
printf("QSound Ch %u: KeyOn = %04x\n",ch,data);
//#endif
#endif
// key on (does the value matter? it always writes 0x8000)
//chip->channel[ch].enabled = 1;
chip->channel[ch].enabled = (data & 0x8000) >> 15;
@ -309,8 +309,10 @@ static void qsound_set_command(qsound_state *chip, UINT8 address, UINT16 data)
break;
case 6:
// master volume
#ifdef _DEBUG
if (! chip->channel[ch].enabled && data)
printf("QSound update warning - please report!\n");
#endif
chip->channel[ch].vol = data;
break;
case 7:

View File

@ -387,10 +387,10 @@ int SLOT_SET(ym2612_ *YM2612, int Adr, unsigned char data)
switch(Adr & 0xF0)
{
case 0x30:
if(SL->MUL = (data & 0x0F)) SL->MUL <<= 1;
if((SL->MUL = (data & 0x0F))) SL->MUL <<= 1;
else SL->MUL = 1;
SL->DT = DT_TAB[(data >> 4) & 7];
SL->DT = (int*) DT_TAB[(data >> 4) & 7];
CH->SLOT[0].Finc = -1;
@ -421,8 +421,8 @@ int SLOT_SET(ym2612_ *YM2612, int Adr, unsigned char data)
CH->SLOT[0].Finc = -1;
if(data &= 0x1F) SL->AR = &AR_TAB[data << 1];
else SL->AR = &NULL_RATE[0];
if(data &= 0x1F) SL->AR = (int*) &AR_TAB[data << 1];
else SL->AR = (int*) &NULL_RATE[0];
SL->EincA = SL->AR[SL->KSR];
if(SL->Ecurp == ATTACK) SL->Einc = SL->EincA;
@ -433,11 +433,11 @@ int SLOT_SET(ym2612_ *YM2612, int Adr, unsigned char data)
break;
case 0x60:
if(SL->AMSon = (data & 0x80)) SL->AMS = CH->AMS;
if((SL->AMSon = (data & 0x80))) SL->AMS = CH->AMS;
else SL->AMS = 31;
if(data &= 0x1F) SL->DR = &DR_TAB[data << 1];
else SL->DR = &NULL_RATE[0];
if((data &= 0x1F)) SL->DR = (int*) &DR_TAB[data << 1];
else SL->DR = (int*) &NULL_RATE[0];
SL->EincD = SL->DR[SL->KSR];
if(SL->Ecurp == DECAY) SL->Einc = SL->EincD;
@ -448,8 +448,8 @@ int SLOT_SET(ym2612_ *YM2612, int Adr, unsigned char data)
break;
case 0x70:
if(data &= 0x1F) SL->SR = &DR_TAB[data << 1];
else SL->SR = &NULL_RATE[0];
if((data &= 0x1F)) SL->SR = (int*) &DR_TAB[data << 1];
else SL->SR = (int*) &NULL_RATE[0];
SL->EincS = SL->SR[SL->KSR];
if((SL->Ecurp == SUBSTAIN) && (SL->Ecnt < ENV_END)) SL->Einc = SL->EincS;
@ -462,7 +462,7 @@ int SLOT_SET(ym2612_ *YM2612, int Adr, unsigned char data)
case 0x80:
SL->SLL = SL_TAB[data >> 4];
SL->RR = &DR_TAB[((data & 0xF) << 2) + 2];
SL->RR = (int*) &DR_TAB[((data & 0xF) << 2) + 2];
SL->EincR = SL->RR[SL->KSR];
if((SL->Ecurp == RELEASE) && (SL->Ecnt < ENV_END)) SL->Einc = SL->EincR;
@ -892,7 +892,7 @@ CH->SLOT[S3].Fcnt += CH->SLOT[S3].Finc;
#define UPDATE_PHASE_LFO \
if(freq_LFO = (CH->FMS * YM2612->LFO_FREQ_UP[i]) >> (LFO_HBITS - 1)) \
if((freq_LFO = (CH->FMS * YM2612->LFO_FREQ_UP[i]) >> (LFO_HBITS - 1))) \
{ \
CH->SLOT[S0].Fcnt += CH->SLOT[S0].Finc + ((CH->SLOT[S0].Finc * freq_LFO) >> LFO_FMS_LBITS); \
CH->SLOT[S1].Fcnt += CH->SLOT[S1].Finc + ((CH->SLOT[S1].Finc * freq_LFO) >> LFO_FMS_LBITS); \

View File

@ -235,7 +235,7 @@
8343792C17F97BDB00584396 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 8343792F17F97BDB00584396 /* Build configuration list for PBXProject "HighlyAdvanced" */;
@ -304,6 +304,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -314,12 +315,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -342,6 +346,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -352,13 +357,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@ -174,7 +174,7 @@
8360EF0717F92C91005208A4 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 8360EF0A17F92C91005208A4 /* Build configuration list for PBXProject "HighlyExperimental" */;
@ -241,6 +241,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -251,12 +252,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -278,6 +282,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -288,13 +293,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@ -146,7 +146,7 @@
834378D517F96E2600584396 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 834378D817F96E2600584396 /* Build configuration list for PBXProject "HighlyQuixotic" */;
@ -209,6 +209,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -219,12 +220,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
HAVE_STDINT_H,
@ -250,6 +254,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -260,13 +265,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
HAVE_STDINT_H,
EMU_LITTLE_ENDIAN,

View File

@ -188,7 +188,7 @@
8343786517F9658E00584396 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 8343786817F9658E00584396 /* Build configuration list for PBXProject "HighlyTheoretical" */;
@ -254,6 +254,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -264,12 +265,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
USE_M68K,
@ -297,6 +301,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -307,13 +312,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = (
USE_M68K,
HAVE_STDINT_H,

View File

@ -128,7 +128,7 @@
836FB54D182053D700B3AD2D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 836FB550182053D700B3AD2D /* Build configuration list for PBXProject "HivelyPlayer" */;
@ -189,6 +189,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -199,12 +200,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -228,6 +232,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -238,12 +243,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@ -47,9 +47,9 @@ extern "C" {
/* C O N S T A N T S */
const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
extern const mpc_uint8_t Res_bit [18]; ///< Bits per sample for chosen quantizer
extern const MPC_SAMPLE_FORMAT __Cc [1 + 18]; ///< Requantization coefficients
extern const mpc_int16_t __Dc [1 + 18]; ///< Requantization offset
#define Cc (__Cc + 1)
#define Dc (__Dc + 1)

View File

@ -105,7 +105,7 @@ void mpc_decoder_set_streaminfo(mpc_decoder *d, mpc_streaminfo *si)
d->ms = si->ms;
d->max_band = si->max_band;
d->channels = si->channels;
d->samples_to_skip = MPC_DECODER_SYNTH_DELAY + si->beg_silence;
d->samples_to_skip = (mpc_uint32_t)(MPC_DECODER_SYNTH_DELAY + si->beg_silence);
if (si->stream_version == 7 && si->is_true_gapless)
d->samples = ((si->samples + MPC_FRAME_LENGTH - 1) / MPC_FRAME_LENGTH) * MPC_FRAME_LENGTH;

View File

@ -75,7 +75,7 @@ static void mpc_demux_clear_buff(mpc_demux * d)
// Unchecked version - may return a negative value when we've been reading
// past the end of the valid data as a result of some problem with the file.
static mpc_int32_t mpc_unread_bytes_unchecked(mpc_demux * d) {
return d->bytes_total + d->buffer - d->bits_reader.buff - ((8 - d->bits_reader.count) >> 3);
return (mpc_int32_t)(d->bytes_total + d->buffer - d->bits_reader.buff - ((8 - d->bits_reader.count) >> 3));
}
// Returns the amount of unread bytes in the demux buffer.
@ -105,7 +105,7 @@ mpc_demux_fill(mpc_demux * d, mpc_uint32_t min_bytes, int flags)
if (unread_bytes < min_bytes) {
mpc_uint32_t bytes2read = min_bytes - unread_bytes;
mpc_uint32_t bytes_free = DEMUX_BUFFER_SIZE - d->bytes_total;
mpc_uint32_t bytes_free = (mpc_uint32_t)(DEMUX_BUFFER_SIZE - d->bytes_total);
mpc_uint32_t bytesread;
if (flags & MPC_BUFFER_SWAP) {
@ -152,7 +152,7 @@ mpc_demux_seek(mpc_demux * d, mpc_seek_t fpos, mpc_uint32_t min_bytes) {
// get current buffer position
end_pos = ((mpc_seek_t)(d->r->tell(d->r))) << 3;
start_pos = end_pos - (d->bytes_total << 3);
start_pos = (mpc_seek_t)(end_pos - (d->bytes_total << 3));
if (fpos >= start_pos && fpos < end_pos) {
d->bits_reader.buff = d->buffer + ((fpos - start_pos) >> 3);
@ -188,8 +188,8 @@ mpc_demux_seek(mpc_demux * d, mpc_seek_t fpos, mpc_uint32_t min_bytes) {
*/
mpc_seek_t mpc_demux_pos(mpc_demux * d)
{
return (((mpc_seek_t)(d->r->tell(d->r)) - d->bytes_total +
d->bits_reader.buff - d->buffer) << 3) + 8 - d->bits_reader.count;
return ((mpc_seek_t)((d->r->tell(d->r) - d->bytes_total +
d->bits_reader.buff - d->buffer) << 3) + 8 - d->bits_reader.count);
}
/**
@ -293,7 +293,7 @@ static mpc_status mpc_demux_ST(mpc_demux * d)
tmp = 2 + d->si.samples / (MPC_FRAME_LENGTH << d->seek_pwr);
}
if ((file_table_size >> diff_pwr) > tmp)
file_table_size = tmp << diff_pwr;
file_table_size = (mpc_uint32_t)(tmp << diff_pwr);
d->seek_table = malloc((size_t) (tmp * sizeof(mpc_seek_t)));
d->seek_table_size = (file_table_size + ((1 << diff_pwr) - 1)) >> diff_pwr;
@ -330,10 +330,10 @@ static mpc_status mpc_demux_SP(mpc_demux * d, int size, int block_size)
cur = mpc_demux_pos(d);
mpc_bits_get_size(&d->bits_reader, &ptr);
MPC_AUTO_FAIL( mpc_demux_seek(d, (ptr - size) * 8 + cur, 11) );
MPC_AUTO_FAIL( mpc_demux_seek(d, (mpc_seek_t)((ptr - size) * 8 + cur), 11) );
st_head_size = mpc_bits_get_block(&d->bits_reader, &b);
if (memcmp(b.key, "ST", 2) == 0) {
d->chap_pos = (ptr - size + b.size + st_head_size) * 8 + cur;
d->chap_pos = (mpc_seek_t)((ptr - size + b.size + st_head_size) * 8 + cur);
d->chap_nb = -1;
if (mpc_demux_fill(d, (mpc_uint32_t) b.size, 0) < b.size)
return MPC_STATUS_FAIL;
@ -360,14 +360,14 @@ static mpc_status mpc_demux_chap_find_inner(mpc_demux * d)
if (d->chap_pos == 0) {
mpc_uint64_t cur_pos = (d->si.header_position + 4) * 8;
MPC_AUTO_FAIL( mpc_demux_seek(d, cur_pos, 11) ); // seek to the beginning of the stream
MPC_AUTO_FAIL( mpc_demux_seek(d, (mpc_seek_t)cur_pos, 11) ); // seek to the beginning of the stream
size = mpc_bits_get_block(&d->bits_reader, &b);
while (memcmp(b.key, "SE", 2) != 0) {
mpc_uint64_t new_pos = cur_pos + (size + b.size) * 8;
MPC_AUTO_FAIL(mpc_check_key(b.key));
if (memcmp(b.key, "CT", 2) == 0) {
if (d->chap_pos == 0) d->chap_pos = cur_pos;
if (d->chap_pos == 0) d->chap_pos = (mpc_seek_t)cur_pos;
} else {
d->chap_pos = 0;
}
@ -375,11 +375,11 @@ static mpc_status mpc_demux_chap_find_inner(mpc_demux * d)
return MPC_STATUS_FAIL;
cur_pos = new_pos;
MPC_AUTO_FAIL( mpc_demux_seek(d, cur_pos, 11) );
MPC_AUTO_FAIL( mpc_demux_seek(d, (mpc_seek_t)cur_pos, 11) );
size = mpc_bits_get_block(&d->bits_reader, &b);
}
if (d->chap_pos == 0)
d->chap_pos = cur_pos;
d->chap_pos = (mpc_seek_t)cur_pos;
}
mpc_demux_seek(d, d->chap_pos, 20);
@ -414,11 +414,11 @@ static mpc_status mpc_demux_chap_find_inner(mpc_demux * d)
d->chap[i].gain = (mpc_uint16_t) mpc_bits_read(&d->bits_reader, 16);
d->chap[i].peak = (mpc_uint16_t) mpc_bits_read(&d->bits_reader, 16);
tmp_size = b.size - size;
tmp_size = (mpc_uint_t)(b.size - size);
do {
mpc_uint_t rd_size = tmp_size;
mpc_uint8_t * tmp_buff = d->bits_reader.buff + ((8 - d->bits_reader.count) >> 3);
mpc_uint32_t avail_bytes = d->bytes_total + d->buffer - tmp_buff;
mpc_uint32_t avail_bytes = (mpc_uint32_t)(d->bytes_total + d->buffer - tmp_buff);
rd_size = mini(rd_size, avail_bytes);
memcpy(tmp_ptag, tmp_buff, rd_size);
tmp_size -= rd_size;
@ -427,7 +427,7 @@ static mpc_status mpc_demux_chap_find_inner(mpc_demux * d)
mpc_demux_fill(d, tmp_size, 0);
} while (tmp_size > 0);
d->chap[i].tag_size = b.size - size;
d->chap[i].tag_size = (mpc_uint_t)(b.size - size);
d->chap[i].tag = ptag;
ptag += b.size - size;
i++;

View File

@ -67,7 +67,7 @@ tell_stdio(mpc_reader *p_reader)
{
mpc_reader_stdio *p_stdio = (mpc_reader_stdio*) p_reader->data;
if(p_stdio->magic != STDIO_MAGIC) return MPC_STATUS_FAIL;
return ftell(p_stdio->p_file);
return (mpc_int32_t) ftell(p_stdio->p_file);
}
static mpc_int32_t
@ -102,7 +102,7 @@ mpc_reader_init_stdio_stream(mpc_reader * p_reader, FILE * p_file)
p_stdio->is_seekable = MPC_TRUE;
err = fseek(p_stdio->p_file, 0, SEEK_END);
if(err < 0) goto clean;
err = ftell(p_stdio->p_file);
err = (int) ftell(p_stdio->p_file);
if(err < 0) goto clean;
p_stdio->file_size = err;
err = fseek(p_stdio->p_file, 0, SEEK_SET);

View File

@ -823,7 +823,7 @@ cmpfn2 ( const void* p1, const void* p2 )
const TagItem_t* q1 = (TagItem_t*) p1;
const TagItem_t* q2 = (TagItem_t*) p2;
return q1 -> valuelen - q2 -> valuelen;
return (int)(q1 -> valuelen - q2 -> valuelen);
}
#define TAG_NO_HEADER 1

View File

@ -229,7 +229,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "MPCDec" */;
compatibilityVersion = "Xcode 3.2";
@ -346,9 +346,24 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
@ -361,8 +376,22 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PREBINDING = NO;

View File

@ -151,7 +151,7 @@
32F1614C14E6BB3B00D6AB2F /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "dmitry.promsky@gmail.com";
};
buildConfigurationList = 32F1614F14E6BB3B00D6AB2F /* Build configuration list for PBXProject "NDHotKey" */;
@ -213,6 +213,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
@ -253,6 +254,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
@ -262,7 +264,6 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;

View File

@ -170,7 +170,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 730F235809181A3A00AB638C /* Build configuration list for PBXProject "Ogg" */;
compatibilityVersion = "Xcode 3.2";
@ -297,10 +297,27 @@
730F235909181A3A00AB638C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
};
@ -309,9 +326,26 @@
730F235A09181A3A00AB638C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = (
"$(OTHER_CFLAGS)",
"-ffast-math",

View File

@ -988,7 +988,7 @@
8375B05917FFEABB0092A79F /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 8375B05C17FFEABB0092A79F /* Build configuration list for PBXProject "Opus" */;
@ -1229,6 +1229,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -1239,12 +1240,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -1267,6 +1271,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -1277,12 +1282,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = __OPTIMIZE__;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;

View File

@ -237,7 +237,7 @@
83848FAF1807623F00E7332D /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 83848FB21807623F00E7332D /* Build configuration list for PBXProject "SSEQPlayer" */;
@ -309,6 +309,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -319,12 +320,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -347,6 +351,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "c++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -357,13 +362,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@ -192,7 +192,7 @@ inline ulong uchar_to_ulong_le(uchar *buf)
inline slong uchar_to_slong_le(uchar *buf)
/* converts 4 bytes stored in little-endian format to an slong */
{
return (long)uchar_to_ulong_le(buf);
return (slong)uchar_to_ulong_le(buf);
}
inline ushort uchar_to_ushort_le(uchar *buf)

View File

@ -112,7 +112,7 @@ long RingBuffer::WriteData(char *data, long len)
return written;
} else
{
before = mBufSize - mBufWxIdx;
before = (int)(mBufSize - mBufWxIdx);
::memcpy(&mBuffer[mBufWxIdx], &data[written], (size_t) before);
written += before;
len -= before;
@ -166,7 +166,7 @@ long RingBuffer::ReadData(char *data, long len)
return read;
} else
{
before = mBufSize - mBufRdIdx;
before = (int)(mBufSize - mBufRdIdx);
if (data) {
::memcpy(&data[read], &mBuffer[mBufRdIdx], (size_t) before);
}

View File

@ -356,7 +356,7 @@ int shn_reader::get_wave_header()
return 0;
/* get the internal file type */
internal_ftype = UINT_GET(TYPESIZE);
internal_ftype = (int)UINT_GET(TYPESIZE);
/* has the user requested a change in file type? */
if(internal_ftype != ftype) {
@ -377,22 +377,22 @@ int shn_reader::get_wave_header()
UINT_GET((int) (log((double) DEFAULT_BLOCK_SIZE) / M_LN2));
UINT_GET(LPCQSIZE);
UINT_GET(0);
nskip = UINT_GET(NSKIPSIZE);
nskip = (int)UINT_GET(NSKIPSIZE);
for(int i = 0; i < nskip; i++)
{
byte = uvar_get(XBYTESIZE);
byte = (int)uvar_get(XBYTESIZE);
}
}
/* find verbatim command */
while(1)
{
int cmd = uvar_get(FNSIZE);
int cmd = (int)uvar_get(FNSIZE);
switch(cmd)
{
case FN_VERBATIM:
{
int cklen = uvar_get(VERBATIM_CKSIZE_SIZE);
int cklen = (int)uvar_get(VERBATIM_CKSIZE_SIZE);
while (cklen--)
{
@ -639,7 +639,7 @@ restart:
fwrite_type_init();
/* get the internal file type */
internal_ftype = UINT_GET(TYPESIZE);
internal_ftype = (int)UINT_GET(TYPESIZE);
/* has the user requested a change in file type? */
if(internal_ftype != ftype) {
@ -653,19 +653,19 @@ restart:
}
}
nchan = UINT_GET(CHANSIZE);
nchan = (int)UINT_GET(CHANSIZE);
/* get blocksize if version > 0 */
if(version > 0)
{
int byte;
blocksize = UINT_GET((int) (log((double) DEFAULT_BLOCK_SIZE) / M_LN2));
maxnlpc = UINT_GET(LPCQSIZE);
nmean = UINT_GET(0);
nskip = UINT_GET(NSKIPSIZE);
blocksize = (int)UINT_GET((int) (log((double) DEFAULT_BLOCK_SIZE) / M_LN2));
maxnlpc = (int)UINT_GET(LPCQSIZE);
nmean = (int)UINT_GET(0);
nskip = (int)UINT_GET(NSKIPSIZE);
for(i = 0; i < nskip; i++)
{
byte = uvar_get(XBYTESIZE);
byte = (int)uvar_get(XBYTESIZE);
}
}
else
@ -717,7 +717,7 @@ restart:
chan = 0;
while(1)
{
cmd = uvar_get(FNSIZE);
cmd = (int)uvar_get(FNSIZE);
if (mFatalError)
goto cleanup;
@ -735,7 +735,7 @@ restart:
if(cmd != FN_ZERO)
{
resn = uvar_get(ENERGYSIZE);
resn = (int)uvar_get(ENERGYSIZE);
if (mFatalError)
goto cleanup;
/* this is a hack as version 0 differed in definition of var_get */
@ -765,39 +765,39 @@ restart:
break;
case FN_DIFF0:
for(i = 0; i < blocksize; i++) {
cbuffer[i] = var_get(resn) + coffset;
cbuffer[i] = (int)var_get(resn) + coffset;
if (mFatalError)
goto cleanup;
}
break;
case FN_DIFF1:
for(i = 0; i < blocksize; i++) {
cbuffer[i] = var_get(resn) + cbuffer[i - 1];
cbuffer[i] = (int)(var_get(resn) + cbuffer[i - 1]);
if (mFatalError)
goto cleanup;
}
break;
case FN_DIFF2:
for(i = 0; i < blocksize; i++) {
cbuffer[i] = var_get(resn) + (2 * cbuffer[i - 1] - cbuffer[i - 2]);
cbuffer[i] = (int)(var_get(resn) + (2 * cbuffer[i - 1] - cbuffer[i - 2]));
if (mFatalError)
goto cleanup;
}
break;
case FN_DIFF3:
for(i = 0; i < blocksize; i++) {
cbuffer[i] = var_get(resn) + 3 * (cbuffer[i - 1] - cbuffer[i - 2]) + cbuffer[i - 3];
cbuffer[i] = (int)(var_get(resn) + 3 * (cbuffer[i - 1] - cbuffer[i - 2]) + cbuffer[i - 3]);
if (mFatalError)
goto cleanup;
}
break;
case FN_QLPC:
nlpc = uvar_get(LPCQSIZE);
nlpc = (int)uvar_get(LPCQSIZE);
if (mFatalError)
goto cleanup;
for(i = 0; i < nlpc; i++) {
qlpc[i] = var_get(LPCQUANT);
qlpc[i] = (int)var_get(LPCQUANT);
if (mFatalError)
goto cleanup;
}
@ -809,7 +809,7 @@ restart:
for(j = 0; j < nlpc; j++)
sum += qlpc[j] * cbuffer[i - j - 1];
cbuffer[i] = var_get(resn) + (sum >> LPCQUANT);
cbuffer[i] = (int)(var_get(resn) + (sum >> LPCQUANT));
if (mFatalError)
goto cleanup;
}
@ -926,17 +926,17 @@ restart:
break;
case FN_BLOCKSIZE:
blocksize = UINT_GET((int) (log((double) blocksize) / M_LN2));
blocksize = (int)UINT_GET((int) (log((double) blocksize) / M_LN2));
if (mFatalError)
goto cleanup;
break;
case FN_BITSHIFT:
bitshift = uvar_get(BITSHIFTSIZE);
bitshift = (int)uvar_get(BITSHIFTSIZE);
if (mFatalError)
goto cleanup;
break;
case FN_VERBATIM:
cklen = uvar_get(VERBATIM_CKSIZE_SIZE);
cklen = (int)uvar_get(VERBATIM_CKSIZE_SIZE);
if (mFatalError)
goto cleanup;

View File

@ -173,7 +173,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Shorten" */;
compatibilityVersion = "Xcode 3.2";
@ -288,9 +288,25 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
.,
@ -309,9 +325,24 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
.,

@ -1 +1 @@
Subproject commit d3bbc9140c9e23a89d077126b2cfb2d14efe1076
Subproject commit e6e5527090452751f2d3c52511dba8454be06f11

View File

@ -176,7 +176,6 @@
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -220,7 +219,6 @@
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 1;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
@ -245,7 +243,6 @@
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
@ -262,7 +259,6 @@
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
DEFINES_MODULE = YES;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;

View File

@ -897,7 +897,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "TagLib" */;
compatibilityVersion = "Xcode 3.2";
@ -1087,12 +1087,26 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
@ -1105,10 +1119,25 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
OTHER_CFLAGS = "-DHAVE_CONFIG_H";

View File

@ -575,7 +575,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 730F23F3091827B200AB638C /* Build configuration list for PBXProject "Vorbis" */;
compatibilityVersion = "Xcode 3.2";
@ -804,10 +804,27 @@
730F23F4091827B200AB638C /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
};
@ -816,9 +833,26 @@
730F23F5091827B200AB638C /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 3;
GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = (
"$(OTHER_CFLAGS)",
"-ffast-math",

View File

@ -491,7 +491,7 @@ int32_t unpack_samples (WavpackContext *wpc, int32_t *buffer, uint32_t sample_co
{
WavpackStream *wps = wpc->streams [wpc->current_stream];
uint32_t flags = wps->wphdr.flags, crc = wps->crc, i;
int32_t mute_limit = (1L << ((flags & MAG_MASK) >> MAG_LSB)) + 2;
int32_t mute_limit = (int32_t)((1L << ((flags & MAG_MASK) >> MAG_LSB)) + 2);
int32_t correction [2], read_word, *bptr;
struct decorr_pass *dpp;
int tcount, m = 0;

View File

@ -1107,10 +1107,10 @@ int32_t unpack_samples3 (WavpackContext *wpc, int32_t *buffer, uint32_t sample_c
diff = left - right;
}
sum_level = sum_level - (sum_level >> 8) + labs (sum >> 1);
left_level = left_level - (left_level >> 8) + labs (left);
right_level = right_level - (right_level >> 8) + labs (right);
diff_level = diff_level - (diff_level >> 8) + labs (diff);
sum_level = (int32_t)(sum_level - (sum_level >> 8) + labs (sum >> 1));
left_level = (int32_t)(left_level - (left_level >> 8) + labs (left));
right_level = (int32_t)(right_level - (right_level >> 8) + labs (right));
diff_level = (int32_t)(diff_level - (diff_level >> 8) + labs (diff));
if (flags & JOINT_STEREO) {
left = diff;
@ -1236,9 +1236,9 @@ int32_t unpack_samples3 (WavpackContext *wpc, int32_t *buffer, uint32_t sample_c
sum = right + left;
}
sum_level = sum_level - (sum_level >> 8) + labs (sum >> 1);
left_level = left_level - (left_level >> 8) + labs (left);
right_level = right_level - (right_level >> 8) + labs (right);
sum_level = (int32_t)(sum_level - (sum_level >> 8) + labs (sum >> 1));
left_level = (int32_t)(left_level - (left_level >> 8) + labs (left));
right_level = (int32_t)(right_level - (right_level >> 8) + labs (right));
left2 = sample [0] [0] + ((sample [0] [1] * weight [0] [0] + 128) >> 8) + left;
right2 = sample [1] [0] + ((sample [1] [1] * weight [1] [0] + 128) >> 8) + right;
@ -1974,12 +1974,12 @@ static int32_t FASTCALL get_word2 (WavpackStream3 *wps, int chan)
return 0L;
if (wps->wphdr.bits) {
for (value = 1L << (dbits - 1); --dbits; mask <<= 1)
for (value = (int32_t)(1L << (dbits - 1)); --dbits; mask <<= 1)
if (dbits < wps->wphdr.bits && getbit (&wps->wvbits))
value |= mask;
}
else
for (value = 1L << (dbits - 1); --dbits; mask <<= 1)
for (value = (int32_t)(1L << (dbits - 1)); --dbits; mask <<= 1)
if (getbit (&wps->wvbits))
value |= mask;
@ -2140,7 +2140,7 @@ static int32_t FASTCALL get_word4 (WavpackStream3 *wps, int chan, int32_t *corre
}
wps->w4.fast_level [chan] -= ((wps->w4.fast_level [chan] + 0x10) >> 5);
wps->w4.fast_level [chan] += (avalue = labs (mid));
wps->w4.fast_level [chan] += (avalue = (int32_t) labs (mid));
wps->w4.slow_level [chan] -= ((wps->w4.slow_level [chan] + 0x80) >> 8);
wps->w4.slow_level [chan] += avalue;
@ -2149,7 +2149,7 @@ static int32_t FASTCALL get_word4 (WavpackStream3 *wps, int chan, int32_t *corre
if (high != low) {
uint32_t maxcode = high - low;
int bitcount = count_bits (maxcode);
uint32_t extras = (1L << bitcount) - maxcode - 1;
uint32_t extras = (uint32_t)((1L << bitcount) - maxcode - 1);
getbits (&avalue, bitcount - 1, &wps->wvcbits);
avalue &= bitmask [bitcount - 1];

View File

@ -716,7 +716,7 @@ int64_t DoGetFileSize (FILE *hFile)
uint32_t DoGetFilePosition (FILE *hFile)
{
return ftell (hFile);
return (uint32_t) ftell (hFile);
}
int DoSetFilePositionAbsolute (FILE *hFile, uint32_t pos)

View File

@ -333,7 +333,7 @@ int main (argc, argv) int argc; char **argv;
for (pi = 0; *long_param && pi < 3; ++pi) {
if (isdigit (*long_param))
params [pi] = strtol (long_param, &long_param, 10);
params [pi] = (int) strtol (long_param, &long_param, 10);
if ((*long_param == 'f' || *long_param == 'F') && pi == 1) {
long_param++;
@ -374,7 +374,7 @@ int main (argc, argv) int argc; char **argv;
}
}
else if (!strncmp (long_option, "blocksize", 9)) { // --blocksize
config.block_samples = strtol (long_param, NULL, 10);
config.block_samples = (int) strtol (long_param, NULL, 10);
if (config.block_samples < 16 || config.block_samples > 131072) {
error_line ("invalid blocksize!");
@ -475,7 +475,7 @@ int main (argc, argv) int argc; char **argv;
break;
case 'X': case 'x':
config.xmode = strtol (++*argv, argv, 10);
config.xmode = (int) strtol (++*argv, argv, 10);
if (config.xmode < 0 || config.xmode > 6) {
error_line ("extra mode only goes from 1 to 6!");
@ -3186,7 +3186,7 @@ static void TextToUTF8 (void *string, int len)
}
if (converter != (iconv_t) -1) {
err = iconv (converter, &inp, &insize, &outp, &outsize);
err = (int) iconv (converter, &inp, &insize, &outp, &outsize);
iconv_close (converter);
}
else

View File

@ -894,7 +894,7 @@ void scan_word (WavpackStream *wps, int32_t *samples, uint32_t num_samples, int
while (num_samples--) {
value = labs (samples [chan = 0]);
value = (uint32_t) labs (samples [chan = 0]);
if (flags & HYBRID_BITRATE) {
wps->w.c [0].slow_level -= (wps->w.c [0].slow_level + SLO) >> SLS;
@ -925,7 +925,7 @@ void scan_word (WavpackStream *wps, int32_t *samples, uint32_t num_samples, int
}
if (!(flags & MONO_DATA)) {
value = labs (samples [chan = 1]);
value = (uint32_t) labs (samples [chan = 1]);
c++;
if (wps->wphdr.flags & HYBRID_BITRATE) {

View File

@ -204,7 +204,7 @@
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
};
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "WavPack" */;
compatibilityVersion = "Xcode 3.2";
@ -349,10 +349,25 @@
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1";
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
ONLY_ACTIVE_ARCH = YES;
@ -365,10 +380,24 @@
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.7;
PREBINDING = NO;

View File

@ -1123,7 +1123,6 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;

View File

@ -0,0 +1,114 @@
AC_INIT([libexsid], [1.3pre], [], [], [http://hacks.slashdirt.org/hw/exsid/#libexsid])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([exSID.c])
AC_CONFIG_HEADER([config.h])
AM_INIT_AUTOMAKE
dnl Initialize libtool.
LT_INIT([win32-dll])
PKG_PROG_PKG_CONFIG
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CC_STDC
AC_C_RESTRICT
AC_C_INLINE
dnl The dlopen() function is in the C library for *BSD and in
dnl libdl on GLIBC-based systems. Use native functions on MinGW.
AS_CASE([$host_os],
[mingw*], [MINGW32=yes],
[AC_SEARCH_LIBS([dlopen], [dl dld], [], [AC_MSG_ERROR([unable to find the dlopen() function])])]
)
AM_CONDITIONAL([MINGW32], [test "x$MINGW32" = "xyes"])
# debug options
AC_MSG_CHECKING([for debugging])
AC_ARG_ENABLE(debug, [AS_HELP_STRING([--enable-debug], [compile for debugging @<:@no/yes, default=no@:>@])],
[], [enable_debug=no])
AS_IF([test "x$enable_debug" = "xno"],
[AC_MSG_RESULT([Build without debugging messages]); debug_flags=-DNDEBUG],
[AC_MSG_RESULT([Build with debugging messages]); debug_flags=-DDEBUG]
)
AC_SUBST([debug_flags])
# check for libraries
AC_CHECK_HEADERS([ftd2xx.h],
[AC_DEFINE([HAVE_FTD2XX], 1, [Define to 1 if you have ftd2xx.h])],
[AC_MSG_WARN([ftd2xx.h not found, support will not be available])]
)
AC_MSG_CHECKING([for libftdi1])
PKG_CHECK_EXISTS([libftdi1 >= 1.0],
[AC_DEFINE([HAVE_FTDI], 1, [Define to 1 if you have ftdi.h])
FTDI_CFLAGS=`$PKG_CONFIG --cflags libftdi1`
AC_MSG_RESULT([yes])],
[AC_MSG_WARN([libftdi1 not found, support will not be available])]
)
AC_SUBST([FTDI_CFLAGS])
# check for thread model if available
AC_CHECK_HEADERS([threads.h],
[AC_DEFINE([EXSID_THREADED], 1, [Define for threaded driver])],
[AX_PTHREAD(
[AC_DEFINE([EXSID_THREADED], 1, [Define for threaded driver])]
[AC_DEFINE([HAVE_PTHREAD_H], 1, [Define to 1 if you have pthread.h])]
)]
)
eval loadable_shrext=$shrext_cmds
AC_DEFINE_UNQUOTED([SHLIBEXT], ["${loadable_shrext}"], [Shared library extension])
AC_CACHE_CHECK([for __builtin_expect], [exsid_cv_builtin_expect],
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { __builtin_expect(0, 0); }])],
[exsid_cv_builtin_expect=yes], [exsid_cv_builtin_expect=no])]
)
AS_IF([test "$exsid_cv_builtin_expect" = yes],
[AC_DEFINE([HAVE_BUILTIN_EXPECT], 1, [Define to 1 if you have builtin_expect.])]
)
# doxygen
AC_CHECK_PROGS([DOXYGEN], [doxygen])
AS_IF([test -z "$DOXYGEN"],
[AC_MSG_WARN([Doxygen not found - continuing without Doxygen support])],
[AC_CHECK_PROG([DOT], [dot], [YES], [NO])]
)
AM_CONDITIONAL([HAVE_DOXYGEN], [test -n "$DOXYGEN"])
AM_COND_IF([HAVE_DOXYGEN], [AC_CONFIG_FILES([Doxyfile])])
dnl libtool-style version-info number
#
# https://autotools.io/libtool/version.html
#
# Always increase the revision value.
#
# Increase the current value whenever an interface has been added, removed or changed.
#
# Increase the age value only if the changes made to the ABI are backward compatible.
LIBEXSIDCUR=0
LIBEXSIDREV=0
LIBEXSIDAGE=0
LIBEXSIDVERSION=$LIBEXSIDCUR:$LIBEXSIDREV:$LIBEXSIDAGE
AC_SUBST(LIBEXSIDVERSION)
AC_CONFIG_FILES([
Makefile
libexsid.pc
])
AC_OUTPUT

View File

@ -0,0 +1,19 @@
1.3pre
* Switch to threaded output for better playback performance
1.2
* Use dynamic loading to access FTDI chip
* Enable ftd2xx support
* More timing fixes
* Add additional debug instrumentation
* Account for negative drift in jitter calculation
* Split headers, code cleanup, more suitable for public library
* Switch to "exSID USB" description string
* Support Windows (via MinGW)
* Switch to 2Mpbs interface
1.1
* Fix time drifting for 750kbps playback
1.0
* Initial release with libftdi support

View File

@ -0,0 +1,270 @@
/*
Author: John Tsiombikas <nuclear@member.fsf.org>
I place this piece of code in the public domain. Feel free to use as you see
fit. I'd appreciate it if you keep my name at the top of the code somehwere,
but whatever.
Main project site: https://github.com/jtsiomb/c11threads
*/
/* TODO: port to MacOSX: no timed mutexes under macosx...
* just delete that bit if you don't care about timed mutexes
*/
#ifndef C11THREADS_H_
#define C11THREADS_H_
#include <time.h>
#include <errno.h>
#include <pthread.h>
#include <sched.h> /* for sched_yield */
#include <sys/time.h>
#define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
/* types */
typedef pthread_t thrd_t;
typedef pthread_mutex_t mtx_t;
typedef pthread_cond_t cnd_t;
typedef pthread_key_t tss_t;
typedef pthread_once_t once_flag;
typedef int (*thrd_start_t)(void*);
typedef void (*tss_dtor_t)(void*);
typedef struct {
time_t sec;
long nsec;
} xtime;
enum {
mtx_plain = 0,
mtx_recursive = 1,
mtx_timed = 2,
mtx_try = 4
};
enum {
thrd_success,
thrd_busy,
thrd_error,
thrd_nomem
};
/* ---- thread management ---- */
static inline int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
{
/* XXX there's a third possible value returned according to the standard:
* thrd_nomem. but it doesn't seem to correspond to any pthread_create errors.
*/
return pthread_create(thr, 0, (void*(*)(void*))func, arg) == 0 ? thrd_success : thrd_error;
}
static inline void thrd_exit(int res)
{
pthread_exit((void*)(long)res);
}
static inline int thrd_join(thrd_t thr, int *res)
{
void *retval;
if(pthread_join(thr, &retval) != 0) {
return thrd_error;
}
if(res) {
*res = (long)retval;
}
return thrd_success;
}
static inline int thrd_detach(thrd_t thr)
{
return pthread_detach(thr) == 0 ? thrd_success : thrd_error;
}
static inline thrd_t thrd_current(void)
{
return pthread_self();
}
static inline int thrd_equal(thrd_t a, thrd_t b)
{
return pthread_equal(a, b);
}
static inline void thrd_sleep(const xtime *xt)
{
int res;
struct timespec ts;
ts.tv_sec = (long)xt->sec;
ts.tv_nsec = xt->nsec;
do {
struct timespec rem;
res = nanosleep(&ts, &rem);
ts = rem;
} while(res == -1 && errno == EINTR);
}
static inline void thrd_yield(void)
{
sched_yield();
}
/* ---- mutexes ---- */
static inline int mtx_init(mtx_t *mtx, int type)
{
int res;
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
/* XXX I don't think these are exactly correct semantics */
if(type & mtx_try) {
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
}
#if 0
if(type & mtx_timed) {
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_TIMED_NP);
}
#endif
if(type & mtx_recursive) {
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
}
res = pthread_mutex_init(mtx, &attr) == 0 ? thrd_success : thrd_error;
pthread_mutexattr_destroy(&attr);
return res;
}
static inline void mtx_destroy(mtx_t *mtx)
{
pthread_mutex_destroy(mtx);
}
static inline int mtx_lock(mtx_t *mtx)
{
int res = pthread_mutex_lock(mtx);
if(res == EDEADLK) {
return thrd_busy;
}
return res == 0 ? thrd_success : thrd_error;
}
static inline int mtx_trylock(mtx_t *mtx)
{
int res = pthread_mutex_trylock(mtx);
if(res == EBUSY) {
return thrd_busy;
}
return res == 0 ? thrd_success : thrd_error;
}
#if 0
static inline int mtx_timedlock(mtx_t *mtx, const xtime *xt)
{
int res;
struct timespec ts;
ts.tv_sec = (long)xt->sec;
ts.tv_nsec = xt->nsec;
if((res = pthread_mutex_timedlock(mtx, &ts)) == EBUSY) {
return thrd_busy;
}
return res == 0 ? thrd_success : thrd_error;
}
#endif
static inline int mtx_unlock(mtx_t *mtx)
{
return pthread_mutex_unlock(mtx) == 0 ? thrd_success : thrd_error;
}
/* ---- condition variables ---- */
static inline int cnd_init(cnd_t *cond)
{
return pthread_cond_init(cond, 0) == 0 ? thrd_success : thrd_error;
}
static inline void cnd_destroy(cnd_t *cond)
{
pthread_cond_destroy(cond);
}
static inline int cnd_signal(cnd_t *cond)
{
return pthread_cond_signal(cond) == 0 ? thrd_success : thrd_error;
}
static inline int cnd_broadcast(cnd_t *cond)
{
return pthread_cond_broadcast(cond) == 0 ? thrd_success : thrd_error;
}
static inline int cnd_wait(cnd_t *cond, mtx_t *mtx)
{
return pthread_cond_wait(cond, mtx) == 0 ? thrd_success : thrd_error;
}
static inline int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt)
{
int res;
struct timespec ts;
ts.tv_sec = (long)xt->sec;
ts.tv_nsec = xt->nsec;
if((res = pthread_cond_timedwait(cond, mtx, &ts)) != 0) {
return res == ETIMEDOUT ? thrd_busy : thrd_error;
}
return thrd_success;
}
/* ---- thread-specific data ---- */
static inline int tss_create(tss_t *key, tss_dtor_t dtor)
{
return pthread_key_create(key, dtor) == 0 ? thrd_success : thrd_error;
}
static inline void tss_delete(tss_t key)
{
pthread_key_delete(key);
}
static inline int tss_set(tss_t key, void *val)
{
return pthread_setspecific(key, val) == 0 ? thrd_success : thrd_error;
}
static inline void *tss_get(tss_t key)
{
return pthread_getspecific(key);
}
/* ---- misc ---- */
static inline void call_once(once_flag *flag, void (*func)(void))
{
pthread_once(flag, func);
}
/* TODO take base into account */
static inline int xtime_get(xtime *xt, int base)
{
struct timeval tv;
gettimeofday(&tv, 0);
xt->sec = tv.tv_sec;
xt->nsec = tv.tv_usec * 1000;
return base;
}
#endif /* C11THREADS_H_ */

View File

@ -0,0 +1,45 @@
ACLOCAL_AMFLAGS = -I m4
AUTOMAKE_OPTIONS = foreign subdir-objects
if MINGW32
W32_CPPFLAGS = -DWIN32_LEAN_AND_MEAN
W32_LDFLAGS = -no-undefined
endif
AM_CPPFLAGS = -Wall -fstrict-aliasing \
$(FTDI_CFLAGS) \
${W32_CPPFLAGS} \
$(PTHREAD_CFLAGS) \
@debug_flags@
EXTRA_DIST = \
docs/mainpage.dox
lib_LTLIBRARIES = libexsid.la
libexsid_la_SOURCES = \
exSID.c exSID_defs.h exSID_ftdiwrap.h exSID_ftdiwrap.c c11threads.h
libexsid_la_HEADERS = \
exSID.h
libexsid_ladir = $(includedir)
libexsid_la_LDFLAGS = -version-info $(LIBEXSIDVERSION) $(W32_LDFLAGS) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS)
#=========================================================
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = libexsid.pc
#=========================================================
# docs
if HAVE_DOXYGEN
doc:
$(DOXYGEN) Doxyfile
clean-local:
rm -fr $(builddir)/docs/html
endif

View File

@ -0,0 +1,96 @@
/***************************************************************************
exsid-emu.h - exSID support interface.
-------------------
Based on hardsid-emu.h (C) 2000-2002 Simon White, (C) 2001-2002 Jarno Paananen
copyright : (C) 2015 Thibaut VARENE
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 as *
* published by the Free Software Foundation. *
* *
***************************************************************************/
#ifndef EXSID_EMU_H
#define EXSID_EMU_H
#include "sidemu.h"
#include "Event.h"
#include "EventScheduler.h"
#include "sidplayfp/siddefs.h"
#include "sidcxx11.h"
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
namespace libsidplayfp
{
#define EXSID_VOICES 3
// Approx 30ms
#define EXSID_DELAY_CYCLES 50480
/***************************************************************************
* exSID SID Specialisation
***************************************************************************/
class exSID final : public sidemu
{
private:
//friend class HardSIDBuilder;
// exSID specific data
static unsigned int sid;
bool m_status;
bool readflag;
uint8_t busValue;
bool muted[3];
SidConfig::sid_model_t runmodel;
private:
unsigned int delay();
public:
static const char* getCredits();
public:
exSID(sidbuilder *builder);
~exSID();
bool getStatus() const { return m_status; }
uint8_t read(uint_least8_t addr) override;
void write(uint_least8_t addr, uint8_t data) override;
// c64sid functions
void reset(uint8_t volume) override;
// Standard SID functions
void clock() override;
void model(SidConfig::sid_model_t model) override;
void voice(unsigned int num, bool mute) override;
void filter(bool enable) {}
// exSID specific
void flush();
// Must lock the SID before using the standard functions.
bool lock(EventScheduler *env) override;
void unlock() override;
};
}
#endif // EXSID_EMU_H

View File

@ -0,0 +1,79 @@
//
// exSID_defs.h
// A simple I/O library for exSID USB - private header file
//
// (C) 2015-2016 Thibaut VARENE
// License: GPLv2 - http://www.gnu.org/licenses/gpl-2.0.html
//
/**
* @file
* libexsid private definitions header file.
* @note These defines are closely related to the exSID firmware.
* Any modification that does not correspond to a related change in firmware
* will cause the device to operate unpredictably or not at all.
*/
#ifndef exSID_defs_h
#define exSID_defs_h
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
// CLOCK_FREQ_NTSC = 1022727.14;
// CLOCK_FREQ_PAL = 985248.4;
#if 1
#define XS_BDRATE 2000000 ///< 2Mpbs
#define XS_ADJMLT 1 ///< 1-to-1 cycle adjustement (max resolution: 1 cycle).
#else
#define XS_BDRATE 750000 ///< 750kpbs
#define XS_ADJMLT 2 ///< 2-to-1 cycle adjustement (max resolution: 2 cycles).
#endif
#define XS_BUFFMS 20 ///< write buffer size in milliseconds of playback.
#define XS_SIDCLK 1000000 ///< 1MHz (for computation only, currently hardcoded in firmware)
#define XS_RSBCLK (XS_BDRATE/10) ///< RS232 byte clock. Each RS232 byte is 10 bits long due to start and stop bits
#define XS_CYCCHR (XS_SIDCLK/XS_RSBCLK) ///< SID cycles between two consecutive chars
//#define XS_CYCCHR ((XS_SIDCLK+XS_RSBCLK-1)/XS_RSBCLK) // ceiling
#define XS_USBLAT 1 ///< FTDI latency: 1-255ms in 1ms increments
#define XS_BUFFSZ ((((XS_RSBCLK/1000)*XS_BUFFMS)/62)*62) ///< Must be multiple of _62_ or USB won't be happy.
#define XS_MINDEL (XS_CYCCHR) ///< Smallest possible delay (with IOCTD1).
#define XS_CYCIO (2*XS_CYCCHR) ///< minimum cycles between two consecutive I/Os
#define XS_MAXADJ 7 ///< maximum encodable value for post write clock adjustment: must fit on 3 bits
/* IOCTLS */
#define XS_AD_IOCTD1 0x9D ///< shortest delay (XS_MINDEL SID cycles)
#define XS_AD_IOCTLD 0x9E ///< polled delay, amount of SID cycles to wait must be given in data
#define XS_AD_IOCTS0 0xBD ///< select chip 0
#define XS_AD_IOCTS1 0xBE ///< select chip 1
#define XS_AD_IOCTSB 0xBF ///< select both chips. @warning Invalid for reads: unknown behaviour!
#define XS_AD_IOCTFV 0xFD ///< Firmware version query
#define XS_AD_IOCTHV 0xFE ///< Hardware version query
#define XS_AD_IOCTRS 0xFF ///< SID reset
#define XS_USBVID 0x0403 ///< Default FTDI VID
#define XS_USBPID 0x6001 ///< Default FTDI PID
#define XS_USBDSC "exSID USB"
#ifdef DEBUG
#define xsdbg(format, ...) printf("(%s) " format, __func__, ## __VA_ARGS__)
#else
#define xsdbg(format, ...) /* nothing */
#endif
#define xserror(format, ...) printf("(%s) ERROR " format, __func__, ## __VA_ARGS__)
#ifdef HAVE_BUILTIN_EXPECT
#define likely(x) __builtin_expect(!!(x), 1)
#define unlikely(x) __builtin_expect(!!(x), 0)
#else
#define likely(x) (x)
#define unlikely(x) (x)
#endif
#endif /* exSID_defs_h */

View File

@ -0,0 +1,485 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads. It
# sets the PTHREAD_LIBS output variable to the threads library and linker
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
# Also sets PTHREAD_CC to any special C compiler that is needed for
# multi-threaded programs (defaults to the value of CC otherwise). (This
# is necessary on AIX to use the special cc_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also to link with them as well. For example, you might link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threaded programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
# PTHREAD_CFLAGS.
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or if
# you have any other suggestions or comments. This macro was based on work
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
# Updated for Autoconf 2.68 by Daniel Richard G.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 23
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_SED])
AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on Tru64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
ax_pthread_save_CC="$CC"
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
AC_MSG_RESULT([$ax_pthread_ok])
if test "x$ax_pthread_ok" = "xno"; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
CC="$ax_pthread_save_CC"
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
# (Note: HP C rejects this with "bad form for `-t' option")
# -pthreads: Solaris/gcc (Note: HP C also rejects)
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads and
# -D_REENTRANT too), HP C (must be checked before -lpthread, which
# is present but should not be used directly; and before -mthreads,
# because the compiler interprets this as "-mt" + "-hreads")
# -mthreads: Mingw32/gcc, Lynx/gcc
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case $host_os in
freebsd*)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
ax_pthread_flags="-kthread lthread $ax_pthread_flags"
;;
hpux*)
# From the cc(1) man page: "[-mt] Sets various -D flags to enable
# multi-threading and also sets -lpthread."
ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
;;
openedition*)
# IBM z/OS requires a feature-test macro to be defined in order to
# enable POSIX threads at all, so give the user a hint if this is
# not set. (We don't define these ourselves, as they can affect
# other portions of the system API in unpredictable ways.)
AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
[
# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
AX_PTHREAD_ZOS_MISSING
# endif
],
[AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
;;
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (N.B.: The stubs are missing
# pthread_cleanup_push, or rather a function called by this macro,
# so we could check for that, but who knows whether they'll stub
# that too in a future libc.) So we'll check first for the
# standard Solaris way of linking pthreads (-mt -lpthread).
ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
;;
esac
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
AS_IF([test "x$GCC" = "xyes"],
[ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
# The presence of a feature test macro requesting re-entrant function
# definitions is, on some systems, a strong hint that pthreads support is
# correctly enabled
case $host_os in
darwin* | hpux* | linux* | osf* | solaris*)
ax_pthread_check_macro="_REENTRANT"
;;
aix*)
ax_pthread_check_macro="_THREAD_SAFE"
;;
*)
ax_pthread_check_macro="--"
;;
esac
AS_IF([test "x$ax_pthread_check_macro" = "x--"],
[ax_pthread_check_cond=0],
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
# Are we compiling with Clang?
AC_CACHE_CHECK([whether $CC is Clang],
[ax_cv_PTHREAD_CLANG],
[ax_cv_PTHREAD_CLANG=no
# Note that Autoconf sets GCC=yes for Clang as well as GCC
if test "x$GCC" = "xyes"; then
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
# if defined(__clang__) && defined(__llvm__)
AX_PTHREAD_CC_IS_CLANG
# endif
],
[ax_cv_PTHREAD_CLANG=yes])
fi
])
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
ax_pthread_clang_warning=no
# Clang needs special handling, because older versions handle the -pthread
# option in a rather... idiosyncratic way
if test "x$ax_pthread_clang" = "xyes"; then
# Clang takes -pthread; it has never supported any other flag
# (Note 1: This will need to be revisited if a system that Clang
# supports has POSIX threads in a separate library. This tends not
# to be the way of modern systems, but it's conceivable.)
# (Note 2: On some systems, notably Darwin, -pthread is not needed
# to get POSIX threads support; the API is always present and
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
# -pthread does define _REENTRANT, and while the Darwin headers
# ignore this macro, third-party headers might not.)
PTHREAD_CFLAGS="-pthread"
PTHREAD_LIBS=
ax_pthread_ok=yes
# However, older versions of Clang make a point of warning the user
# that, in an invocation where only linking and no compilation is
# taking place, the -pthread option has no effect ("argument unused
# during compilation"). They expect -pthread to be passed in only
# when source code is being compiled.
#
# Problem is, this is at odds with the way Automake and most other
# C build frameworks function, which is that the same flags used in
# compilation (CFLAGS) are also used in linking. Many systems
# supported by AX_PTHREAD require exactly this for POSIX threads
# support, and in fact it is often not straightforward to specify a
# flag that is used only in the compilation phase and not in
# linking. Such a scenario is extremely rare in practice.
#
# Even though use of the -pthread flag in linking would only print
# a warning, this can be a nuisance for well-run software projects
# that build with -Werror. So if the active version of Clang has
# this misfeature, we search for an option to squash it.
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
# Create an alternate version of $ac_link that compiles and
# links in two steps (.c -> .o, .o -> exe) instead of one
# (.c -> exe), because the warning occurs only in the second
# step
ax_pthread_save_ac_link="$ac_link"
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
ax_pthread_save_CFLAGS="$CFLAGS"
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
ac_link="$ax_pthread_save_ac_link"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
[ac_link="$ax_pthread_2step_ac_link"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
[break])
])
done
ac_link="$ax_pthread_save_ac_link"
CFLAGS="$ax_pthread_save_CFLAGS"
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
])
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
no | unknown) ;;
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
esac
fi # $ax_pthread_clang = yes
if test "x$ax_pthread_ok" = "xno"; then
for ax_pthread_try_flag in $ax_pthread_flags; do
case $ax_pthread_try_flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-mt,pthread)
AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
PTHREAD_CFLAGS="-mt"
PTHREAD_LIBS="-lpthread"
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
PTHREAD_CFLAGS="$ax_pthread_try_flag"
;;
pthread-config)
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
PTHREAD_LIBS="-l$ax_pthread_try_flag"
;;
esac
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
# if $ax_pthread_check_cond
# error "$ax_pthread_check_macro must be defined"
# endif
static void routine(void *a) { a = 0; }
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
pthread_join(th, 0);
pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])],
[ax_pthread_ok=yes],
[])
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
AC_MSG_RESULT([$ax_pthread_ok])
AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$ax_pthread_ok" = "xyes"; then
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_CACHE_CHECK([for joinable pthread attribute],
[ax_cv_PTHREAD_JOINABLE_ATTR],
[ax_cv_PTHREAD_JOINABLE_ATTR=unknown
for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
[int attr = $ax_pthread_attr; return attr /* ; */])],
[ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
[])
done
])
AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
test "x$ax_pthread_joinable_attr_defined" != "xyes"],
[AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
[$ax_cv_PTHREAD_JOINABLE_ATTR],
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
ax_pthread_joinable_attr_defined=yes
])
AC_CACHE_CHECK([whether more special flags are required for pthreads],
[ax_cv_PTHREAD_SPECIAL_FLAGS],
[ax_cv_PTHREAD_SPECIAL_FLAGS=no
case $host_os in
solaris*)
ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
;;
esac
])
AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
test "x$ax_pthread_special_flags_added" != "xyes"],
[PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
ax_pthread_special_flags_added=yes])
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
[ax_cv_PTHREAD_PRIO_INHERIT],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
[[int i = PTHREAD_PRIO_INHERIT;]])],
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
])
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
test "x$ax_pthread_prio_inherit_defined" != "xyes"],
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
ax_pthread_prio_inherit_defined=yes
])
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
# More AIX lossage: compile with *_r variant
if test "x$GCC" != "xyes"; then
case $host_os in
aix*)
AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
[#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"],
[x/*],
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
AC_SUBST([PTHREAD_LIBS])
AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_CC])
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test "x$ax_pthread_ok" = "xyes"; then
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
:
else
ax_pthread_ok=no
$2
fi
AC_LANG_POP
])dnl AX_PTHREAD

View File

@ -0,0 +1,331 @@
//
// exSID_ftdiwrap.c
// An FTDI access wrapper for exSID USB
//
// (C) 2016 Thibaut VARENE
// License: GPLv2 - http://www.gnu.org/licenses/gpl-2.0.html
//
// Coding style is somewhat unorthodox ;P
/**
* @file
* exSID USB FTDI access wrapper
* @author Thibaut VARENE
* @date 2016
* @note Primary target is libftdi (cleaner API), adaptations are made for others.
* Sadly, libftdi's implementation of read() is unreliable (it doesn't seem
* to honour the usb timeout value and doesn't properly block long enough).
* This is why libftd2xx is prefered (tried first) for now. Unfortunately,
* using libftd2xx comes with a significant performance penalty since
* the code is tailored for libftdi.
*/
#include "exSID_defs.h"
#include <stdio.h>
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#define TEXT(x) x
#elif defined (_WIN32)
#include <windows.h>
#else
#error dl not supported
#endif
#ifdef HAVE_FTD2XX
#include <ftd2xx.h>
#ifndef XSFW_SUPPORT
#define XSFW_SUPPORT
#endif
#else
#warning libftd2xx support disabled.
#endif
#ifdef HAVE_FTDI
#include <ftdi.h>
#ifndef XSFW_SUPPORT
#define XSFW_SUPPORT
#endif
#else
#warning libftdi support disabled.
#endif
#ifndef XSFW_SUPPORT
#error No known method to access FTDI chip
#endif
#define XSFW_WRAPDECL
#include "exSID_ftdiwrap.h"
#define EXSID_INTERFACES "libftd2xx, libftdi" // XXX TODO Should be set by configure
static unsigned int dummysize = 0; // DWORD in unsigned int
#ifdef _WIN32
static HMODULE dlhandle = NULL;
static char *_xSfw_dlerror() {
DWORD dwError = GetLastError();
char* lpMsgBuf = NULL;
FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ALLOCATE_BUFFER,
0,
dwError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPSTR)&lpMsgBuf,
0,
NULL);
return lpMsgBuf;
}
#define _xSfw_dlopen(libName) LoadLibrary(libName)
#define _xSfw_dlsym(hModule, lpProcName) GetProcAddress(hModule, lpProcName)
#define _xSfw_dlclose(hModule) FreeLibrary(hModule)
#define _xSfw_clear_dlerror() SetLastError(0)
#define _xSfw_free_errstr(str) LocalFree(str)
#else // ! _WIN32
static void * dlhandle = NULL;
#define _xSfw_dlopen(filename) dlopen(filename, RTLD_NOW|RTLD_LOCAL)
#define _xSfw_dlsym(handle, symbol) dlsym(handle, symbol)
#define _xSfw_dlclose(handle) dlclose(handle)
#define _xSfw_dlerror() dlerror()
#define _xSfw_clear_dlerror() dlerror()
#define _xSfw_free_errstr(str) /* nothing */
#endif // _WIN32
/** Flag to signal which of the supported libraries is in use */
typedef enum {
XS_LIBNONE,
XS_LIBFTDI,
XS_LIBFTD2XX,
} libtype_t;
static libtype_t libtype = XS_LIBNONE;
// private functions
static int (* _xSfw_set_baudrate)(void * ftdi, int baudrate);
static int (* _xSfw_set_line_property)(void * ftdi, int bits, int sbit, int parity);
static int (* _xSfw_setflowctrl)(void * ftdi, int flowctrl);
static int (* _xSfw_set_latency_timer)(void * ftdi, unsigned char latency);
// callbacks for ftdi
#ifdef HAVE_FTDI
static int (* _ftdi_usb_open_desc)(void *, int, int, const char *, const char *);
#endif
// callbacks for FTD2XX
#ifdef HAVE_FTD2XX
static int (*_FT_Write)(void *, LPVOID, int, unsigned int *);
static int (*_FT_Read)(void *, LPVOID, int, unsigned int *);
static int (*_FT_OpenEx)(const char *, int, void **);
static int (*_FT_SetBaudRate)(void *, int);
static int (*_FT_SetDataCharacteristics)(void *, int, int, int);
static int (*_FT_SetFlowControl)(void *, int, int, int);
static int (*_FT_SetLatencyTimer)(void *, unsigned char);
static int (*_FT_Purge)(void *, int);
static int (*_FT_Close)(void *);
#endif
// wrappers for ftdi
#ifdef HAVE_FTDI
static int _xSfwftdi_usb_open_desc(void ** ftdi, int vid, int pid, const char * desc, const char * serial)
{
return _ftdi_usb_open_desc(*ftdi, vid, pid, desc, serial);
}
#endif
// wrappers for FTD2XX
#ifdef HAVE_FTD2XX
static int _xSfwFT_write_data(void * restrict ftdi, const unsigned char * restrict buf, int size)
{
static int rval;
if(unlikely(rval = _FT_Write(ftdi, (LPVOID)buf, size, &dummysize)))
return -rval;
else
return dummysize;
}
static int _xSfwFT_read_data(void * restrict ftdi, unsigned char * restrict buf, int size)
{
static int rval;
if (unlikely(rval = _FT_Read(ftdi, (LPVOID)buf, size, &dummysize)))
return -rval;
else
return dummysize;
}
static int _xSfwFT_usb_open_desc(void ** ftdi, int vid, int pid, const char * desc, const char * serial)
{
return -_FT_OpenEx(desc, FT_OPEN_BY_DESCRIPTION, ftdi);
}
static int _xSfwFT_usb_purge_buffers(void * ftdi)
{
return -_FT_Purge(ftdi, FT_PURGE_RX | FT_PURGE_TX);
}
static int _xSfwFT_usb_close(void * ftdi)
{
return -_FT_Close(ftdi);
}
static char * _xSfwFT_get_error_string(void * ftdi)
{
return "FTD2XX error";
}
#endif
/**
* Attempt to dlopen a known working library to access FTDI chip.
* Will try libftd2xx first, then libftdi.
* @return 0 on success, -1 on error.
*/
int xSfw_dlopen()
{
#define XSFW_DLSYM(a, b) \
*(void **)(&a) = _xSfw_dlsym(dlhandle, b); \
if (a == NULL) { \
dlerrorstr = _xSfw_dlerror(); \
goto dlfail; \
}
char * dlerrorstr = NULL;
#ifdef HAVE_FTD2XX
#ifdef _WIN32
# define LIBFTD2XX "ftd2xx"
#else
# define LIBFTD2XX "libftd2xx"
#endif
// try libftd2xx first - XXX TODO version check
if ((dlhandle = _xSfw_dlopen(TEXT(LIBFTD2XX SHLIBEXT)))) {
_xSfw_clear_dlerror(); // clear dlerror
xSfw_new = NULL;
xSfw_free = NULL;
XSFW_DLSYM(_FT_Write, "FT_Write");
xSfw_write_data = _xSfwFT_write_data;
XSFW_DLSYM(_FT_Read, "FT_Read");
xSfw_read_data = _xSfwFT_read_data;
XSFW_DLSYM(_FT_OpenEx, "FT_OpenEx");
xSfw_usb_open_desc = _xSfwFT_usb_open_desc;
XSFW_DLSYM(_FT_SetBaudRate, "FT_SetBaudRate");
XSFW_DLSYM(_FT_SetDataCharacteristics, "FT_SetDataCharacteristics");
XSFW_DLSYM(_FT_SetFlowControl, "FT_SetFlowControl");
XSFW_DLSYM(_FT_SetLatencyTimer, "FT_SetLatencyTimer");
XSFW_DLSYM(_FT_Purge, "FT_Purge");
xSfw_usb_purge_buffers = _xSfwFT_usb_purge_buffers;
XSFW_DLSYM(_FT_Close, "FT_Close");
xSfw_usb_close = _xSfwFT_usb_close;
xSfw_get_error_string = _xSfwFT_get_error_string;
libtype = XS_LIBFTD2XX;
xsdbg("Using libftd2xx\n");
}
else
#endif
#ifdef HAVE_FTDI
// otherwise try libftdi1 - XXX TODO version check
if ((dlhandle = _xSfw_dlopen(TEXT("libftdi1" SHLIBEXT)))) {
_xSfw_clear_dlerror(); // clear dlerror
XSFW_DLSYM(xSfw_new, "ftdi_new");
XSFW_DLSYM(xSfw_free, "ftdi_free");
XSFW_DLSYM(xSfw_write_data, "ftdi_write_data");
XSFW_DLSYM(xSfw_read_data, "ftdi_read_data");
XSFW_DLSYM(_ftdi_usb_open_desc, "ftdi_usb_open_desc");
xSfw_usb_open_desc = _xSfwftdi_usb_open_desc;
XSFW_DLSYM(_xSfw_set_baudrate, "ftdi_set_baudrate");
XSFW_DLSYM(_xSfw_set_line_property, "ftdi_set_line_property");
XSFW_DLSYM(_xSfw_setflowctrl, "ftdi_setflowctrl");
XSFW_DLSYM(_xSfw_set_latency_timer, "ftdi_set_latency_timer");
XSFW_DLSYM(xSfw_usb_purge_buffers, "ftdi_usb_purge_buffers");
XSFW_DLSYM(xSfw_usb_close, "ftdi_usb_close");
XSFW_DLSYM(xSfw_get_error_string, "ftdi_get_error_string");
libtype = XS_LIBFTDI;
xsdbg("Using libftdi\n");
}
else
#endif
// if none worked, fail.
{
xserror("No method found to access FTDI interface.\n"
"Are any of the following libraries installed?\n"
"\t" EXSID_INTERFACES "\n");
return -1;
}
return 0;
dlfail:
xserror("dlsym error: %s\n", dlerrorstr);
_xSfw_free_errstr(dlerrorstr);
xSfw_dlclose(dlhandle);
return -1;
}
/**
* Setup FTDI chip to match exSID firmware.
* Defaults to 8N1, no flow control.
* @param ftdi ftdi handle
* @param baudrate Target baudrate
* @param latency Target latency
* @return 0 on success, rval on error.
*/
int xSfw_usb_setup(void * ftdi, int baudrate, int latency)
{
int rval = 0;
#ifdef HAVE_FTDI
if (XS_LIBFTDI == libtype) {
rval = _xSfw_set_baudrate(ftdi, baudrate);
if (rval < 0)
xserror("SBR error\n");
rval = _xSfw_set_line_property(ftdi, BITS_8 , STOP_BIT_1, NONE);
if (rval < 0)
xserror("SLP error\n");
rval = _xSfw_setflowctrl(ftdi, SIO_DISABLE_FLOW_CTRL);
if (rval < 0)
xserror("SFC error\n");
rval = _xSfw_set_latency_timer(ftdi, latency);
if (rval < 0)
xserror("SLT error\n");
}
else
#endif
#ifdef HAVE_FTD2XX
if (XS_LIBFTD2XX == libtype) {
rval = -_FT_SetBaudRate(ftdi, baudrate);
if (rval < 0)
xserror("SBR error\n");
rval = -_FT_SetDataCharacteristics(ftdi, FT_BITS_8, FT_STOP_BITS_1, FT_PARITY_NONE);
if (rval < 0)
xserror("SLP error\n");
rval = -_FT_SetFlowControl(ftdi, FT_FLOW_NONE, 0, 0);
if (rval < 0)
xserror("SFC error\n");
rval = -_FT_SetLatencyTimer(ftdi, latency);
if (rval < 0)
xserror("SLT error\n");
}
else
#endif
xserror("Unkown access method\n");
return rval;
}
/**
* Release dlopen'd library.
*/
void xSfw_dlclose()
{
if (dlhandle != NULL) {
_xSfw_dlclose(dlhandle);
dlhandle = NULL;
}
}

View File

@ -0,0 +1,649 @@
//
// exSID.c
// A simple I/O library for exSID USB
//
// (C) 2015-2016 Thibaut VARENE
// License: GPLv2 - http://www.gnu.org/licenses/gpl-2.0.html
/**
* @file
* exSID USB I/O library
* @author Thibaut VARENE
* @date 2015-2016
* @version 1.3
*/
#include "exSID.h"
#include "exSID_defs.h"
#include "exSID_ftdiwrap.h"
#include <stdio.h>
#include <unistd.h>
#include <inttypes.h>
#ifdef EXSID_THREADED
#if defined(HAVE_THREADS_H) // Native C11 threads support
#include <threads.h>
#elif defined(HAVE_PTHREAD_H) // Trivial C11 over pthreads support
#include "c11threads.h"
#else
#error "No thread model available"
#endif
#endif // EXSID_TRHREADED
#ifdef DEBUG
static long accdrift = 0;
static unsigned long accioops = 0;
static unsigned long accdelay = 0;
static unsigned long acccycle = 0;
#endif
static int ftdi_status;
static void * ftdi = NULL;
#ifdef EXSID_THREADED
// Global variables for flip buffering
static unsigned char bufchar0[XS_BUFFSZ];
static unsigned char bufchar1[XS_BUFFSZ];
static unsigned char * restrict frontbuf = bufchar0, * restrict backbuf = bufchar1;
static int frontbuf_idx = 0, backbuf_idx = 0;
static mtx_t frontbuf_mtx; ///< mutex protecting access to frontbuf
static cnd_t frontbuf_ready_cnd, frontbuf_done_cnd;
static thrd_t thread_output;
#endif // EXSID_THREADED
/**
* cycles is uint_fast32_t. Technically, clkdrift should be int_fast64_t though
* overflow should not happen under normal conditions.
* negative values mean we're lagging, positive mean we're ahead.
* See it as a number of SID clocks queued to be spent.
*/
static int_fast32_t clkdrift = 0;
static inline void _exSID_write(uint_least8_t addr, uint8_t data, int flush);
/**
* Write routine to send data to the device.
* @note BLOCKING.
* @param buff pointer to a byte array of data to send
* @param size number of bytes to send
*/
static inline void _xSwrite(const unsigned char * buff, int size)
{
ftdi_status = xSfw_write_data(ftdi, buff, size);
#ifdef DEBUG
if (unlikely(ftdi_status < 0)) {
xserror("Error ftdi_write_data(%d): %s\n",
ftdi_status, xSfw_get_error_string(ftdi));
}
if (unlikely(ftdi_status != size)) {
xserror("ftdi_write_data only wrote %d (of %d) bytes\n",
ftdi_status, size);
}
#endif
}
/**
* Read routine to get data from the device.
* @note BLOCKING.
* @param buff pointer to a byte array that will be filled with read data
* @param size number of bytes to read
*/
static inline void _xSread(unsigned char * buff, int size)
{
#ifdef EXSID_THREADED
mtx_lock(&frontbuf_mtx);
while (frontbuf_idx)
cnd_wait(&frontbuf_done_cnd, &frontbuf_mtx);
#endif
ftdi_status = xSfw_read_data(ftdi, buff, size);
#ifdef EXSID_THREADED
mtx_unlock(&frontbuf_mtx);
#endif
#ifdef DEBUG
if (unlikely(ftdi_status < 0)) {
xserror("Error ftdi_read_data(%d): %s\n",
ftdi_status, xSfw_get_error_string(ftdi));
}
if (unlikely(ftdi_status != size)) {
xserror("ftdi_read_data only read %d (of %d) bytes\n",
ftdi_status, size);
}
#endif
}
#ifdef EXSID_THREADED
/**
* Writer thread. ** consummer **
* This thread consumes buffer prepared in _xSoutb().
* Since writes to the FTDI subsystem are blocking, this thread blocks when it's
* writing to the chip, and also while it's waiting for the front buffer to be ready.
* This ensures execution time consistency as _xSoutb() periodically wait for
* the front buffer to be ready before flipping buffers.
* @note BLOCKING.
* @param arg ignored
* @return DOES NOT RETURN, exits when frontbuf_idx is negative.
*/
static int _exSID_thread_output(void *arg)
{
xsdbg("thread started\n");
while (1) {
mtx_lock(&frontbuf_mtx);
// wait for frontbuf ready (not empty)
while (!frontbuf_idx)
cnd_wait(&frontbuf_ready_cnd, &frontbuf_mtx);
if (unlikely(frontbuf_idx < 0)) { // exit condition
xsdbg("thread exiting!\n");
mtx_unlock(&frontbuf_mtx);
thrd_exit(0);
}
_xSwrite(frontbuf, frontbuf_idx);
frontbuf_idx = 0;
// _xSread() and _xSoutb() are in the same thread of execution
// so it can only be one or the other waiting.
cnd_signal(&frontbuf_done_cnd);
mtx_unlock(&frontbuf_mtx);
}
return 0; // make the compiler happy
}
#endif // EXSID_THREADED
/**
* Single byte output routine. ** producer **
* Fills a static buffer with bytes to send to the device until the buffer is
* full or a forced write is triggered. Compensates for drift if XS_BDRATE isn't
* a multiple of of XS_SIDCLK.
* @note No drift compensation is performed on read operations.
* @param byte byte to send
* @param flush force write flush if positive, trigger thread exit if negative
*/
static void _xSoutb(uint8_t byte, int flush)
{
#ifndef EXSID_THREADED
static unsigned char backbuf[XS_BUFFSZ];
static int backbuf_idx = 0;
#else
unsigned char * bufptr = NULL;
#endif
backbuf[backbuf_idx++] = (unsigned char)byte;
/* if XS_BDRATE isn't a multiple of XS_SIDCLK we will drift:
every XS_BDRATE/(remainder of XS_SIDCLK/XS_BDRATE) we lose one SID cycle.
Compensate here */
#if (XS_SIDCLK % XS_RSBCLK)
if (!(backbuf_idx % (XS_RSBCLK/(XS_SIDCLK%XS_RSBCLK))))
clkdrift--;
#endif
if (likely((backbuf_idx < XS_BUFFSZ) && !flush))
return;
#ifdef EXSID_THREADED
// buffer dance
mtx_lock(&frontbuf_mtx);
// wait for frontbuf available (empty). Only triggers if previous
// write buffer hasn't been consummed before we get here again.
while (unlikely(frontbuf_idx))
cnd_wait(&frontbuf_done_cnd, &frontbuf_mtx);
if (unlikely(flush < 0)) // indicate exit request
frontbuf_idx = -1;
else { // flip buffers
bufptr = frontbuf;
frontbuf = backbuf;
frontbuf_idx = backbuf_idx;
backbuf = bufptr;
backbuf_idx = 0;
}
cnd_signal(&frontbuf_ready_cnd);
mtx_unlock(&frontbuf_mtx);
#else // unthreaded
_xSwrite(backbuf, backbuf_idx);
backbuf_idx = 0;
#endif
}
/**
* Device init routine.
* Must be called once before any operation is attempted on the device.
* Opens the named device, and sets various parameters: baudrate, parity, flow
* control and USB latency, and finally clears the RX and TX buffers.
* @return 0 on success, !0 otherwise.
*/
int exSID_init(void)
{
unsigned char dummy;
int ret = 0;
if (ftdi) {
xserror("Device already open!\n");
return -1;
}
if (xSfw_dlopen()) {
xserror("Failed to open dynamic loader\n");
return -1;
}
if (xSfw_new) {
ftdi = xSfw_new();
if (!ftdi) {
xserror("ftdi_new failed\n");
return -1;
}
}
ftdi_status = xSfw_usb_open_desc(&ftdi, XS_USBVID, XS_USBPID, XS_USBDSC, NULL);
if (ftdi_status < 0) {
xserror("Failed to open device: %d (%s)\n",
ftdi_status, xSfw_get_error_string(ftdi));
if (xSfw_free)
xSfw_free(ftdi);
ftdi = NULL;
return -1;
}
ftdi_status = xSfw_usb_setup(ftdi, XS_BDRATE, XS_USBLAT);
if (ftdi_status < 0) {
xserror("Failed to setup device\n");
return -1;
}
// success - device with device description "exSID USB" is open
xsdbg("Device opened\n");
#ifdef EXSID_THREADED
xsdbg("Thread setup\n");
ret = mtx_init(&frontbuf_mtx, mtx_plain);
ret |= cnd_init(&frontbuf_ready_cnd);
ret |= cnd_init(&frontbuf_done_cnd);
backbuf_idx = frontbuf_idx = 0;
ret |= thrd_create(&thread_output, _exSID_thread_output, NULL);
if (ret) {
xserror("Thread setup failed\n");
return -1;
}
#endif
xSfw_usb_purge_buffers(ftdi); // Purge both Rx and Tx buffers
// Wait for device ready by trying to read FV and wait for the answer
// XXX Broken with libftdi due to non-blocking read :-/
_xSoutb(XS_AD_IOCTFV, 1);
_xSread(&dummy, 1);
xsdbg("Rock'n'roll!\n");
#ifdef DEBUG
exSID_hwversion();
xsdbg("XS_BDRATE: %dkpbs, XS_BUFFSZ: %d bytes\n", XS_BDRATE/1000, XS_BUFFSZ);
xsdbg("XS_CYCCHR: %d, XS_CYCIO: %d, compensation every %d cycle(s)\n",
XS_CYCCHR, XS_CYCIO, (XS_SIDCLK % XS_RSBCLK) ? (XS_RSBCLK/(XS_SIDCLK%XS_RSBCLK)) : 0);
#endif
return 0;
}
/**
* Device exit routine.
* Must be called to release the device.
* Resets the SIDs and clears RX/TX buffers, releases all resources allocated
* in exSID_init().
*/
void exSID_exit(void)
{
if (ftdi) {
exSID_reset(0);
#ifdef EXSID_THREADED
_xSoutb(XS_AD_IOCTFV, -1); // signal end of thread
cnd_destroy(&frontbuf_ready_cnd);
mtx_destroy(&frontbuf_mtx);
thrd_join(thread_output, NULL);
#endif
xSfw_usb_purge_buffers(ftdi); // Purge both Rx and Tx buffers
ftdi_status = xSfw_usb_close(ftdi);
if (ftdi_status < 0)
xserror("unable to close ftdi device: %d (%s)\n",
ftdi_status, xSfw_get_error_string(ftdi));
if (xSfw_free)
xSfw_free(ftdi);
ftdi = NULL;
#ifdef DEBUG
xsdbg("mean jitter: %.1f cycle(s) over %lu I/O ops\n",
((float)accdrift/accioops), accioops);
xsdbg("bandwidth used for I/O ops: %lu%% (approx)\n",
100-(accdelay*100/acccycle));
accdrift = accioops = accdelay = acccycle = 0;
#endif
}
clkdrift = 0;
xSfw_dlclose();
}
/**
* SID reset routine.
* Performs a hardware reset on the SIDs.
* @note since the reset procedure in firmware will stall the device for more than
* XS_CYCCHR, reset forcefully waits for enough time before resuming execution
* via a call to usleep();
* @param volume volume to set the SIDs to after reset.
*/
void exSID_reset(uint_least8_t volume)
{
xsdbg("rvol: %" PRIxLEAST8 "\n", volume);
_xSoutb(XS_AD_IOCTRS, 1); // this will take more than XS_CYCCHR
usleep(1000); // sleep for 1ms
_exSID_write(0x18, volume, 1); // this only needs 2 bytes which matches the input buffer of the PIC so all is well
clkdrift = 0;
}
/**
* SID chipselect routine.
* Selects which SID will play the tunes. If neither CHIP0 or CHIP1 is chosen,
* both SIDs will operate together. Accounts for elapsed cycles.
* @param chip SID selector value, see exSID.h.
*/
void exSID_chipselect(int chip)
{
clkdrift -= XS_CYCCHR;
if (XS_CS_CHIP0 == chip)
_xSoutb(XS_AD_IOCTS0, 0);
else if (XS_CS_CHIP1 == chip)
_xSoutb(XS_AD_IOCTS1, 0);
else
_xSoutb(XS_AD_IOCTSB, 0);
}
/**
* Hardware and firmware version of the device.
* Queries the device for the hardware revision and current firmware version
* and returns both in the form of a 16bit integer: MSB is an ASCII
* character representing the hardware revision (e.g. 0x42 = "B"), and LSB
* is a number representing the firmware version in decimal integer.
* Does NOT account for elapsed cycles.
* @return version information as described above.
*/
uint16_t exSID_hwversion(void)
{
unsigned char inbuf[2];
uint16_t out = 0;
_xSoutb(XS_AD_IOCTHV, 0);
_xSoutb(XS_AD_IOCTFV, 1);
_xSread(inbuf, 2);
out = inbuf[0] << 8 | inbuf[1]; // ensure proper order regardless of endianness
xsdbg("HV: %c, FV: %hhu\n", inbuf[0], inbuf[1]);
return out;
}
/**
* Poll-based blocking (long) delay.
* Calls to IOCTLD polled delay, for "very" long delays (thousands of SID clocks).
* Total delay should be 3*CYCCHR + WAITCNT(500 + 1) (see PIC firmware), and for
* better performance, ideally the requested delay time should be close to a multiple
* of XS_USBLAT milliseconds.
* @warning NOT CYCLE ACCURATE
* @param cycles how many SID clocks to wait for.
*/
void exSID_polldelay(uint_fast32_t cycles)
{
#define SBPDOFFSET (3*XS_CYCCHR)
#define SBPDMULT 501
int delta;
int multiple; // minimum 1 full loop
unsigned char dummy;
multiple = cycles - SBPDOFFSET;
delta = multiple % SBPDMULT;
multiple /= SBPDMULT;
//xsdbg("ldelay: %d, multiple: %d, delta: %d\n", cycles, multiple, delta);
#ifdef DEBUG
if (unlikely((multiple <=0) || (multiple > 255)))
xserror("Wrong delay!\n");
#endif
// send delay command and flush queue
_exSID_write(XS_AD_IOCTLD, (unsigned char)multiple, 1);
// wait for answer with blocking read
_xSread(&dummy, 1);
// deal with remainder
exSID_delay(delta);
#ifdef DEBUG
acccycle += (cycles - delta);
accdelay += (cycles - delta);
#endif
}
/**
* Private delay loop.
* @note will block every time a device write is triggered, blocking time will be
* equal to the number of bytes written times XS_MINDEL.
* @param cycles how many SID clocks to loop for.
*/
static inline void _xSdelay(uint_fast32_t cycles)
{
#ifdef DEBUG
accdelay += cycles;
#endif
while (likely(cycles >= XS_MINDEL)) {
_xSoutb(XS_AD_IOCTD1, 0);
cycles -= XS_MINDEL;
clkdrift -= XS_MINDEL;
}
#ifdef DEBUG
accdelay -= cycles;
#endif
}
/**
* Write-based delay.
* Calls _xSdelay() while leaving enough lead time for an I/O operation.
* @param cycles how many SID clocks to loop for.
*/
void exSID_delay(uint_fast32_t cycles)
{
clkdrift += cycles;
#ifdef DEBUG
acccycle += cycles;
#endif
if (unlikely(clkdrift <= XS_CYCIO)) // never delay for less than a full write would need
return; // too short
_xSdelay(clkdrift - XS_CYCIO);
}
/**
* Private write routine for a tuple address + data.
* @param addr target address to write to.
* @param data data to write at that address.
* @param flush if non-zero, force immediate flush to device.
*/
static inline void _exSID_write(uint_least8_t addr, uint8_t data, int flush)
{
_xSoutb((unsigned char)addr, 0);
_xSoutb((unsigned char)data, flush);
}
/**
* Timed write routine, attempts cycle-accurate writes.
* This function will be cycle-accurate provided that no two consecutive reads or writes
* are less than XS_CYCIO apart and the leftover delay is <= XS_MAXADJ*XS_ADJMLT SID clock cycles.
* @param cycles how many SID clocks to wait before the actual data write.
* @param addr target address.
* @param data data to write at that address.
*/
void exSID_clkdwrite(uint_fast32_t cycles, uint_least8_t addr, uint8_t data)
{
static int adj = 0;
#ifdef DEBUG
if (unlikely(addr > 0x18)) {
xserror("Invalid write: %.2" PRIxLEAST8 "\n", addr);
exSID_delay(cycles);
return;
}
#endif
// actual write will cost XS_CYCIO. Delay for cycles - XS_CYCIO then account for the write
clkdrift += cycles;
if (clkdrift > XS_CYCIO)
_xSdelay(clkdrift - XS_CYCIO);
clkdrift -= XS_CYCIO; // write is going to consume XS_CYCIO clock ticks
#ifdef DEBUG
if (clkdrift >= XS_CYCCHR)
xserror("Impossible drift adjustment! %" PRIdFAST32 " cycles\n", clkdrift);
else if (clkdrift < 0)
accdrift += clkdrift;
#endif
/* if we are still going to be early, delay actual write by up to XS_MAXAD*XS_ADJMLT ticks
At this point it is guaranted that clkdrift will be < XS_MINDEL (== XS_CYCCHR). */
if (likely(clkdrift >= 0)) {
adj = clkdrift % (XS_MAXADJ*XS_ADJMLT+1);
/* if XS_MAXADJ*XS_ADJMLT is >= clkdrift, modulo will give the same results
as the correct test:
adj = (clkdrift < XS_MAXADJ*XS_ADJMLT ? clkdrift : XS_MAXADJ*XS_ADJMLT)
but without an extra conditional branch. If is is < clkdrift, then it
seems to provide better results by evening jitter accross writes. So
it's the preferred solution for all cases. */
adj /= XS_ADJMLT;
addr = (unsigned char)(addr | (adj << 5)); // final delay encoded in top 3 bits of address
#ifdef DEBUG
accdrift += (clkdrift - adj*XS_ADJMLT);
#endif
//xsdbg("drft: %d, adj: %d, addr: %.2hhx, data: %.2hhx\n", clkdrift, adj*XS_ADJMLT, (char)(addr | (adj << 5)), data);
}
#ifdef DEBUG
acccycle += cycles;
accioops++;
#endif
//xsdbg("delay: %d, clkdrift: %d\n", cycles, clkdrift);
_exSID_write(addr, data, 0);
}
/**
* Private read routine for a given address.
* @param addr target address to read from.
* @param flush if non-zero, force immediate flush to device.
* @return data read from address.
*/
static inline uint8_t _exSID_read(uint_least8_t addr, int flush)
{
static unsigned char data;
_xSoutb(addr, flush); // XXX
_xSread(&data, flush); // blocking
xsdbg("addr: %.2" PRIxLEAST8 ", data: %.2hhx\n", addr, data);
return data;
}
/**
* BLOCKING Timed read routine, attempts cycle-accurate reads.
* This function will be cycle-accurate provided that no two consecutive reads or writes
* are less than XS_CYCIO apart and leftover delay is <= XS_MAXADJ*XS_ADJMLT SID clock cycles.
* Read result will only be available after a full XS_CYCIO, giving clkdread() the same
* run time as clkdwrite(). There's a 2-cycle negative adjustment in the code because
* that's the actual offset from the write calls ('/' denotes falling clock edge latch),
* which the following ASCII tries to illustrate: <br />
* Write looks like this in firmware:
* > ...|_/_|...
* ...end of data byte read | cycle during which write is enacted / next cycle | etc... <br />
* Read looks like this in firmware:
* > ...|_|_|_/_|_|...
* ...end of address byte read | 2 cycles for address processing | cycle during which SID is read /
* then half a cycle later the CYCCHR-long data TX starts, cycle completes | another cycle | etc... <br />
* This explains why reads happen a relative 2-cycle later than then should with
* respect to writes.
* @note The actual time the read will take to complete depends
* on the USB bus activity and settings. It *should* complete in XS_USBLAT ms, but
* not less, meaning that read operations are bound to introduce timing inaccuracy.
* As such, this function is only really provided as a proof of concept but should
* better be avoided.
* @param cycles how many SID clocks to wait before the actual data read.
* @param addr target address.
* @return data read from address.
*/
uint8_t exSID_clkdread(uint_fast32_t cycles, uint_least8_t addr)
{
static int adj = 0;
#ifdef DEBUG
if (unlikely((addr < 0x19) || (addr > 0x1C))) {
xserror("Invalid read: %.2" PRIxLEAST8 "\n", addr);
exSID_delay(cycles);
return 0xFF;
}
#endif
// actual read will happen after XS_CYCCHR. Delay for cycles - XS_CYCCHR then account for the read
clkdrift += -2; // 2-cycle offset adjustement, see function documentation.
clkdrift += cycles;
if (clkdrift > XS_CYCCHR)
_xSdelay(clkdrift - XS_CYCCHR);
clkdrift -= XS_CYCCHR; // read request is going to consume XS_CYCCHR clock ticks
#ifdef DEBUG
if (clkdrift > XS_CYCCHR)
xserror("Impossible drift adjustment! %" PRIdFAST32 " cycles\n", clkdrift);
else if (clkdrift < 0) {
accdrift += clkdrift;
xsdbg("Late read request! %" PRIdFAST32 " cycles\n", clkdrift);
}
#endif
// if we are still going to be early, delay actual read by up to XS_MAXADJ*XS_ADJMLT ticks
if (likely(clkdrift >= 0)) {
adj = clkdrift % (XS_MAXADJ*XS_ADJMLT+1); // see clkdwrite()
adj /= XS_ADJMLT;
addr = (unsigned char)(addr | (adj << 5)); // final delay encoded in top 3 bits of address
#ifdef DEBUG
accdrift += (clkdrift - adj*XS_ADJMLT);
#endif
//xsdbg("drft: %d, adj: %d, addr: %.2hhx, data: %.2hhx\n", clkdrift, adj*XS_ADJMLT, (char)(addr | (adj << 5)), data);
}
#ifdef DEBUG
acccycle += cycles;
accioops++;
#endif
// after read has completed, at least another XS_CYCCHR will have been spent
clkdrift -= XS_CYCCHR;
//xsdbg("delay: %d, clkdrift: %d\n", cycles, clkdrift);
return _exSID_read(addr, 1);
}

View File

@ -0,0 +1,169 @@
/***************************************************************************
exsid.cpp - exSID support interface.
-------------------
Based on hardsid.cpp (C) 2001 Jarno Paananen
copyright : (C) 2015 Thibaut VARENE
***************************************************************************/
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License version 2 as *
* published by the Free Software Foundation. *
* *
***************************************************************************/
#include "exsid-emu.h"
#include <fcntl.h>
#include <unistd.h>
#include <stdio.h>
#include <sstream>
#ifdef HAVE_EXSID
# include <exSID.h>
#else
# include "driver/exSID.h"
#endif
namespace libsidplayfp
{
unsigned int exSID::sid = 0;
const char* exSID::getCredits()
{
static std::string credits;
if (credits.empty())
{
// Setup credits
std::ostringstream ss;
ss << "exSID V" << VERSION << " Engine:\n";
ss << "\t(C) 2015 Thibaut VARENE\n";
credits = ss.str();
}
return credits.c_str();
}
exSID::exSID(sidbuilder *builder) :
sidemu(builder),
m_status(false),
readflag(false)
{
if (exSID_init() < 0)
{
//FIXME should get error message from the driver
m_error = "Error initializing exSID";
return;
}
m_status = true;
sid++;
sidemu::reset();
muted[0] = muted[1] = muted[2] = false;
}
exSID::~exSID()
{
sid--;
exSID_exit();
}
void exSID::reset(uint8_t volume)
{
exSID_reset(volume);
m_accessClk = 0;
readflag = false;
}
unsigned int exSID::delay()
{
event_clock_t cycles = eventScheduler->getTime(m_accessClk, EVENT_CLOCK_PHI1);
m_accessClk += cycles;
while (cycles > 0xffff)
{
exSID_delay(0xffff);
cycles -= 0xffff;
}
return static_cast<unsigned int>(cycles);
}
void exSID::clock()
{
const unsigned int cycles = delay();
if (cycles)
exSID_delay(cycles);
}
uint8_t exSID::read(uint_least8_t addr)
{
if ((addr < 0x19) || (addr > 0x1C))
{
return busValue;
}
if (!readflag)
{
printf("WARNING: Read support is limited. This file may not play correctly!\n");
readflag = true;
// Here we implement the "safe" detection routine return values
if (0x1b == addr) { // we could implement a commandline-chosen return byte here
if (SidConfig::MOS8580 == runmodel)
return 0x02;
else
return 0x03;
}
}
const unsigned int cycles = delay();
return exSID_clkdread(cycles, addr);
}
void exSID::write(uint_least8_t addr, uint8_t data)
{
busValue = data;
if (addr > 0x18)
return;
const unsigned int cycles = delay();
if (addr % 7 == 4 && muted[addr / 7])
data = 0;
exSID_clkdwrite(cycles, addr, data);
}
void exSID::voice(unsigned int num, bool mute)
{
muted[num] = mute;
}
void exSID::model(SidConfig::sid_model_t model)
{
runmodel = model;
exSID_chipselect(model == SidConfig::MOS8580 ? XS_CS_CHIP1 : XS_CS_CHIP0);
}
void exSID::flush() {}
bool exSID::lock(EventScheduler* env)
{
return sidemu::lock(env);
}
void exSID::unlock()
{
sidemu::unlock();
}
}

View File

@ -0,0 +1,48 @@
//
// exSID.h
// A simple I/O library for exSID USB - interface header file
//
// (C) 2015-2016 Thibaut VARENE
// License: GPLv2 - http://www.gnu.org/licenses/gpl-2.0.html
//
/**
* @file
* libexsid interface header file.
*/
#ifndef exSID_h
#define exSID_h
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h>
#define XS_VERSION "1.3pre"
/* Chip selection values for exSID_chipselect() */
enum {
XS_CS_CHIP0, ///< 6581
XS_CS_CHIP1, ///< 8580
XS_CS_BOTH, ///< Both chips. @warning Invalid for reads: unknown behaviour!
};
// public interface
int exSID_init(void);
void exSID_exit(void);
void exSID_reset(uint_least8_t volume);
uint16_t exSID_hwversion(void);
void exSID_chipselect(int chip);
void exSID_delay(uint_fast32_t cycles);
void exSID_polldelay(uint_fast32_t cycles);
void exSID_clkdwrite(uint_fast32_t cycles, uint_least8_t addr, uint8_t data);
uint8_t exSID_clkdread(uint_fast32_t cycles, uint_least8_t addr);
#define exSID_write(addr, data) exSID_clkdwrite(0, addr, data)
#define exSID_read(addr) exSID_clkdread(0, addr)
#ifdef __cplusplus
}
#endif
#endif /* exSID_h */

View File

@ -127,19 +127,19 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.stmix = 0.596385f;
break;
case 5:
// current score 11076 (341)
bestparams.threshold = 0.933971584f;
bestparams.pulsestrength = 3.05553484f;
bestparams.distance1 = 1.01347399f;
bestparams.distance2 = 1.19006455f;
// current score 10992 (367)
bestparams.threshold = 0.933451474f;
bestparams.pulsestrength = 3.04320669f;
bestparams.distance1 = 1.01660681f;
bestparams.distance2 = 1.19298482f;
break;
case 6:
// current score 5546 (298)
bestparams.threshold = 0.906958044f;
bestparams.pulsestrength = 3.26302814f;
bestparams.topbit = 1.57676244f; // ???
bestparams.distance1 = 0.101703964f;
bestparams.distance2 = 0.188207671f;
// current score 5532 (298)
bestparams.threshold = 0.906489253f;
bestparams.pulsestrength = 3.24875951f;
bestparams.topbit = 1.57458532f; // ???
bestparams.distance1 = 0.101274647f;
bestparams.distance2 = 0.188963249f;
break;
case 7:
// current score 850 (60)
@ -165,19 +165,19 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.stmix = 0.53945446f;
break;
case 5:
// current score 9998 (374)
bestparams.threshold = 0.919503033f;
bestparams.pulsestrength = 2.31039476f;
bestparams.distance1 = 1.02747607f;
bestparams.distance2 = 1.20545173f;
// current score 9924 (426)
bestparams.threshold = 0.927432716f;
bestparams.pulsestrength = 2.37539339f;
bestparams.distance1 = 1.00424087f;
bestparams.distance2 = 1.2061156f;
break;
case 6:
// current score 12373 (857)
bestparams.threshold = 0.88266623f;
bestparams.pulsestrength = 1.84488404f;
bestparams.topbit = 1.12532759f; // ???
bestparams.distance1 = 0.0970706269f;
bestparams.distance2 = 0.45848763f;
// current score 12332 (857)
bestparams.threshold = 0.883725405f;
bestparams.pulsestrength = 1.86024225f;
bestparams.topbit = 1.12501097f; // ???
bestparams.distance1 = 0.0956423283f;
bestparams.distance2 = 0.457357466f;
break;
case 7:
// current score 258 (64)
@ -255,12 +255,13 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.distance2 = 0.102936305f;
break;
case 7:
// current score 6 (4)
bestparams.threshold = 0.944511f;
bestparams.pulsestrength = 1.57551f;
bestparams.topbit = 0.f;
bestparams.distance1 = 1.29601f;
bestparams.stmix = 0.551461f;
// current score 2 (2)
bestparams.threshold = 0.896021485f;
bestparams.pulsestrength = 0.865568995f;
bestparams.topbit = 0.002f;
bestparams.distance1 = 0.98756659f;
bestparams.distance2 = 1.17235816f;
bestparams.stmix = 0.547210157f;
break;
}
break;
@ -284,12 +285,12 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.distance2 = 1.1484f;
break;
case 6:
// current score 10645 (570)
bestparams.threshold = 0.91165f;
bestparams.pulsestrength = 2.3122f;
bestparams.topbit = 1.1058f;
bestparams.distance1 = 0.0545f;
bestparams.distance2 = 0.2524f;
// current score 10639 (569)
bestparams.threshold = 0.912298322f;
bestparams.pulsestrength = 2.32252741f;
bestparams.topbit = 1.10538983f; // ???
bestparams.distance1 = 0.0537932068f;
bestparams.distance2 = 0.252674758f;
break;
case 7:
// current score 64 (2)
@ -307,11 +308,12 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
switch (wave)
{
case 3:
// current score 254 (82)
bestparams.threshold = 0.962954f;
// current score 230 (78)
bestparams.threshold = 0.97577709f;
bestparams.topbit = 0.f;
bestparams.distance1 = 2.65459f;
bestparams.stmix = 0.598044f;
bestparams.distance1 = 3.35368633f;
bestparams.distance2 = 2.60800719f;
bestparams.stmix = 0.670109689f;
break;
case 5:
// current score 2744 (91)
@ -441,12 +443,13 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.distance2 = 0.096527569f;
break;
case 7:
// current score 106 (12)
bestparams.threshold = 0.951241f;
bestparams.pulsestrength = 1.70629f;
bestparams.topbit = 0.f;
bestparams.distance1 = 1.34529f;
bestparams.stmix = 0.555384f;
// current score 102 (10)
bestparams.threshold = 0.931423545f;
bestparams.pulsestrength = 1.41654074f;
bestparams.topbit = 0.01f;
bestparams.distance1 = 1.14805245f;
bestparams.distance2 = 1.35858405f;
bestparams.stmix = 0.48002857f;
break;
}
break;
@ -588,12 +591,13 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.distance2 = 0.158718824f;
break;
case 7:
// current score 16 (8)
bestparams.threshold = 0.943379f;
bestparams.pulsestrength = 1.60476f;
bestparams.topbit = 0.f;
bestparams.distance1 = 1.34915f;
bestparams.stmix = 0.593137f;
// current score 2 (2)
bestparams.threshold = 0.901689231f;
bestparams.pulsestrength = 1.06335056f;
bestparams.topbit = 0.004f;
bestparams.distance1 = 1.04226708f;
bestparams.distance2 = 1.29957008f;
bestparams.stmix = 0.509225965f;
break;
}
break;
@ -625,13 +629,13 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.distance2 = 0.0294511318f;
break;
case 7:
// current score 183 (19)
bestparams.threshold = 0.918962359f;
bestparams.pulsestrength = 1.20391202f;
bestparams.topbit = 0.f;
bestparams.distance1 = 1.15325093f;
bestparams.distance2 = 1.22326899f;
bestparams.stmix = 0.673512697f;
// current score 181 (17)
bestparams.threshold = 0.919196963f;
bestparams.pulsestrength = 1.21124005f;
bestparams.topbit = 0.002f;
bestparams.distance1 = 1.15129697f;
bestparams.distance2 = 1.22111976f;
bestparams.stmix = 0.672436357f;
break;
}
break;
@ -737,13 +741,13 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.distance2 = 0.139843836f;
break;
case 7:
// current score 150 (16)
bestparams.threshold = 0.937769651f;
bestparams.pulsestrength = 1.57481205f;
bestparams.topbit = 0.f;
bestparams.distance1 = 1.21054459f;
bestparams.distance2 = 1.23291314f;
bestparams.stmix = 0.740504205f;
// current score 148 (14)
bestparams.threshold = 0.933473349f;
bestparams.pulsestrength = 1.51940262f;
bestparams.topbit = 0.0075f;
bestparams.distance1 = 1.15147519f;
bestparams.distance2 = 1.23372996f;
bestparams.stmix = 0.693227589f;
break;
}
break;
@ -850,13 +854,13 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.distance2 = 0.184085369f;
break;
case 7:
// current score 2347 (81)
bestparams.threshold = 0.95865f;
bestparams.pulsestrength = 1.0106f;
bestparams.topbit = 1.0017f;
bestparams.distance1 = 1.3707f;
bestparams.distance2 = 1.8647f;
bestparams.stmix = 0.76826f;
// current score 2120 (55)
bestparams.threshold = 0.945680082f;
bestparams.pulsestrength = 1.08290601f;
bestparams.topbit = 0.996945083f;
bestparams.distance1 = 0.935811639f;
bestparams.distance2 = 2.05300689f;
bestparams.stmix = 0.558153927f;
break;
}
break;
@ -888,13 +892,13 @@ static void Optimize(const ref_vector_t &reference, int wave, char chip)
bestparams.distance2 = 0.294430673f;
break;
case 7:
// current score 2179 (114)
bestparams.threshold = 0.99762404f;
bestparams.pulsestrength = 1.69934988f;
bestparams.topbit = 0.995506406f;
bestparams.distance1 = 0.859833479f;
bestparams.distance2 = 1.48090434f;
bestparams.stmix = 0.730056643f;
// current score 2149 (110)
bestparams.threshold = 0.997233212f;
bestparams.pulsestrength = 1.69910455f;
bestparams.topbit = 0.995346427f;
bestparams.distance1 = 0.861709118f;
bestparams.distance2 = 1.48027956f;
bestparams.stmix = 0.730670393f;
break;
}
break;

View File

@ -93,7 +93,7 @@ public:
const char *getName() const override { return m_name.c_str(); }
const char *getVersion() const override { return m_version.c_str(); }
unsigned int getNumberOfCredits() const override { return m_credits.size(); }
unsigned int getNumberOfCredits() const override { return (unsigned int) m_credits.size(); }
const char *getCredits(unsigned int i) const override { return i<m_credits.size()?m_credits[i].c_str():""; }
unsigned int getMaxsids() const override { return m_maxsids; }

View File

@ -1,3 +1,6 @@
1.3pre
* Switch to threaded output for better playback performance
1.2
* Use dynamic loading to access FTDI chip
* Enable ftd2xx support

View File

@ -8,9 +8,10 @@ if MINGW32
W32_LDFLAGS = -no-undefined
endif
AM_CPPFLAGS = \
AM_CPPFLAGS = -Wall -fstrict-aliasing \
$(FTDI_CFLAGS) \
${W32_CPPFLAGS} \
$(PTHREAD_CFLAGS) \
@debug_flags@
EXTRA_DIST = \
@ -19,14 +20,14 @@ docs/mainpage.dox
lib_LTLIBRARIES = libexsid.la
libexsid_la_SOURCES = \
exSID.c exSID_defs.h exSID_ftdiwrap.h exSID_ftdiwrap.c
exSID.c exSID_defs.h exSID_ftdiwrap.h exSID_ftdiwrap.c c11threads.h
libexsid_la_HEADERS = \
exSID.h
libexsid_ladir = $(includedir)
libexsid_la_LDFLAGS = -version-info $(LIBEXSIDVERSION) $(W32_LDFLAGS)
libexsid_la_LDFLAGS = -version-info $(LIBEXSIDVERSION) $(W32_LDFLAGS) $(PTHREAD_LIBS) $(PTHREAD_CFLAGS)
#=========================================================

View File

@ -0,0 +1,270 @@
/*
Author: John Tsiombikas <nuclear@member.fsf.org>
I place this piece of code in the public domain. Feel free to use as you see
fit. I'd appreciate it if you keep my name at the top of the code somehwere,
but whatever.
Main project site: https://github.com/jtsiomb/c11threads
*/
/* TODO: port to MacOSX: no timed mutexes under macosx...
* just delete that bit if you don't care about timed mutexes
*/
#ifndef C11THREADS_H_
#define C11THREADS_H_
#include <time.h>
#include <errno.h>
#include <pthread.h>
#include <sched.h> /* for sched_yield */
#include <sys/time.h>
#define ONCE_FLAG_INIT PTHREAD_ONCE_INIT
/* types */
typedef pthread_t thrd_t;
typedef pthread_mutex_t mtx_t;
typedef pthread_cond_t cnd_t;
typedef pthread_key_t tss_t;
typedef pthread_once_t once_flag;
typedef int (*thrd_start_t)(void*);
typedef void (*tss_dtor_t)(void*);
typedef struct {
time_t sec;
long nsec;
} xtime;
enum {
mtx_plain = 0,
mtx_recursive = 1,
mtx_timed = 2,
mtx_try = 4
};
enum {
thrd_success,
thrd_busy,
thrd_error,
thrd_nomem
};
/* ---- thread management ---- */
static inline int thrd_create(thrd_t *thr, thrd_start_t func, void *arg)
{
/* XXX there's a third possible value returned according to the standard:
* thrd_nomem. but it doesn't seem to correspond to any pthread_create errors.
*/
return pthread_create(thr, 0, (void*(*)(void*))func, arg) == 0 ? thrd_success : thrd_error;
}
static inline void thrd_exit(int res)
{
pthread_exit((void*)(long)res);
}
static inline int thrd_join(thrd_t thr, int *res)
{
void *retval;
if(pthread_join(thr, &retval) != 0) {
return thrd_error;
}
if(res) {
*res = (long)retval;
}
return thrd_success;
}
static inline int thrd_detach(thrd_t thr)
{
return pthread_detach(thr) == 0 ? thrd_success : thrd_error;
}
static inline thrd_t thrd_current(void)
{
return pthread_self();
}
static inline int thrd_equal(thrd_t a, thrd_t b)
{
return pthread_equal(a, b);
}
static inline void thrd_sleep(const xtime *xt)
{
int res;
struct timespec ts;
ts.tv_sec = (long)xt->sec;
ts.tv_nsec = xt->nsec;
do {
struct timespec rem;
res = nanosleep(&ts, &rem);
ts = rem;
} while(res == -1 && errno == EINTR);
}
static inline void thrd_yield(void)
{
sched_yield();
}
/* ---- mutexes ---- */
static inline int mtx_init(mtx_t *mtx, int type)
{
int res;
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
/* XXX I don't think these are exactly correct semantics */
if(type & mtx_try) {
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
}
#if 0
if(type & mtx_timed) {
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_TIMED_NP);
}
#endif
if(type & mtx_recursive) {
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
}
res = pthread_mutex_init(mtx, &attr) == 0 ? thrd_success : thrd_error;
pthread_mutexattr_destroy(&attr);
return res;
}
static inline void mtx_destroy(mtx_t *mtx)
{
pthread_mutex_destroy(mtx);
}
static inline int mtx_lock(mtx_t *mtx)
{
int res = pthread_mutex_lock(mtx);
if(res == EDEADLK) {
return thrd_busy;
}
return res == 0 ? thrd_success : thrd_error;
}
static inline int mtx_trylock(mtx_t *mtx)
{
int res = pthread_mutex_trylock(mtx);
if(res == EBUSY) {
return thrd_busy;
}
return res == 0 ? thrd_success : thrd_error;
}
#if 0
static inline int mtx_timedlock(mtx_t *mtx, const xtime *xt)
{
int res;
struct timespec ts;
ts.tv_sec = (long)xt->sec;
ts.tv_nsec = xt->nsec;
if((res = pthread_mutex_timedlock(mtx, &ts)) == EBUSY) {
return thrd_busy;
}
return res == 0 ? thrd_success : thrd_error;
}
#endif
static inline int mtx_unlock(mtx_t *mtx)
{
return pthread_mutex_unlock(mtx) == 0 ? thrd_success : thrd_error;
}
/* ---- condition variables ---- */
static inline int cnd_init(cnd_t *cond)
{
return pthread_cond_init(cond, 0) == 0 ? thrd_success : thrd_error;
}
static inline void cnd_destroy(cnd_t *cond)
{
pthread_cond_destroy(cond);
}
static inline int cnd_signal(cnd_t *cond)
{
return pthread_cond_signal(cond) == 0 ? thrd_success : thrd_error;
}
static inline int cnd_broadcast(cnd_t *cond)
{
return pthread_cond_broadcast(cond) == 0 ? thrd_success : thrd_error;
}
static inline int cnd_wait(cnd_t *cond, mtx_t *mtx)
{
return pthread_cond_wait(cond, mtx) == 0 ? thrd_success : thrd_error;
}
static inline int cnd_timedwait(cnd_t *cond, mtx_t *mtx, const xtime *xt)
{
int res;
struct timespec ts;
ts.tv_sec = (long)xt->sec;
ts.tv_nsec = xt->nsec;
if((res = pthread_cond_timedwait(cond, mtx, &ts)) != 0) {
return res == ETIMEDOUT ? thrd_busy : thrd_error;
}
return thrd_success;
}
/* ---- thread-specific data ---- */
static inline int tss_create(tss_t *key, tss_dtor_t dtor)
{
return pthread_key_create(key, dtor) == 0 ? thrd_success : thrd_error;
}
static inline void tss_delete(tss_t key)
{
pthread_key_delete(key);
}
static inline int tss_set(tss_t key, void *val)
{
return pthread_setspecific(key, val) == 0 ? thrd_success : thrd_error;
}
static inline void *tss_get(tss_t key)
{
return pthread_getspecific(key);
}
/* ---- misc ---- */
static inline void call_once(once_flag *flag, void (*func)(void))
{
pthread_once(flag, func);
}
/* TODO take base into account */
static inline int xtime_get(xtime *xt, int base)
{
struct timeval tv;
gettimeofday(&tv, 0);
xt->sec = tv.tv_sec;
xt->nsec = tv.tv_usec * 1000;
return base;
}
#endif /* C11THREADS_H_ */

View File

@ -1,4 +1,4 @@
AC_INIT([libexsid], [1.2], [], [], [http://hacks.slashdirt.org/hw/exsid/#libexsid])
AC_INIT([libexsid], [1.3pre], [], [], [http://hacks.slashdirt.org/hw/exsid/#libexsid])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CONFIG_SRCDIR([exSID.c])
@ -12,6 +12,11 @@ PKG_PROG_PKG_CONFIG
AC_CANONICAL_HOST
AC_PROG_CC
AC_PROG_CC_STDC
AC_C_RESTRICT
AC_C_INLINE
dnl The dlopen() function is in the C library for *BSD and in
dnl libdl on GLIBC-based systems. Use native functions on MinGW.
AS_CASE([$host_os],
@ -50,6 +55,15 @@ PKG_CHECK_EXISTS([libftdi1 >= 1.0],
)
AC_SUBST([FTDI_CFLAGS])
# check for thread model if available
AC_CHECK_HEADERS([threads.h],
[AC_DEFINE([EXSID_THREADED], 1, [Define for threaded driver])],
[AX_PTHREAD(
[AC_DEFINE([EXSID_THREADED], 1, [Define for threaded driver])]
[AC_DEFINE([HAVE_PTHREAD_H], 1, [Define to 1 if you have pthread.h])]
)]
)
eval loadable_shrext=$shrext_cmds
AC_DEFINE_UNQUOTED([SHLIBEXT], ["${loadable_shrext}"], [Shared library extension])

View File

@ -10,7 +10,7 @@
* exSID USB I/O library
* @author Thibaut VARENE
* @date 2015-2016
* @version 1.2
* @version 1.3
*/
#include "exSID.h"
@ -20,6 +20,16 @@
#include <unistd.h>
#include <inttypes.h>
#ifdef EXSID_THREADED
#if defined(HAVE_THREADS_H) // Native C11 threads support
#include <threads.h>
#elif defined(HAVE_PTHREAD_H) // Trivial C11 over pthreads support
#include "c11threads.h"
#else
#error "No thread model available"
#endif
#endif // EXSID_TRHREADED
#ifdef DEBUG
static long accdrift = 0;
static unsigned long accioops = 0;
@ -30,6 +40,17 @@ static unsigned long acccycle = 0;
static int ftdi_status;
static void * ftdi = NULL;
#ifdef EXSID_THREADED
// Global variables for flip buffering
static unsigned char bufchar0[XS_BUFFSZ];
static unsigned char bufchar1[XS_BUFFSZ];
static unsigned char * restrict frontbuf = bufchar0, * restrict backbuf = bufchar1;
static int frontbuf_idx = 0, backbuf_idx = 0;
static mtx_t frontbuf_mtx; ///< mutex protecting access to frontbuf
static cnd_t frontbuf_ready_cnd, frontbuf_done_cnd;
static thrd_t thread_output;
#endif // EXSID_THREADED
/**
* cycles is uint_fast32_t. Technically, clkdrift should be int_fast64_t though
* overflow should not happen under normal conditions.
@ -40,6 +61,7 @@ static int_fast32_t clkdrift = 0;
static inline void _exSID_write(uint_least8_t addr, uint8_t data, int flush);
/**
* Write routine to send data to the device.
* @note BLOCKING.
@ -69,10 +91,19 @@ static inline void _xSwrite(const unsigned char * buff, int size)
*/
static inline void _xSread(unsigned char * buff, int size)
{
#ifdef EXSID_THREADED
mtx_lock(&frontbuf_mtx);
while (frontbuf_idx)
cnd_wait(&frontbuf_done_cnd, &frontbuf_mtx);
#endif
ftdi_status = xSfw_read_data(ftdi, buff, size);
#ifdef EXSID_THREADED
mtx_unlock(&frontbuf_mtx);
#endif
#ifdef DEBUG
if (unlikely(ftdi_status < 0)) {
xserror("Error ftdi_read_data(%d): %s\n",
xserror("Error ftdi_read_data(%d): %s\n",
ftdi_status, xSfw_get_error_string(ftdi));
}
if (unlikely(ftdi_status != size)) {
@ -82,34 +113,102 @@ static inline void _xSread(unsigned char * buff, int size)
#endif
}
#ifdef EXSID_THREADED
/**
* Single byte output routine.
* Writer thread. ** consummer **
* This thread consumes buffer prepared in _xSoutb().
* Since writes to the FTDI subsystem are blocking, this thread blocks when it's
* writing to the chip, and also while it's waiting for the front buffer to be ready.
* This ensures execution time consistency as _xSoutb() periodically wait for
* the front buffer to be ready before flipping buffers.
* @note BLOCKING.
* @param arg ignored
* @return DOES NOT RETURN, exits when frontbuf_idx is negative.
*/
static int _exSID_thread_output(void *arg)
{
xsdbg("thread started\n");
while (1) {
mtx_lock(&frontbuf_mtx);
// wait for frontbuf ready (not empty)
while (!frontbuf_idx)
cnd_wait(&frontbuf_ready_cnd, &frontbuf_mtx);
if (unlikely(frontbuf_idx < 0)) { // exit condition
xsdbg("thread exiting!\n");
mtx_unlock(&frontbuf_mtx);
thrd_exit(0);
}
_xSwrite(frontbuf, frontbuf_idx);
frontbuf_idx = 0;
// _xSread() and _xSoutb() are in the same thread of execution
// so it can only be one or the other waiting.
cnd_signal(&frontbuf_done_cnd);
mtx_unlock(&frontbuf_mtx);
}
return 0; // make the compiler happy
}
#endif // EXSID_THREADED
/**
* Single byte output routine. ** producer **
* Fills a static buffer with bytes to send to the device until the buffer is
* full or a forced write is triggered. Compensates for drift if XS_BDRATE isn't
* a multiple of of XS_SIDCLK.
* @note No drift compensation is performed on read operations.
* @param byte byte to send
* @param flush force write flush if non-zero
* @param flush force write flush if positive, trigger thread exit if negative
*/
static void _xSoutb(uint8_t byte, int flush)
{
static unsigned char bufchar[XS_BUFFSZ];
static int i = 0;
#ifndef EXSID_THREADED
static unsigned char backbuf[XS_BUFFSZ];
static int backbuf_idx = 0;
#else
unsigned char * bufptr = NULL;
#endif
bufchar[i++] = (unsigned char)byte;
backbuf[backbuf_idx++] = (unsigned char)byte;
/* if XS_BDRATE isn't a multiple of XS_SIDCLK we will drift:
every XS_BDRATE/(remainder of XS_SIDCLK/XS_BDRATE) we lose one SID cycle.
Compensate here */
every XS_BDRATE/(remainder of XS_SIDCLK/XS_BDRATE) we lose one SID cycle.
Compensate here */
#if (XS_SIDCLK % XS_RSBCLK)
if (!(i % (XS_RSBCLK/(XS_SIDCLK%XS_RSBCLK))))
if (!(backbuf_idx % (XS_RSBCLK/(XS_SIDCLK%XS_RSBCLK))))
clkdrift--;
#endif
if (likely((i < XS_BUFFSZ) && !flush))
if (likely((backbuf_idx < XS_BUFFSZ) && !flush))
return;
_xSwrite(bufchar, i);
i = 0;
#ifdef EXSID_THREADED
// buffer dance
mtx_lock(&frontbuf_mtx);
// wait for frontbuf available (empty). Only triggers if previous
// write buffer hasn't been consummed before we get here again.
while (unlikely(frontbuf_idx))
cnd_wait(&frontbuf_done_cnd, &frontbuf_mtx);
if (unlikely(flush < 0)) // indicate exit request
frontbuf_idx = -1;
else { // flip buffers
bufptr = frontbuf;
frontbuf = backbuf;
frontbuf_idx = backbuf_idx;
backbuf = bufptr;
backbuf_idx = 0;
}
cnd_signal(&frontbuf_ready_cnd);
mtx_unlock(&frontbuf_mtx);
#else // unthreaded
_xSwrite(backbuf, backbuf_idx);
backbuf_idx = 0;
#endif
}
/**
@ -122,6 +221,7 @@ static void _xSoutb(uint8_t byte, int flush)
int exSID_init(void)
{
unsigned char dummy;
int ret = 0;
if (ftdi) {
xserror("Device already open!\n");
@ -129,7 +229,7 @@ int exSID_init(void)
}
if (xSfw_dlopen()) {
xserror("dl error\n");
xserror("Failed to open dynamic loader\n");
return -1;
}
@ -150,15 +250,30 @@ int exSID_init(void)
ftdi = NULL;
return -1;
}
ftdi_status = xSfw_usb_setup(ftdi, XS_BDRATE, XS_USBLAT);
if (ftdi_status < 0) {
xserror("Failed to setup device\n");
return -1;
}
// success - device with device description "exSIDUSB" is open
// success - device with device description "exSID USB" is open
xsdbg("Device opened\n");
#ifdef EXSID_THREADED
xsdbg("Thread setup\n");
ret = mtx_init(&frontbuf_mtx, mtx_plain);
ret |= cnd_init(&frontbuf_ready_cnd);
ret |= cnd_init(&frontbuf_done_cnd);
backbuf_idx = frontbuf_idx = 0;
ret |= thrd_create(&thread_output, _exSID_thread_output, NULL);
if (ret) {
xserror("Thread setup failed\n");
return -1;
}
#endif
xSfw_usb_purge_buffers(ftdi); // Purge both Rx and Tx buffers
// Wait for device ready by trying to read FV and wait for the answer
@ -189,6 +304,13 @@ void exSID_exit(void)
if (ftdi) {
exSID_reset(0);
#ifdef EXSID_THREADED
_xSoutb(XS_AD_IOCTFV, -1); // signal end of thread
cnd_destroy(&frontbuf_ready_cnd);
mtx_destroy(&frontbuf_mtx);
thrd_join(thread_output, NULL);
#endif
xSfw_usb_purge_buffers(ftdi); // Purge both Rx and Tx buffers
ftdi_status = xSfw_usb_close(ftdi);
@ -226,11 +348,11 @@ void exSID_reset(uint_least8_t volume)
{
xsdbg("rvol: %" PRIxLEAST8 "\n", volume);
_xSoutb(XS_AD_IOCTRS, 0); // this will take more than XS_CYCCHR
_xSoutb(XS_AD_IOCTRS, 1); // this will take more than XS_CYCCHR
usleep(1000); // sleep for 1ms
_exSID_write(0x18, volume, 1); // this only needs 2 bytes which matches the input buffer of the PIC so all is well
clkdrift = 0;
usleep(1000); // sleep for 1ms
}
/**

View File

@ -19,7 +19,7 @@ extern "C" {
#include <stdint.h>
#define XS_VERSION "1.2pre"
#define XS_VERSION "1.3pre"
/* Chip selection values for exSID_chipselect() */
enum {

View File

@ -32,7 +32,7 @@
#define XS_ADJMLT 2 ///< 2-to-1 cycle adjustement (max resolution: 2 cycles).
#endif
#define XS_BUFFMS 10 ///< ~10ms buffer seems to give best results. Penalty if too big (introduces delay in libsidplay) or too small (controller can't keep up)
#define XS_BUFFMS 20 ///< write buffer size in milliseconds of playback.
#define XS_SIDCLK 1000000 ///< 1MHz (for computation only, currently hardcoded in firmware)
#define XS_RSBCLK (XS_BDRATE/10) ///< RS232 byte clock. Each RS232 byte is 10 bits long due to start and stop bits
#define XS_CYCCHR (XS_SIDCLK/XS_RSBCLK) ///< SID cycles between two consecutive chars

View File

@ -137,7 +137,7 @@ static int _xSfwftdi_usb_open_desc(void ** ftdi, int vid, int pid, const char *
// wrappers for FTD2XX
#ifdef HAVE_FTD2XX
static int _xSfwFT_write_data(void * ftdi, const unsigned char * buf, int size)
static int _xSfwFT_write_data(void * restrict ftdi, const unsigned char * restrict buf, int size)
{
static int rval;
if(unlikely(rval = _FT_Write(ftdi, (LPVOID)buf, size, &dummysize)))
@ -146,7 +146,7 @@ static int _xSfwFT_write_data(void * ftdi, const unsigned char * buf, int size)
return dummysize;
}
static int _xSfwFT_read_data(void * ftdi, unsigned char * buf, int size)
static int _xSfwFT_read_data(void * restrict ftdi, unsigned char * restrict buf, int size)
{
static int rval;
if (unlikely(rval = _FT_Read(ftdi, (LPVOID)buf, size, &dummysize)))
@ -194,11 +194,7 @@ int xSfw_dlopen()
#ifdef HAVE_FTD2XX
#ifdef _WIN32
#ifdef _WIN64
# define LIBFTD2XX "ftd2xx64"
#else
# define LIBFTD2XX "ftd2xx"
#endif
#else
# define LIBFTD2XX "libftd2xx"
#endif
@ -320,7 +316,6 @@ int xSfw_usb_setup(void * ftdi, int baudrate, int latency)
#endif
xserror("Unkown access method\n");
setupfail:
return rval;
}

View File

@ -0,0 +1,485 @@
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
#
# DESCRIPTION
#
# This macro figures out how to build C programs using POSIX threads. It
# sets the PTHREAD_LIBS output variable to the threads library and linker
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler
# flags that are needed. (The user can also force certain compiler
# flags/libs to be tested by setting these environment variables.)
#
# Also sets PTHREAD_CC to any special C compiler that is needed for
# multi-threaded programs (defaults to the value of CC otherwise). (This
# is necessary on AIX to use the special cc_r compiler alias.)
#
# NOTE: You are assumed to not only compile your program with these flags,
# but also to link with them as well. For example, you might link with
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS
#
# If you are only building threaded programs, you may wish to use these
# variables in your default LIBS, CFLAGS, and CC:
#
# LIBS="$PTHREAD_LIBS $LIBS"
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
# CC="$PTHREAD_CC"
#
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant
# has a nonstandard name, this macro defines PTHREAD_CREATE_JOINABLE to
# that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
#
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with
# PTHREAD_CFLAGS.
#
# ACTION-IF-FOUND is a list of shell commands to run if a threads library
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it
# is not found. If ACTION-IF-FOUND is not specified, the default action
# will define HAVE_PTHREAD.
#
# Please let the authors know if this macro fails on any platform, or if
# you have any other suggestions or comments. This macro was based on work
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by
# Alejandro Forero Cuervo to the autoconf macro repository. We are also
# grateful for the helpful feedback of numerous users.
#
# Updated for Autoconf 2.68 by Daniel Richard G.
#
# LICENSE
#
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 23
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD])
AC_DEFUN([AX_PTHREAD], [
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_SED])
AC_LANG_PUSH([C])
ax_pthread_ok=no
# We used to check for pthread.h first, but this fails if pthread.h
# requires special compiler flags (e.g. on Tru64 or Sequent).
# It gets checked for in the link test anyway.
# First of all, check if the user has set any of the PTHREAD_LIBS,
# etcetera environment variables, and if threads linking works using
# them:
if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
ax_pthread_save_CC="$CC"
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
AS_IF([test "x$PTHREAD_CC" != "x"], [CC="$PTHREAD_CC"])
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
AC_MSG_CHECKING([for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS])
AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], [ax_pthread_ok=yes])
AC_MSG_RESULT([$ax_pthread_ok])
if test "x$ax_pthread_ok" = "xno"; then
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
fi
CC="$ax_pthread_save_CC"
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
fi
# We must check for the threads library under a number of different
# names; the ordering is very important because some systems
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
# libraries is broken (non-POSIX).
# Create a list of thread flags to try. Items starting with a "-" are
# C compiler flags, and other items are library names, except for "none"
# which indicates that we try without any flags at all, and "pthread-config"
# which is a program returning the flags for the Pth emulation library.
ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
# The ordering *is* (sometimes) important. Some notes on the
# individual items follow:
# pthreads: AIX (must check this before -lpthread)
# none: in case threads are in libc; should be tried before -Kthread and
# other compiler flags to prevent continual compiler warnings
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
# (Note: HP C rejects this with "bad form for `-t' option")
# -pthreads: Solaris/gcc (Note: HP C also rejects)
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
# doesn't hurt to check since this sometimes defines pthreads and
# -D_REENTRANT too), HP C (must be checked before -lpthread, which
# is present but should not be used directly; and before -mthreads,
# because the compiler interprets this as "-mt" + "-hreads")
# -mthreads: Mingw32/gcc, Lynx/gcc
# pthread: Linux, etcetera
# --thread-safe: KAI C++
# pthread-config: use pthread-config program (for GNU Pth library)
case $host_os in
freebsd*)
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
ax_pthread_flags="-kthread lthread $ax_pthread_flags"
;;
hpux*)
# From the cc(1) man page: "[-mt] Sets various -D flags to enable
# multi-threading and also sets -lpthread."
ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
;;
openedition*)
# IBM z/OS requires a feature-test macro to be defined in order to
# enable POSIX threads at all, so give the user a hint if this is
# not set. (We don't define these ourselves, as they can affect
# other portions of the system API in unpredictable ways.)
AC_EGREP_CPP([AX_PTHREAD_ZOS_MISSING],
[
# if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
AX_PTHREAD_ZOS_MISSING
# endif
],
[AC_MSG_WARN([IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support.])])
;;
solaris*)
# On Solaris (at least, for some versions), libc contains stubbed
# (non-functional) versions of the pthreads routines, so link-based
# tests will erroneously succeed. (N.B.: The stubs are missing
# pthread_cleanup_push, or rather a function called by this macro,
# so we could check for that, but who knows whether they'll stub
# that too in a future libc.) So we'll check first for the
# standard Solaris way of linking pthreads (-mt -lpthread).
ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
;;
esac
# GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
AS_IF([test "x$GCC" = "xyes"],
[ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"])
# The presence of a feature test macro requesting re-entrant function
# definitions is, on some systems, a strong hint that pthreads support is
# correctly enabled
case $host_os in
darwin* | hpux* | linux* | osf* | solaris*)
ax_pthread_check_macro="_REENTRANT"
;;
aix*)
ax_pthread_check_macro="_THREAD_SAFE"
;;
*)
ax_pthread_check_macro="--"
;;
esac
AS_IF([test "x$ax_pthread_check_macro" = "x--"],
[ax_pthread_check_cond=0],
[ax_pthread_check_cond="!defined($ax_pthread_check_macro)"])
# Are we compiling with Clang?
AC_CACHE_CHECK([whether $CC is Clang],
[ax_cv_PTHREAD_CLANG],
[ax_cv_PTHREAD_CLANG=no
# Note that Autoconf sets GCC=yes for Clang as well as GCC
if test "x$GCC" = "xyes"; then
AC_EGREP_CPP([AX_PTHREAD_CC_IS_CLANG],
[/* Note: Clang 2.7 lacks __clang_[a-z]+__ */
# if defined(__clang__) && defined(__llvm__)
AX_PTHREAD_CC_IS_CLANG
# endif
],
[ax_cv_PTHREAD_CLANG=yes])
fi
])
ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
ax_pthread_clang_warning=no
# Clang needs special handling, because older versions handle the -pthread
# option in a rather... idiosyncratic way
if test "x$ax_pthread_clang" = "xyes"; then
# Clang takes -pthread; it has never supported any other flag
# (Note 1: This will need to be revisited if a system that Clang
# supports has POSIX threads in a separate library. This tends not
# to be the way of modern systems, but it's conceivable.)
# (Note 2: On some systems, notably Darwin, -pthread is not needed
# to get POSIX threads support; the API is always present and
# active. We could reasonably leave PTHREAD_CFLAGS empty. But
# -pthread does define _REENTRANT, and while the Darwin headers
# ignore this macro, third-party headers might not.)
PTHREAD_CFLAGS="-pthread"
PTHREAD_LIBS=
ax_pthread_ok=yes
# However, older versions of Clang make a point of warning the user
# that, in an invocation where only linking and no compilation is
# taking place, the -pthread option has no effect ("argument unused
# during compilation"). They expect -pthread to be passed in only
# when source code is being compiled.
#
# Problem is, this is at odds with the way Automake and most other
# C build frameworks function, which is that the same flags used in
# compilation (CFLAGS) are also used in linking. Many systems
# supported by AX_PTHREAD require exactly this for POSIX threads
# support, and in fact it is often not straightforward to specify a
# flag that is used only in the compilation phase and not in
# linking. Such a scenario is extremely rare in practice.
#
# Even though use of the -pthread flag in linking would only print
# a warning, this can be a nuisance for well-run software projects
# that build with -Werror. So if the active version of Clang has
# this misfeature, we search for an option to squash it.
AC_CACHE_CHECK([whether Clang needs flag to prevent "argument unused" warning when linking with -pthread],
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG],
[ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
# Create an alternate version of $ac_link that compiles and
# links in two steps (.c -> .o, .o -> exe) instead of one
# (.c -> exe), because the warning occurs only in the second
# step
ax_pthread_save_ac_link="$ac_link"
ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
ax_pthread_save_CFLAGS="$CFLAGS"
for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
AS_IF([test "x$ax_pthread_try" = "xunknown"], [break])
CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
ac_link="$ax_pthread_save_ac_link"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
[ac_link="$ax_pthread_2step_ac_link"
AC_LINK_IFELSE([AC_LANG_SOURCE([[int main(void){return 0;}]])],
[break])
])
done
ac_link="$ax_pthread_save_ac_link"
CFLAGS="$ax_pthread_save_CFLAGS"
AS_IF([test "x$ax_pthread_try" = "x"], [ax_pthread_try=no])
ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
])
case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
no | unknown) ;;
*) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
esac
fi # $ax_pthread_clang = yes
if test "x$ax_pthread_ok" = "xno"; then
for ax_pthread_try_flag in $ax_pthread_flags; do
case $ax_pthread_try_flag in
none)
AC_MSG_CHECKING([whether pthreads work without any flags])
;;
-mt,pthread)
AC_MSG_CHECKING([whether pthreads work with -mt -lpthread])
PTHREAD_CFLAGS="-mt"
PTHREAD_LIBS="-lpthread"
;;
-*)
AC_MSG_CHECKING([whether pthreads work with $ax_pthread_try_flag])
PTHREAD_CFLAGS="$ax_pthread_try_flag"
;;
pthread-config)
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no])
AS_IF([test "x$ax_pthread_config" = "xno"], [continue])
PTHREAD_CFLAGS="`pthread-config --cflags`"
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
;;
*)
AC_MSG_CHECKING([for the pthreads library -l$ax_pthread_try_flag])
PTHREAD_LIBS="-l$ax_pthread_try_flag"
;;
esac
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
# Check for various functions. We must include pthread.h,
# since some functions may be macros. (On the Sequent, we
# need a special flag -Kthread to make this header compile.)
# We check for pthread_join because it is in -lpthread on IRIX
# while pthread_create is in libc. We check for pthread_attr_init
# due to DEC craziness with -lpthreads. We check for
# pthread_cleanup_push because it is one of the few pthread
# functions on Solaris that doesn't have a non-functional libc stub.
# We try pthread_create on general principles.
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>
# if $ax_pthread_check_cond
# error "$ax_pthread_check_macro must be defined"
# endif
static void routine(void *a) { a = 0; }
static void *start_routine(void *a) { return a; }],
[pthread_t th; pthread_attr_t attr;
pthread_create(&th, 0, start_routine, 0);
pthread_join(th, 0);
pthread_attr_init(&attr);
pthread_cleanup_push(routine, 0);
pthread_cleanup_pop(0) /* ; */])],
[ax_pthread_ok=yes],
[])
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
AC_MSG_RESULT([$ax_pthread_ok])
AS_IF([test "x$ax_pthread_ok" = "xyes"], [break])
PTHREAD_LIBS=""
PTHREAD_CFLAGS=""
done
fi
# Various other checks:
if test "x$ax_pthread_ok" = "xyes"; then
ax_pthread_save_CFLAGS="$CFLAGS"
ax_pthread_save_LIBS="$LIBS"
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
LIBS="$PTHREAD_LIBS $LIBS"
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
AC_CACHE_CHECK([for joinable pthread attribute],
[ax_cv_PTHREAD_JOINABLE_ATTR],
[ax_cv_PTHREAD_JOINABLE_ATTR=unknown
for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>],
[int attr = $ax_pthread_attr; return attr /* ; */])],
[ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break],
[])
done
])
AS_IF([test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
test "x$ax_pthread_joinable_attr_defined" != "xyes"],
[AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE],
[$ax_cv_PTHREAD_JOINABLE_ATTR],
[Define to necessary symbol if this constant
uses a non-standard name on your system.])
ax_pthread_joinable_attr_defined=yes
])
AC_CACHE_CHECK([whether more special flags are required for pthreads],
[ax_cv_PTHREAD_SPECIAL_FLAGS],
[ax_cv_PTHREAD_SPECIAL_FLAGS=no
case $host_os in
solaris*)
ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
;;
esac
])
AS_IF([test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
test "x$ax_pthread_special_flags_added" != "xyes"],
[PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
ax_pthread_special_flags_added=yes])
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT],
[ax_cv_PTHREAD_PRIO_INHERIT],
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]],
[[int i = PTHREAD_PRIO_INHERIT;]])],
[ax_cv_PTHREAD_PRIO_INHERIT=yes],
[ax_cv_PTHREAD_PRIO_INHERIT=no])
])
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
test "x$ax_pthread_prio_inherit_defined" != "xyes"],
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])
ax_pthread_prio_inherit_defined=yes
])
CFLAGS="$ax_pthread_save_CFLAGS"
LIBS="$ax_pthread_save_LIBS"
# More AIX lossage: compile with *_r variant
if test "x$GCC" != "xyes"; then
case $host_os in
aix*)
AS_CASE(["x/$CC"],
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6],
[#handle absolute path differently from PATH based program lookup
AS_CASE(["x$CC"],
[x/*],
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])],
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])])
;;
esac
fi
fi
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
AC_SUBST([PTHREAD_LIBS])
AC_SUBST([PTHREAD_CFLAGS])
AC_SUBST([PTHREAD_CC])
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
if test "x$ax_pthread_ok" = "xyes"; then
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1])
:
else
ax_pthread_ok=no
$2
fi
AC_LANG_POP
])dnl AX_PTHREAD

View File

@ -112,6 +112,14 @@ uint8_t exSID::read(uint_least8_t addr)
{
printf("WARNING: Read support is limited. This file may not play correctly!\n");
readflag = true;
// Here we implement the "safe" detection routine return values
if (0x1b == addr) { // we could implement a commandline-chosen return byte here
if (SidConfig::MOS8580 == runmodel)
return 0x02;
else
return 0x03;
}
}
const unsigned int cycles = delay();
@ -141,6 +149,7 @@ void exSID::voice(unsigned int num, bool mute)
void exSID::model(SidConfig::sid_model_t model)
{
runmodel = model;
exSID_chipselect(model == SidConfig::MOS8580 ? XS_CS_CHIP1 : XS_CS_CHIP0);
}

View File

@ -54,6 +54,8 @@ private:
bool muted[3];
SidConfig::sid_model_t runmodel;
private:
unsigned int delay();

View File

@ -93,7 +93,7 @@ void ReSID::write(uint_least8_t addr, uint8_t data)
void ReSID::clock()
{
reSID::cycle_count cycles = eventScheduler->getTime(m_accessClk, EVENT_CLOCK_PHI1);
reSID::cycle_count cycles = (reSID::cycle_count) eventScheduler->getTime(m_accessClk, EVENT_CLOCK_PHI1);
m_accessClk += cycles;
m_bufferpos += m_sid.clock(cycles, (short *) m_buffer + m_bufferpos, OUTPUTBUFFERSIZE - m_bufferpos, 1);
}

View File

@ -104,7 +104,7 @@ void ReSIDfp::clock()
{
const event_clock_t cycles = eventScheduler->getTime(m_accessClk, EVENT_CLOCK_PHI1);
m_accessClk += cycles;
m_bufferpos += m_sid.clock(cycles, m_buffer+m_bufferpos);
m_bufferpos += m_sid.clock((unsigned int)cycles, m_buffer+m_bufferpos);
}
void ReSIDfp::filter(bool enable)

View File

@ -134,7 +134,7 @@ void Tod::event()
cycles += period * (cra & 0x80 ? 5 : 6);
// Fixed precision 25.7
eventScheduler.schedule(*this, cycles >> 7);
eventScheduler.schedule(*this, (unsigned int)(cycles >> 7));
cycles &= 0x7F; // Just keep the decimal part
if (!isStopped)

View File

@ -274,7 +274,7 @@ void MOS656X::event()
else
delay = 1;
eventScheduler.schedule(*this, delay - eventScheduler.phase(), EVENT_CLOCK_PHI1);
eventScheduler.schedule(*this, (unsigned int)(delay - eventScheduler.phase()), EVENT_CLOCK_PHI1);
}
event_clock_t MOS656X::clockPAL()

View File

@ -491,7 +491,7 @@ void Player::sidCreate(sidbuilder *builder, SidConfig::sid_model_t defaultModel,
// model as the first SID.
defaultModel = userModel;
const unsigned int extraSidChips = extraSidAddresses.size();
const unsigned int extraSidChips = (const unsigned int) extraSidAddresses.size();
for (unsigned int i = 0; i < extraSidChips; i++)
{

View File

@ -82,7 +82,7 @@ public:
*
* @return number of used sids, 0 if none.
*/
unsigned int usedDevices() const { return sidobjs.size(); }
unsigned int usedDevices() const { return (unsigned int) sidobjs.size(); }
/**
* Available devices.

View File

@ -111,7 +111,7 @@ void MUS::placeSidTuneInC64mem(sidmemory& mem)
bool MUS::mergeParts(buffer_t& musBuf, buffer_t& strBuf)
{
const uint_least32_t mergeLen = musBuf.size() + strBuf.size();
const uint_least32_t mergeLen = (const uint_least32_t)(musBuf.size() + strBuf.size());
// Sanity check. I do not trust those MUS/STR files around.
const uint_least32_t freeSpace = endian_16(player1[1], player1[0]) - SIDTUNE_MUS_DATA_ADDR;
@ -165,7 +165,7 @@ SidTuneBase* MUS::load(buffer_t& musBuf,
{
uint_least32_t voice3Index;
SmartPtr_sidtt<const uint8_t> spPet(&musBuf[fileOffset], musBuf.size() - fileOffset);
if (!detect(&spPet[0], spPet.tellLength(), voice3Index))
if (!detect(&spPet[0], (uint_least32_t) spPet.tellLength(), voice3Index))
return nullptr;
std::unique_ptr<MUS> tune(new MUS());
@ -228,7 +228,7 @@ void MUS::tryLoad(buffer_t& musBuf,
bool stereo = false;
if (!strBuf.empty())
{
if (!detect(&strBuf[0], strBuf.size(), voice3Index))
if (!detect(&strBuf[0], (uint_least32_t) strBuf.size(), voice3Index))
throw loadError(ERR_2ND_INVALID);
spPet.setBuffer(&strBuf[0], strBuf.size());
stereo = true;
@ -239,7 +239,7 @@ void MUS::tryLoad(buffer_t& musBuf,
if (spPet.good())
{
const ulint_smartpt pos = spPet.tellPos();
if (detect(&spPet[0], spPet.tellLength() - pos, voice3Index))
if (detect(&spPet[0], (uint_least32_t)(spPet.tellLength() - pos), voice3Index))
{
musDataLen = static_cast<uint_least16_t>(pos);
stereo = true;
@ -269,7 +269,7 @@ void MUS::tryLoad(buffer_t& musBuf,
setPlayerAddress();
// Remove trailing empty lines.
const int lines = info->m_commentString.size();
const int lines = (const int) info->m_commentString.size();
{
for (int line = lines-1; line >= 0; line--)
{

View File

@ -191,7 +191,7 @@ void SidTuneBase::loadFile(const char* fileName, buffer_t& bufferRef)
}
inFile.seekg(0, inFile.end);
const int fileLen = inFile.tellg();
const int fileLen = (const int) inFile.tellg();
if (fileLen <= 0)
{
@ -248,7 +248,7 @@ SidTuneBase* SidTuneBase::getFromStdIn()
fileBuf.push_back((uint_least8_t)datb);
}
return getFromBuffer(&fileBuf.front(), fileBuf.size());
return getFromBuffer(&fileBuf.front(), (uint_least32_t) fileBuf.size());
}
#endif
@ -323,8 +323,8 @@ void SidTuneBase::acceptSidTune(const char* dataFileName, const char* infoFileNa
info->m_startSong = 1;
}
info->m_dataFileLen = buf.size();
info->m_c64dataLen = buf.size() - fileOffset;
info->m_dataFileLen = (uint_least32_t )buf.size();
info->m_c64dataLen = (uint_least32_t)(buf.size() - fileOffset);
// Calculate any remaining addresses and then
// confirm all the file details are correct

View File

@ -123,7 +123,7 @@ public:
return i < m_sidChipAddresses.size() ? m_sidChipAddresses[i] : 0;
}
int getSidChips() const override { return m_sidChipAddresses.size(); }
int getSidChips() const override { return (int) m_sidChipAddresses.size(); }
int getSongSpeed() const override { return m_songSpeed; }
@ -138,10 +138,10 @@ public:
compatibility_t getCompatibility() const override { return m_compatibility; }
unsigned int getNumberOfInfoStrings() const override { return m_infoString.size(); }
unsigned int getNumberOfInfoStrings() const override { return (unsigned int) m_infoString.size(); }
const char* getInfoString(unsigned int i) const override { return i<getNumberOfInfoStrings() ? m_infoString[i].c_str() : ""; }
unsigned int getNumberOfCommentStrings() const override { return m_commentString.size(); }
unsigned int getNumberOfCommentStrings() const override { return (unsigned int) m_commentString.size(); }
const char* getCommentString(unsigned int i) const override { return i<getNumberOfCommentStrings() ? m_commentString[i].c_str() : ""; }
uint_least32_t getDataFileLen() const override { return m_dataFileLen; }

View File

@ -859,7 +859,7 @@
8314D64C1A354E7800EEE8E6 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
TargetAttributes = {
8314D6541A354E7800EEE8E6 = {
@ -985,6 +985,7 @@
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -1035,6 +1036,7 @@
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = HAVE_CONFIG_H;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;

View File

@ -158,7 +158,7 @@
83B066A3180D56B9008E3612 /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0730;
LastUpgradeCheck = 0800;
ORGANIZATIONNAME = "Christopher Snowhill";
};
buildConfigurationList = 83B066A6180D56B9008E3612 /* Build configuration list for PBXProject "midi_processing" */;
@ -229,6 +229,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -239,12 +240,15 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
@ -267,6 +271,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_OBJC_ARC = YES;
@ -277,13 +282,16 @@
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "Developer ID Application";
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;

View File

@ -265,7 +265,6 @@
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;

Some files were not shown because too many files have changed in this diff Show More