From 0e3644177ea2ae4a1166ed106add0f385b80e48a Mon Sep 17 00:00:00 2001 From: Chris Moeller Date: Thu, 5 May 2016 13:05:39 -0700 Subject: [PATCH] Updated everything else to ARC, and plugged a release cycle. --- Application/AppController.m | 163 +- Application/DockIconController.m | 11 +- Application/PlaybackEventController.m | 17 +- Audio/AudioMetadataWriter.h | 2 +- Audio/AudioMetadataWriter.m | 2 +- Audio/AudioPlayer.m | 54 +- Audio/Chain/BufferChain.m | 22 +- Audio/Chain/ConverterNode.m | 12 +- Audio/Chain/InputNode.m | 7 - Audio/Chain/Node.h | 4 +- Audio/Chain/Node.m | 26 +- Audio/Chain/OutputNode.m | 32 +- Audio/CogAudio.xcodeproj/project.pbxproj | 7 +- Audio/CogPluginMulti.m | 10 +- Audio/Info.plist | 6 +- Audio/Output/OutputCoreAudio.m | 8 +- Audio/PluginController.m | 28 +- .../VirtualRingBuffer/VirtualRingBuffer.m | 6 +- AudioScrobbler/AudioScrobbler.m | 117 +- AudioScrobbler/AudioScrobblerClient.m | 3 +- Cog.xcodeproj/project.pbxproj | 35 +- Feedback/FeedbackController.m | 10 +- Feedback/FeedbackSocket.m | 68 +- FileTree/ContainedNode.m | 4 +- FileTree/ContainerNode.m | 5 +- FileTree/DirectoryNode.m | 2 - FileTree/FileTreeController.m | 2 +- FileTree/FileTreeDataSource.m | 8 - FileTree/FileTreeViewController.m | 1 + FileTree/PathNode.m | 29 +- FileTree/PathWatcher.m | 15 +- FileTree/SmartFolderNode.h | 1 + FileTree/SmartFolderNode.m | 18 +- Formatters/BlankZeroFormatter.m | 2 +- Formatters/IndexFormatter.m | 2 +- Formatters/SecondsFormatter.m | 2 +- .../Dumb/Dumb.xcodeproj/project.pbxproj | 8 +- Frameworks/Dumb/Info.plist | 6 +- Frameworks/Dumb/dumb/src/helpers/resamp3.inc | 2 +- Frameworks/Dumb/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../FFMPEG/FFMPEG.xcodeproj/project.pbxproj | 8 +- Frameworks/FFMPEG/Info.plist | 2 +- Frameworks/FFMPEG/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Frameworks/FLAC/Info.plist | 6 +- Frameworks/FLAC/flac-1.2.1/src/libFLAC/cpu.c | 2 + .../FLAC/flac.xcodeproj/project.pbxproj | 5 +- .../File_Extractor.xcodeproj/project.pbxproj | 8 +- .../File_Extractor/File_Extractor-Info.plist | 2 +- .../File_Extractor/es.lproj/InfoPlist.strings | 2 + .../File_Extractor/fex/File_Extractor.cpp | 2 + .../File_Extractor/unrar/archive.cpp | 2 + .../File_Extractor/unrar/arcread.cpp | 4 + .../File_Extractor/unrar/pathfn.cpp | 2 +- .../File_Extractor/unrar/rarvm.cpp | 2 + .../File_Extractor/unrar/rawread.cpp | 2 +- .../File_Extractor/unrar/unpack.cpp | 2 + .../File_Extractor/unrar/unpack15.cpp | 2 + .../File_Extractor/unrar/unpack20.cpp | 6 +- .../File_Extractor/unrar/unpack50.cpp | 10 +- Frameworks/GME/GME.xcodeproj/project.pbxproj | 8 +- Frameworks/GME/Info.plist | 6 +- Frameworks/GME/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../HighlyAdvanced.xcodeproj/project.pbxproj | 8 +- .../HighlyAdvanced/HighlyAdvanced-Info.plist | 2 +- .../HighlyAdvanced/es.lproj/InfoPlist.strings | 2 + .../project.pbxproj | 8 +- .../HighlyExperimental-Info.plist | 2 +- .../es.lproj/InfoPlist.strings | 2 + .../HighlyQuixotic.xcodeproj/project.pbxproj | 8 +- .../HighlyQuixotic/HighlyQuixotic-Info.plist | 2 +- .../HighlyQuixotic/es.lproj/InfoPlist.strings | 2 + .../project.pbxproj | 8 +- .../HighlyTheoretical-Info.plist | 2 +- .../es.lproj/InfoPlist.strings | 2 + .../HivelyPlayer.xcodeproj/project.pbxproj | 8 +- .../HivelyPlayer/HivelyPlayer-Info.plist | 2 +- .../HivelyPlayer/HivelyPlayer/blip_buf.c | 4 +- .../HivelyPlayer/es.lproj/InfoPlist.strings | 2 + .../HivelyPlayer/HivelyPlayer/hvl_replay.c | 23 +- Frameworks/MPCDec/Files/src/huffman-bcl.c | 4 +- Frameworks/MPCDec/Files/src/mpc_demux.c | 8 +- Frameworks/MPCDec/Files/src/tags.c | 2 + Frameworks/MPCDec/Info.plist | 6 +- .../MPCDec/MPCDec.xcodeproj/project.pbxproj | 8 +- Frameworks/MPCDec/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../NDHotKey.xcodeproj/project.pbxproj | 16 +- .../NDHotKey/NDHotKey/NDHotKey-Info.plist | 2 +- Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m | 100 +- .../NDHotKey/NDHotKey/NDKeyboardLayout.m | 14 +- .../NDHotKey/es.lproj/InfoPlist.strings | 2 + Frameworks/Ogg/macosx/Info.plist | 8 +- .../Ogg/macosx/Ogg.xcodeproj/project.pbxproj | 21 +- .../Ogg/macosx/es.lproj/InfoPlist.strings | Bin 0 -> 136 bytes .../Opus/Opus.xcodeproj/project.pbxproj | 9 +- Frameworks/Opus/Opus/Opus-Info.plist | 2 +- .../Opus/Opus/es.lproj/InfoPlist.strings | 2 + Frameworks/Opus/Opus/opus/silk/A2NLSF.c | 18 +- Frameworks/Opus/Opus/opus/silk/CNG.c | 38 +- .../Opus/Opus/opus/silk/HP_variable_cutoff.c | 2 +- Frameworks/Opus/Opus/opus/silk/Inlines.h | 8 +- .../Opus/Opus/opus/silk/LP_variable_cutoff.c | 8 +- Frameworks/Opus/Opus/opus/silk/NLSF_decode.c | 2 +- .../Opus/Opus/opus/silk/NLSF_del_dec_quant.c | 8 +- Frameworks/Opus/Opus/opus/silk/NSQ.c | 70 +- Frameworks/Opus/Opus/opus/silk/NSQ_del_dec.c | 82 +- Frameworks/Opus/Opus/opus/silk/PLC.c | 36 +- Frameworks/Opus/Opus/opus/silk/VAD.c | 14 +- Frameworks/Opus/Opus/opus/silk/VQ_WMat_EC.c | 40 +- .../Opus/Opus/opus/silk/ana_filt_bank_1.c | 4 +- Frameworks/Opus/Opus/opus/silk/biquad_alt.c | 12 +- .../Opus/Opus/opus/silk/bwexpander_32.c | 4 +- Frameworks/Opus/Opus/opus/silk/decode_core.c | 48 +- Frameworks/Opus/Opus/opus/silk/enc_API.c | 2 +- Frameworks/Opus/Opus/opus/silk/gain_quant.c | 4 +- .../Opus/Opus/opus/silk/process_NLSFs.c | 2 +- .../Opus/Opus/opus/silk/resampler_down2_3.c | 16 +- .../Opus/opus/silk/resampler_private_AR2.c | 4 +- .../opus/silk/resampler_private_down_FIR.c | 98 +- .../Opus/opus/silk/resampler_private_up2_HQ.c | 12 +- .../Opus/Opus/opus/silk/stereo_LR_to_MS.c | 12 +- .../Opus/Opus/opus/silk/stereo_MS_to_LR.c | 8 +- .../Opus/opus/silk/stereo_find_predictor.c | 6 +- .../Opus/Opus/opus/silk/x86/NSQ_del_dec_sse.c | 46 +- Frameworks/Opus/Opus/opus/silk/x86/NSQ_sse.c | 26 +- Frameworks/Opus/Opus/opus/silk/x86/VAD_sse.c | 12 +- .../Opus/Opus/opus/silk/x86/VQ_WMat_EC_sse.c | 32 +- Frameworks/Opus/Opus/opus/src/opus_encoder.c | 4 +- Frameworks/Opus/Opus/opusfile/src/info.c | 10 +- Frameworks/Opus/Opus/opusfile/src/opusfile.c | 26 +- .../SSEQPlayer.xcodeproj/project.pbxproj | 8 +- .../SSEQPlayer/SSEQPlayer-Info.plist | 2 +- .../SSEQPlayer/es.lproj/InfoPlist.strings | 2 + Frameworks/Shorten/Info.plist | 6 +- .../Shorten/Shorten.xcodeproj/project.pbxproj | 8 +- Frameworks/Shorten/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Frameworks/Sparkle | 2 +- Frameworks/Syntrax-c/Syntrax-c/file.c | 6 +- Frameworks/Syntrax-c/Syntrax-c/resampler.c | 4 +- Frameworks/Syntrax-c/Syntrax-c/syntrax.c | 16 +- Frameworks/TagLib/Info.plist | 2 +- .../TagLib/TagLib.xcodeproj/project.pbxproj | 8 +- Frameworks/TagLib/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../taglib/mpeg/id3v2/id3v2framefactory.cpp | 2 +- Frameworks/Vorbis/macosx/Info.plist | 8 +- .../macosx/Vorbis.xcodeproj/project.pbxproj | 26 +- .../VorbisNoDot.xcodeproj/project.pbxproj | 1 + .../Vorbis/macosx/es.lproj/InfoPlist.strings | Bin 0 -> 142 bytes Frameworks/WavPack/Files/extra1.c | 2 +- Frameworks/WavPack/Files/extra2.c | 2 +- Frameworks/WavPack/Files/md5.c | 2 +- Frameworks/WavPack/Files/pack.c | 2 +- Frameworks/WavPack/Files/unpack3.c | 6 + Frameworks/WavPack/Files/wavpack.c | 4 +- Frameworks/WavPack/Info.plist | 6 +- .../WavPack/WavPack.xcodeproj/project.pbxproj | 8 +- Frameworks/WavPack/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Frameworks/libsidplay/libsidplay/Info.plist | 2 +- ...3e578668987cfca992355f403cdf78f4b.svn-base | 138 + ...22a2384d5aaf34b9b9d81cabeb621be69.svn-base | 76 + ...70f01008a0833e04556385fedd3382ec7.svn-base | 106 + ...2b2db3d6c2ced399be35ac75cfae42d16.svn-base | 64 + ...d8b27688cb1c9becd1e582719f2f9a610.svn-base | 297 +++ ...c4115bfc9efe8a29eb96bbd4a1098cd50.svn-base | 75 + ...27690d705031fcdfb0d18ddbcbdb40b64.svn-base | 60 + ...083ff41b79816567bbd61c38fe228d11d.svn-base | 68 + ...913f53df5682b06a4922dd2c65b34049e.svn-base | 136 + ...3459bc7de683aec7d1ea8c653f7c47f1a.svn-base | 151 ++ ...2e1879951b6055076272f35c2f54f15f5.svn-base | 123 + ...1b278d991dd4aa9974269b5487dd3accb.svn-base | 121 + ...86abdc5b8bf7f56d00ed4207754f6d751.svn-base | 206 ++ ...789bc5b31505cb8da3e80be5fde61e080.svn-base | 166 ++ ...6eb326a20da7a8f4762e9c59273777abf.svn-base | 485 ++++ ...de2178fea35bc6c943e786d055e613016.svn-base | 167 ++ ...56a3c4a932444c44479c34a3d020245b8.svn-base | 336 +++ ...3badbebbe5d2a80c529142cf0f53e2e5c.svn-base | 408 +++ ...e13112abb67ae3839d967f01d294cc153.svn-base | 91 + ...e762a9d510e7ec3bd644bc7f5d1832e4e.svn-base | 117 + ...d9724301719bdbc680f0e10cfde23c0c8.svn-base | 47 + ...203a6dcf295620b3d4fde112b4b286fbb.svn-base | 50 + ...e2e32cd6e3e8cb01497524fc0741399cb.svn-base | 48 + ...ae36861f21f6eb9cd17fda625355173e7.svn-base | 166 ++ ...46b32b08b8ca5e953474ebe1522ed9fca.svn-base | 336 +++ ...560ab5ac178f9de4cb5e2f2a68ff2417b.svn-base | 527 ++++ ...e7bac61bfd049bcb18f8b78fec22bdf40.svn-base | 44 + ...b79799e776829c461eb5a16164a1913cf.svn-base | 275 ++ ...433e14815a8b9baec415df4c33f128475.svn-base | 102 + ...4f2396b13a80684b01d63cc2649192d65.svn-base | 407 +++ ...4f2648a6d03324784c865c0e4c107d67e.svn-base | 1576 +++++++++++ ...975673f7cc215f166a922dfb7ee4214d0.svn-base | 48 + ...fbfee1b7e71d0602b1d4c7dcd1e29f990.svn-base | 57 + ...62ba794df0ca57d4252ddf390328c1b40.svn-base | 254 ++ ...030acac8d6fcb61abac326488630a3fed.svn-base | 90 + ...5a9f4c93b6925ce361227ca6333a4c381.svn-base | 76 + ...a69620f0831de153625d2b0b095b9241d.svn-base | 88 + ...8b3f837e2250fbf656bb68374e832f396.svn-base | 1551 +++++++++++ ...d9984f0cf90b678b69e99f9a04a914367.svn-base | 76 + ...feb9043dcfeb98278594e4820e76045c5.svn-base | 373 +++ ...67b3f5d1e3e891a3fb16a83a1c8b533cf.svn-base | 89 + ...72797795b2a4c69b6a70ba30b167febb0.svn-base | 142 + ...54f0373eb5418cc39027227896e2a2341.svn-base | 59 + ...49e5a5001d8003aa2a3d1ff7d3d785789.svn-base | 305 +++ ...1eba5f6a602eb6e5a9ef38fae430168b7.svn-base | 2353 +++++++++++++++++ ...5409ec92ff091ef7a6023f2ff640e4dc0.svn-base | 201 ++ ...6deef643939c99b2b45da53a63c9e254a.svn-base | 20 + ...87d64b71779a6bb6465fb498c4775c27c.svn-base | 162 ++ ...b46780fd0f041465230cade2ea42b8c33.svn-base | 71 + ...0f24650e73694d639a5f17eee6780300c.svn-base | 59 + ...de35ba05bd63c2bb319a148389b898afc.svn-base | 431 +++ ...679d7ac248ef3878e1d26d86ef53c9f67.svn-base | 71 + ...75cfec983c7647ed308d7541bc81b4fd0.svn-base | 56 + ...1be8e87bc2c6eb2dd78c68fd4ebc211d9.svn-base | 288 ++ ...c4e2f7f5fa44e9937410e30d046b18b84.svn-base | 121 + ...e508036519d69440d73ff8a2a0c46255f.svn-base | 74 + ...75c758bd445a5d12d8f133d0d6eadc81e.svn-base | 83 + ...507144f79b191efbbe2144d5d28b5734a.svn-base | 160 ++ ...77f7f3a368b4c462bbd247bd74d72efeb.svn-base | 427 +++ ...d425c385fbdd94be2609a921f75d38ad2.svn-base | 112 + ...a4b48589a1ef02d0a3af969c8e890106e.svn-base | 39 + ...ecfe4fbfb594419a42922b24388099409.svn-base | 227 ++ ...b6e80c57fb2ff732464f1966fdbb9c0ee.svn-base | 373 +++ ...f7e7f40ecf8511d5f6650cf35f0e986f1.svn-base | 58 + ...4e1f113754e92590c1e76153697a04536.svn-base | 211 ++ ...f53ebf123124e5f49a6f5619dc588159f.svn-base | 304 +++ ...62dc5b1d915e04d9e687e417c781162d2.svn-base | 223 ++ ...20cbabcd4986b9b91a54510196e79a750.svn-base | 35 + ...82903d94b94dd2eda88283e34697b7e61.svn-base | 63 + ...08b977f0b80e1d4bca8262e0f0ad173f5.svn-base | 715 +++++ ...751ac6fdbbea289f85b9b8f9d09f2785d.svn-base | 678 +++++ ...1792fc0983f39034eb691854adfe56e90.svn-base | 55 + ...331cec5b4cc5f864b3bc1a899fc917819.svn-base | 82 + ...884c7b659ce8f1c70f2626b72a49b4a68.svn-base | 322 +++ ...9900aa737c94c48c44f424e4adf6f16ff.svn-base | 92 + ...71b73ab76061332f8d71fe31c6f20ce1d.svn-base | 91 + ...f4ae42ceb6f16cdbfb111ba06327ce14a.svn-base | 338 +++ ...e3b3304b148d1a07bcd4eed799959436a.svn-base | 366 +++ ...9a18ea53c442f9f6462048620e9430f2d.svn-base | 98 + ...dd405a28fccc81938f40553fc6c22e76d.svn-base | 20 + ...163defd1d023646e63790c76c57b079df.svn-base | 56 + ...8decdc64eb1afd7e7c90483e5fa09758a.svn-base | 299 +++ ...19970a20dc71fccd423dff3266e373e84.svn-base | 73 + ...4e975a91f8221db1112c282f343d05da4.svn-base | 695 +++++ ...4648bd3e440bdea7a6d410bb2b210367f.svn-base | 349 +++ ...27f5600d750bf16b569d7444070f993f8.svn-base | 171 ++ ...a35dd4a40d71da7e9f4c2a367c54ad399.svn-base | 198 ++ ...d3f39a891920d6d208951bed3aaeff630.svn-base | 864 ++++++ ...6e0cc628cfc903758f30363bfc823aafb.svn-base | 284 ++ ...e55fc3a3c0717425205c3fa899000282f.svn-base | 194 ++ ...cb88e210ef873d478722217525f2a645f.svn-base | 100 + ...9a95c07be76a6065da6e6f53b81d12fe5.svn-base | 79 + ...8ba55781f96081671f34390c8fd66cba4.svn-base | 113 + ...582747ed981bab32f615cdcd4f09e920d.svn-base | 155 ++ ...10a3fd8627ab6c00d0dbb4d7b1e7be390.svn-base | 135 + ...9e5b4cffb481db6d4b1b6fb4a2c3b0632.svn-base | 74 + ...2fbb859b94c91bc4760af32f6e625a1a3.svn-base | 56 + ...9de80006bf0f88194c6211db2022da01c.svn-base | 23 + ...0abf6dd1a4b7bb59c455dc5e45bf1177d.svn-base | 111 + ...63ba8700881972c83f12f19aadf024399.svn-base | 58 + ...3f9a9984a4dd4f4d182cd536c393f5951.svn-base | 88 + ...2bfd93079a18333dc4adbb2cf3139cfca.svn-base | 49 + ...15486021715663fe7740ddcb4adb20df5.svn-base | 112 + ...5ff93e113d79de5251625646809edcdb8.svn-base | 98 + ...7046a942516efbe93824c7d0b94a140ea.svn-base | 16 + ...5f6d3a820bc444b29417a849f34c27094.svn-base | 58 + ...584b64debd62e24119608f57115f8b1a3.svn-base | 114 + ...9e6995f58893490b9a8fa14d223811163.svn-base | 48 + ...de2e5904de94670ae5a81cde20749ee10.svn-base | 176 ++ ...e3dcc971a3abea044075d12fc8221a00f.svn-base | 253 ++ ...1feb4298a31cc30d887b9ffdcd3b14bc5.svn-base | 32 + ...5700b9a88759eb4db080c0a48ad97981d.svn-base | 101 + ...bc1859bfb1fe08505caead65f73100f18.svn-base | 176 ++ ...243f8de0895513927378bf1fadade28ee.svn-base | 616 +++++ ...9905f830b536138a420657004c97671c7.svn-base | 51 + ...918a39c8538e81f8f589e675a257fde94.svn-base | 53 + ...9f0ab06d19d0f608d0e7404eaeb3be414.svn-base | 320 +++ ...38877d1c2c76ad8000624b214d1ba88f3.svn-base | 1057 ++++++++ ...452f58635d172a185f8ed300969006268.svn-base | 143 + ...6e1dd5caa2d619b6bd25aaf8bef9f0ace.svn-base | 50 + ...60e0ecdc1d6e3725ce3dc6115248e206c.svn-base | 7 + ...d67f4a503fb23e65643402c969419b127.svn-base | 233 ++ ...6a4e11edd4664daf3d737f20c49609adc.svn-base | 605 +++++ ...8e4a7d21aaaefd51687ab96a0653650da.svn-base | 11 + ...04ce8924faab63cfd2a7eb1c40dd3d5cf.svn-base | 71 + ...a5f0e688ef0eb89ab3e17c02a2a96d0ea.svn-base | 77 + ...8d35b2e713a56d690ac36c816b3f85b3d.svn-base | 131 + ...e6b87f9f5a194b509e271a6c18611355f.svn-base | 78 + ...462ae09429ab265a4742e05b763279737.svn-base | 83 + ...05449b32a9cfa7905560d6bb07e00e7ba.svn-base | 157 ++ ...29974d552b24527ee1f6179f13b078770.svn-base | 82 + ...b57f06f5ea81ca28968c8e9ae73852d15.svn-base | 145 + ...9204260f579d4a96e4e7652091e280041.svn-base | 75 + ...5907218629db8907edcd6ad5962265755.svn-base | 383 +++ ...192719e30e949835fc97d05e8df0083e1.svn-base | 48 + ...68658e82f87863140bf26b3e4e074f969.svn-base | 108 + ...11c9af07c167438778befee368102d165.svn-base | 56 + ...8bc24200599053aba6de35c78efcf10ca.svn-base | 91 + ...ad24102c06bb4276989a58929ad125b7f.svn-base | 78 + ...8a45d6847b392afb1d386089347df37ca.svn-base | 152 ++ ...2dafe6dd7e9da0ca04b3147094067ecae.svn-base | 37 + ...ad141e421abb8a2a36d4a0b488e7085fd.svn-base | 421 +++ ...18f42a39b9bf655d45dc5b96ea2f00998.svn-base | 296 +++ ...a164c4bc9257af1afbac2119c8edc21ca.svn-base | 143 + ...a4d104d5e90a5380e8d33ad0e5e87dfb0.svn-base | 487 ++++ ...36ea5c378677788ad0460b6656f729375.svn-base | 312 +++ ...36cbbaf47aeb5a7b3ccf46c11cdabd4db.svn-base | 319 +++ ...f5ee485cfd9c9960005c1e57227c6d4db.svn-base | 174 ++ ...b37086754075e709580ba7f24c236a743.svn-base | 78 + ...631fc243e714e737fda93402a0080bedc.svn-base | 2281 ++++++++++++++++ ...dce560a1b9ad374d7fb6ba7cac62f73c7.svn-base | 76 + ...420c16664c429175b6022ea5a84743dd1.svn-base | 280 ++ ...e4918a55457c7bec7e1a66a23bcffa841.svn-base | 1227 +++++++++ ...5e1df195530e169307e246afddcf44112.svn-base | 79 + ...841c1a41fa470a7acd5c9292f6c7e7fa8.svn-base | 11 + ...ab1024d02fc928da029d0203185ea00f2.svn-base | 300 +++ ...2f49e0481f25bee93dd9766e5b91d78ac.svn-base | 87 + ...86b0301374a24a0f3c410513c96fbdb0b.svn-base | 92 + ...a28b099f20f32ebaed55075ca23a8ada9.svn-base | 198 ++ ...244b955e31e6f0f31582645cb23ddfa55.svn-base | 244 ++ ...9872964047d3be9ff897f2179600139b8.svn-base | 74 + ...ab5953954dfa5ee2777c389f555d795a8.svn-base | 6 + ...5d2d174024f1adbca9c757da45af817dd.svn-base | 171 ++ ...5bf4c6c74770125708beb6d93805842a5.svn-base | 87 + ...4f7c88db391ee26007ebbf27335b1aa7b.svn-base | 118 + ...8f6a5c6f6d148ec1a1cfbeda8f151bff1.svn-base | 103 + ...41d0a6793902d3308c92d16eb4a68309f.svn-base | 66 + ...3dc231a9068c518e8d4c5f9ab6f8d7f2c.svn-base | 119 + ...e49df842a8782eec0de5e172a827b497f.svn-base | 223 ++ ...ab85acb49f7628c87cf19448566b4a7e3.svn-base | 83 + ...bce0adecff352d63d2bde2a348b224471.svn-base | 182 ++ ...ad0da5da88486188344791e8f11d42bff.svn-base | 225 ++ ...e149ffe314b5dd31e7abd93c540d6924c.svn-base | 142 + ...7079db84623ff9fe5cee96099bac29205.svn-base | 200 ++ ...5c7052e18a6cf2400943e64e88f232a4a.svn-base | 2259 ++++++++++++++++ ...24ef4db3315c748301c4d3517c3f41c44.svn-base | 70 + ...28f8026363def1f5de16c45cc8608f5cc.svn-base | 242 ++ ...46b352af5380681f2e8c1f89c7901cb61.svn-base | 104 + ...1b8a915f8c8ee6726a03619ecccc7da1c.svn-base | 1549 +++++++++++ ...823c882b1992aafe8276ca92d43763709.svn-base | 94 + ...4072f039878327e80b30cd260a8948220.svn-base | 159 ++ ...32750bcac967a36c093809b36c9effe30.svn-base | 79 + ...9f17fc95c4a05a35fe749171e68b14fb9.svn-base | 459 ++++ ...ecc2a46e734a26a5cc569dc191fa5d6e9.svn-base | 119 + ...68fb576887e1ad37c279de3d1a4de48ee.svn-base | 99 + ...a7dbff587cb1add95800c676d30b35ef2.svn-base | 49 + ...75d14e30dededb63f7b76a038afecb8c7.svn-base | 81 + ...6c95c249b1b49f4c8b7c4be1aad53eeb1.svn-base | 268 ++ ...471fd0be8c145e2096c2cf374eac840c9.svn-base | 120 + ...dc50673b041013ba542dbb48e17c42aa1.svn-base | 290 ++ ...51a2a13c52b9639b8dedbffa724447102.svn-base | 189 ++ ...193dea1a1949ee10fc59426fec4ecf319.svn-base | 177 ++ ...147f472135317b6ec9be159b501a3f58a.svn-base | 108 + ...c0d4d6913f9629c83af9b3881166eb052.svn-base | 724 +++++ ...39ff1a1a71f1826d93c6613b443efb2a.svn-base} | 36 +- ...c78a83a03c70a6f674ed361127122bac2.svn-base | 159 ++ ...360f08c7455a990dec7badb512cc1e9be.svn-base | 168 ++ ...e27b44c8ffa8aedf4a623b92488fd924d.svn-base | 174 ++ ...b6f84db9898910aea2133fa46e14f16b3.svn-base | 301 +++ ...704491e69717fc88e1c7ca1a491570a72.svn-base | 53 + ...965280c8a118a95443d0eddb78fc702dc.svn-base | 94 + ...c3b32d9f0037efa5a5499dd7810455bb0.svn-base | 106 + ...ea4f9a314f381e98bbd7b32a15f95f7c6.svn-base | 541 ++++ ...b72adf86d17231d59eb45085d5942f285.svn-base | 1024 +++++++ ...2cc9f6f2a1002964766e77d4b6b0b2de6.svn-base | 12 + ...ce5c3b67b311caade66cc50b3cedf3f31.svn-base | 61 + ...962563bf65f3419cadf2eebfc16daf398.svn-base | 68 + ...0f5ad8ac33b09ed041a46d4d55c0940d2.svn-base | 57 + ...083fa1b0b03e664b87807a64aee73ed29.svn-base | 445 ++++ ...1fc70f901c992ccf690b310d40bbfc4f6.svn-base | 72 + ...c7ca9205ee333dd74cb187a10324a235f.svn-base | 66 + ...f01244cfd0d71d53bdb7f2972621f5b09.svn-base | 114 + ...86bf5526cc2cf4b0ba309b7572bd4964b.svn-base | 175 ++ .../sidplay-residfp-code/.svn/wc.db | Bin 450560 -> 512000 bytes .../combined-waveforms/Makefile | 5 +- .../combined-waveforms/combined.cpp | 1387 +++++++--- .../combined-waveforms/parameters.h | 349 ++- .../sidplay-residfp-code/libsidplayfp/AUTHORS | 4 +- .../libsidplayfp/Doxyfile.in | 4 +- .../libsidplayfp/Makefile.am | 63 +- .../sidplay-residfp-code/libsidplayfp/NEWS | 37 + .../sidplay-residfp-code/libsidplayfp/README | 5 +- .../sidplay-residfp-code/libsidplayfp/TODO | 2 + .../libsidplayfp/configure.ac | 85 +- .../libsidplayfp/docs/mainpage.dox | 4 +- .../libsidplayfp/m4/ax_check_compile_flag.m4 | 12 +- .../libsidplayfp/m4/ax_lib_gcrypt.m4 | 108 + .../m4/sid_cxx_compile_stdcxx_11.m4 | 30 +- .../libsidplayfp/src/Event.h | 75 + .../libsidplayfp/src/EventCallback.h | 57 + .../libsidplayfp/src/EventScheduler.cpp | 5 + .../libsidplayfp/src/EventScheduler.h | 139 +- .../libsidplayfp/src/SidInfoImpl.h | 12 +- .../src/builders/exsid-builder/driver/COPYING | 339 +++ .../builders/exsid-builder/driver/ChangeLog | 16 + .../builders/exsid-builder/driver/Doxyfile.in | 2353 +++++++++++++++++ .../builders/exsid-builder/driver/Makefile.am | 44 + .../src/builders/exsid-builder/driver/README | 7 + .../exsid-builder/driver/configure.ac | 100 + .../exsid-builder/driver/docs/mainpage.dox | 32 + .../src/builders/exsid-builder/driver/exSID.c | 527 ++++ .../src/builders/exsid-builder/driver/exSID.h | 48 + .../exsid-builder/driver/exSID_defs.h | 79 + .../exsid-builder/driver/exSID_ftdiwrap.c | 336 +++ .../exsid-builder/driver/exSID_ftdiwrap.h | 91 + .../exsid-builder/driver/libexsid.pc.in | 11 + .../builders/exsid-builder/exsid-builder.cpp | 112 + .../src/builders/exsid-builder/exsid-emu.cpp | 160 ++ .../src/builders/exsid-builder/exsid-emu.h | 94 + .../src/builders/exsid-builder/exsid.h | 56 + .../hardsid-builder/hardsid-builder.cpp | 18 +- .../hardsid-builder/hardsid-emu-unix.cpp | 85 +- .../hardsid-builder/hardsid-emu-win.cpp | 77 +- .../builders/hardsid-builder/hardsid-emu.h | 26 +- .../builders/resid-builder/resid-builder.cpp | 8 +- .../src/builders/resid-builder/resid-emu.cpp | 33 +- .../src/builders/resid-builder/resid-emu.h | 24 +- .../builders/resid-builder/resid/configure.in | 8 + .../src/builders/resid-builder/resid/dac.cc | 5 + .../builders/resid-builder/resid/filter.cc | 14 +- .../src/builders/resid-builder/resid/filter.h | 8 +- .../src/builders/resid-builder/resid/sid.cc | 17 +- .../src/builders/resid-builder/resid/sid.h | 4 +- .../builders/resid-builder/resid/siddefs.h.in | 5 + .../residfp-builder/residfp-builder.cpp | 10 +- .../builders/residfp-builder/residfp-emu.cpp | 22 +- .../builders/residfp-builder/residfp-emu.h | 17 +- .../builders/residfp-builder/residfp/AUTHORS | 2 +- .../builders/residfp-builder/residfp/Dac.cpp | 57 +- .../builders/residfp-builder/residfp/Dac.h | 41 +- .../residfp/EnvelopeGenerator.cpp | 29 +- .../residfp/EnvelopeGenerator.h | 57 +- .../residfp/ExternalFilter.cpp | 17 +- .../residfp-builder/residfp/ExternalFilter.h | 7 +- .../residfp-builder/residfp/Filter.cpp | 3 +- .../builders/residfp-builder/residfp/Filter.h | 16 +- .../residfp-builder/residfp/Filter6581.cpp | 4 +- .../residfp-builder/residfp/Filter6581.h | 33 +- .../residfp-builder/residfp/Filter8580.h | 26 +- .../residfp/FilterModelConfig.cpp | 53 +- .../residfp/FilterModelConfig.h | 15 +- .../residfp-builder/residfp/OpAmp.cpp | 4 +- .../builders/residfp-builder/residfp/OpAmp.h | 17 +- .../builders/residfp-builder/residfp/README | 3 +- .../builders/residfp-builder/residfp/SID.cpp | 101 +- .../builders/residfp-builder/residfp/SID.h | 26 +- .../residfp-builder/residfp/Spline.cpp | 11 +- .../builders/residfp-builder/residfp/Spline.h | 8 +- .../builders/residfp-builder/residfp/Voice.h | 10 +- .../residfp/WaveformCalculator.cpp | 79 +- .../residfp/WaveformCalculator.h | 5 +- .../residfp/WaveformGenerator.cpp | 141 +- .../residfp/WaveformGenerator.h | 45 +- .../residfp/resample/Resampler.h | 2 +- .../residfp/resample/SincResampler.cpp | 43 +- .../residfp/resample/SincResampler.h | 12 +- .../residfp/resample/TwoPassSincResampler.h | 17 +- .../residfp/resample/ZeroOrderResampler.h | 10 +- .../libsidplayfp/src/c64/Banks/ColorRAMBank.h | 6 +- .../src/c64/Banks/DisconnectedBusBank.h | 4 +- .../libsidplayfp/src/c64/Banks/ExtraSidBank.h | 2 +- .../libsidplayfp/src/c64/Banks/IOBank.h | 4 +- .../libsidplayfp/src/c64/Banks/NullSid.h | 2 +- .../libsidplayfp/src/c64/Banks/SidBank.h | 4 +- .../src/c64/Banks/SystemRAMBank.h | 6 +- .../src/c64/Banks/SystemROMBanks.h | 19 +- .../libsidplayfp/src/c64/Banks/ZeroRAMBank.h | 229 +- .../libsidplayfp/src/c64/CIA/SerialPort.h | 76 + .../libsidplayfp/src/c64/CIA/interrupt.h | 143 + .../libsidplayfp/src/c64/CIA/mos6526.cpp | 220 +- .../libsidplayfp/src/c64/CIA/mos6526.h | 139 +- .../libsidplayfp/src/c64/CIA/timer.cpp | 17 +- .../libsidplayfp/src/c64/CIA/timer.h | 72 +- .../libsidplayfp/src/c64/CIA/tod.cpp | 446 ++-- .../libsidplayfp/src/c64/CIA/tod.h | 235 +- .../libsidplayfp/src/c64/CPU/flags.h | 30 +- .../libsidplayfp/src/c64/CPU/mos6510.cpp | 683 ++--- .../libsidplayfp/src/c64/CPU/mos6510.h | 41 +- .../libsidplayfp/src/c64/CPU/mos6510debug.cpp | 236 +- .../libsidplayfp/src/c64/CPU/mos6510debug.h | 6 +- .../libsidplayfp/src/c64/VIC_II/lightpen.h | 9 +- .../libsidplayfp/src/c64/VIC_II/mos656x.cpp | 152 +- .../libsidplayfp/src/c64/VIC_II/mos656x.h | 55 +- .../libsidplayfp/src/c64/VIC_II/sprites.h | 349 +-- .../libsidplayfp/src/c64/c64.cpp | 22 +- .../libsidplayfp/src/c64/c64.h | 21 +- .../libsidplayfp/src/c64/c64cia.h | 18 +- .../libsidplayfp/src/c64/c64cpu.h | 15 +- .../libsidplayfp/src/c64/c64env.h | 12 +- .../libsidplayfp/src/c64/c64sid.h | 10 +- .../libsidplayfp/src/c64/c64vic.h | 10 +- .../libsidplayfp/src/c64/mmu.cpp | 18 +- .../libsidplayfp/src/c64/mmu.h | 20 +- .../libsidplayfp/src/mixer.cpp | 44 +- .../libsidplayfp/src/mixer.h | 76 +- .../libsidplayfp/src/player.cpp | 138 +- .../libsidplayfp/src/player.h | 31 +- .../libsidplayfp/src/psiddrv.cpp | 79 +- .../libsidplayfp/src/psiddrv.h | 9 +- .../libsidplayfp/src/reloc65.cpp | 81 +- .../libsidplayfp/src/romCheck.h | 4 +- .../libsidplayfp/src/sidcxx11.h | 2 +- .../libsidplayfp/src/sidemu.cpp | 19 +- .../libsidplayfp/src/sidemu.h | 71 +- .../libsidplayfp/src/sidendian.h | 14 +- .../libsidplayfp/src/sidmd5.h | 3 +- .../libsidplayfp/src/sidmemory.h | 5 + .../libsidplayfp/src/sidplayfp/SidConfig.cpp | 23 +- .../libsidplayfp/src/sidplayfp/SidConfig.h | 48 +- .../libsidplayfp/src/sidplayfp/SidInfo.cpp | 48 + .../libsidplayfp/src/sidplayfp/SidInfo.h | 198 +- .../libsidplayfp/src/sidplayfp/SidTune.cpp | 22 +- .../libsidplayfp/src/sidplayfp/SidTune.h | 10 +- .../src/sidplayfp/SidTuneInfo.cpp | 83 + .../libsidplayfp/src/sidplayfp/SidTuneInfo.h | 74 +- .../libsidplayfp/src/sidplayfp/event.h | 174 -- .../libsidplayfp/src/sidplayfp/sidbuilder.cpp | 14 +- .../libsidplayfp/src/sidplayfp/sidbuilder.h | 18 +- .../libsidplayfp/src/sidplayfp/siddefs.h | 28 +- .../libsidplayfp/src/sidplayfp/sidplayfp.cpp | 4 +- .../libsidplayfp/src/sidplayfp/sidplayfp.h | 29 +- .../libsidplayfp/src/sidtune/MUS.cpp | 109 +- .../libsidplayfp/src/sidtune/MUS.h | 13 +- .../libsidplayfp/src/sidtune/PSID.cpp | 191 +- .../libsidplayfp/src/sidtune/PSID.h | 2 +- .../libsidplayfp/src/sidtune/SidTuneBase.cpp | 99 +- .../libsidplayfp/src/sidtune/SidTuneBase.h | 75 +- .../libsidplayfp/src/sidtune/SidTuneCfg.h | 26 +- .../src/sidtune/SidTuneInfoImpl.h | 85 +- .../libsidplayfp/src/sidtune/SidTuneTools.h | 4 - .../libsidplayfp/src/sidtune/SmartPtr.h | 94 +- .../libsidplayfp/src/sidtune/p00.cpp | 15 +- .../libsidplayfp/src/sidtune/p00.h | 6 +- .../libsidplayfp/src/sidtune/prg.cpp | 8 +- .../libsidplayfp/src/sidtune/prg.h | 10 +- .../libsidplayfp/src/sidtune/sidplayer.bin | 438 --- .../libsidplayfp/src/sidtune/sidplayer1.a65 | 23 +- .../libsidplayfp/src/sidtune/sidplayer1.bin | 407 +++ .../libsidplayfp/src/sidtune/sidplayer2.a65 | 23 +- .../libsidplayfp/src/sidtune/sidplayer2.bin | 408 +++ .../libsidplayfp/src/stringutils.h | 17 +- .../libsidplayfp/src/utils/STILview/stil.cpp | 17 +- .../src/utils/STILview/stildefs.h | 10 +- .../libsidplayfp/src/utils/SidDatabase.cpp | 6 +- .../libsidplayfp/src/utils/SidDatabase.h | 7 +- .../libsidplayfp/src/utils/iniParser.cpp | 13 +- .../libsidplayfp/src/utils/iniParser.h | 6 +- .../libsidplayfp/src/utils/md5Factory.cpp | 49 + .../libsidplayfp/src/utils/md5Factory.h | 28 +- .../libsidplayfp/src/utils/md5Gcrypt.h | 6 +- .../libsidplayfp/src/utils/md5Internal.h | 4 +- .../libsidplayfp/test/demo.cpp | 6 +- .../libsidplayfp/test/test.cpp | 2 +- .../libsidplayfp/tests/Makefile.am | 31 +- .../libsidplayfp/tests/TestDac.cpp | 28 +- .../libsidplayfp/tests/TestMUS.cpp | 68 + .../libsidplayfp/tests/TestPSID.cpp | 349 +++ .../libsidplayfp/tests/TestSpline.cpp | 23 +- .../sidplay-residfp-code/readSID.pl | 9 +- .../sidplay-residfp-code/sidplayfp/AUTHORS | 2 +- .../sidplayfp/Makefile.am | 13 +- .../sidplay-residfp-code/sidplayfp/README | 4 +- .../sidplay-residfp-code/sidplayfp/TODO | 6 +- .../sidplayfp/configure.ac | 20 +- .../sidplayfp/doc/en/sidplayfp.ini.pod | 6 +- .../sidplayfp/doc/en/sidplayfp.pod | 64 +- .../sidplayfp/doc/en/stilview.pod | 2 +- .../sidplayfp/m4/sid_cxx_compile_stdcxx_11.m4 | 106 + .../sidplayfp/src/IniConfig.cpp | 53 +- .../sidplayfp/src/args.cpp | 149 +- .../sidplayfp/src/audio/AudioBase.h | 12 +- .../sidplayfp/src/audio/AudioDrv.cpp | 15 +- .../sidplayfp/src/audio/AudioDrv.h | 2 +- .../sidplayfp/src/audio/alsa/audiodrv.cpp | 10 +- .../sidplayfp/src/audio/alsa/audiodrv.h | 10 +- .../sidplayfp/src/audio/directx/audiodrv.h | 10 +- .../sidplayfp/src/audio/mmsystem/audiodrv.h | 10 +- .../sidplayfp/src/audio/null/null.h | 15 +- .../sidplayfp/src/audio/oss/audiodrv.h | 10 +- .../sidplayfp/src/audio/pulse/audiodrv.cpp | 22 +- .../sidplayfp/src/audio/pulse/audiodrv.h | 10 +- .../sidplayfp/src/audio/wav/WavFile.cpp | 8 +- .../sidplayfp/src/audio/wav/WavFile.h | 14 +- .../sidplayfp/src/ini/types.h | 4 +- .../sidplayfp/src/keyboard.cpp | 15 +- .../sidplayfp/src/keyboard.h | 5 +- .../sidplayfp/src/menu.cpp | 31 +- .../sidplayfp/src/player.cpp | 232 +- .../sidplayfp/src/player.h | 21 +- .../sidplayfp/src/sidcxx11.h | 35 + .../sidplayfp/src/stilview.cpp | 68 +- .../sidplayfp.xcodeproj/project.pbxproj | 101 +- .../midi_processing.xcodeproj/project.pbxproj | 8 +- .../es.lproj/InfoPlist.strings | 2 + .../midi_processing-Info.plist | 2 +- .../modplay/modplay.xcodeproj/project.pbxproj | 8 +- Frameworks/modplay/modplay/dbopl.c | 2 +- .../modplay/es.lproj/InfoPlist.strings | 2 + Frameworks/modplay/modplay/modplay-Info.plist | 2 +- Frameworks/modplay/modplay/resampler.c | 2 +- .../mpg123/mpg123.xcodeproj/project.pbxproj | 3 + .../mpg123/mpg123/es.lproj/InfoPlist.strings | 2 + .../playptmod.xcodeproj/project.pbxproj | 8 +- .../playptmod/es.lproj/InfoPlist.strings | 2 + .../playptmod/playptmod/playptmod-Info.plist | 2 +- Frameworks/playptmod/playptmod/playptmod.c | 2 +- .../psflib/psflib.xcodeproj/project.pbxproj | 8 +- .../psflib/psflib/es.lproj/InfoPlist.strings | 2 + Frameworks/psflib/psflib/psflib-Info.plist | 2 +- .../vgmstream.xcodeproj/project.pbxproj | 1 + .../vgmstream/es.lproj/InfoPlist.strings | 2 + .../vio2sf/vio2sf.xcodeproj/project.pbxproj | 8 +- .../vio2sf/vio2sf/es.lproj/InfoPlist.strings | 2 + Frameworks/vio2sf/vio2sf/vio2sf-Info.plist | 2 +- InfoInspector/InfoWindowController.h | 2 +- InfoInspector/InfoWindowController.m | 2 +- Playlist/DNDArrayController.m | 2 - Playlist/PlaylistController.m | 55 +- Playlist/PlaylistEntry.m | 7 +- Playlist/PlaylistLoader.m | 49 +- Playlist/PlaylistView.m | 14 - Playlist/XmlContainer.m | 2 - Plugins/APL/APL.xcodeproj/project.pbxproj | 5 +- Plugins/APL/Info.plist | 8 +- .../ArchiveSource.xcodeproj/project.pbxproj | 8 +- .../ArchiveSource/ArchiveSource-Info.plist | 2 +- .../ArchiveSource/es.lproj/InfoPlist.strings | 2 + .../BASSMODS.xcodeproj/project.pbxproj | 10 +- Plugins/BASSMODS/BASSMODS/BASSDecoder.mm | 4 +- Plugins/BASSMODS/BASSMODS/BASSMODS-Info.plist | 2 +- .../BASSMODS/es.lproj/InfoPlist.strings | 2 + .../CoreAudio.xcodeproj/project.pbxproj | 7 +- Plugins/CoreAudio/CoreAudioDecoder.m | 4 +- Plugins/CoreAudio/Info.plist | 6 +- Plugins/CueSheet/CueSheet.m | 30 +- .../CueSheet.xcodeproj/project.pbxproj | 10 +- Plugins/CueSheet/CueSheetDecoder.m | 24 +- Plugins/CueSheet/CueSheetTrack.m | 15 +- Plugins/CueSheet/Info.plist | 6 +- Plugins/CueSheet/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Plugins/Dumb/Dumb.xcodeproj/project.pbxproj | 12 +- Plugins/Dumb/Info.plist | 6 +- Plugins/Dumb/archive/mo3/mo3.c | 6 +- Plugins/Dumb/archive/umx/umx.mm | 2 +- Plugins/Dumb/archive/umx/unrealfmt.cpp | 56 +- Plugins/Dumb/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../FFMPEG/FFMPEG.xcodeproj/project.pbxproj | 24 +- Plugins/FFMPEG/Info.plist | 2 +- .../FileSource.xcodeproj/project.pbxproj | 7 +- Plugins/FileSource/Info.plist | 6 +- Plugins/Flac/Flac.xcodeproj/project.pbxproj | 9 +- Plugins/Flac/FlacDecoder.m | 18 +- Plugins/Flac/Info.plist | 6 +- Plugins/GME/GME.xcodeproj/project.pbxproj | 12 +- Plugins/GME/GameDecoder.m | 6 +- Plugins/GME/GameMetadataReader.m | 2 +- Plugins/GME/Info.plist | 6 +- Plugins/GME/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Plugins/HTTPSource/HTTPSource.m | 4 - .../HTTPSource.xcodeproj/project.pbxproj | 7 +- Plugins/HTTPSource/Info.plist | 6 +- Plugins/HTTPSource/Utils/HTTPConnection.m | 13 +- Plugins/HTTPSource/Utils/Socket.m | 4 +- .../HighlyComplete.xcodeproj/project.pbxproj | 1 + .../HighlyComplete/es.lproj/InfoPlist.strings | 2 + .../Hively/Hively.xcodeproj/project.pbxproj | 10 +- Plugins/Hively/Hively/Hively-Info.plist | 2 +- .../Hively/Hively/es.lproj/InfoPlist.strings | 2 + Plugins/M3u/Info.plist | 6 +- Plugins/M3u/M3u.xcodeproj/project.pbxproj | 10 +- Plugins/M3u/M3uContainer.m | 7 +- Plugins/M3u/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Plugins/MIDI/MIDI.xcodeproj/project.pbxproj | 22 +- Plugins/MIDI/MIDI/AUPlayer.mm | 2 +- Plugins/MIDI/MIDI/MIDI-Info.plist | 2 +- Plugins/MIDI/MIDI/es.lproj/InfoPlist.strings | 2 + Plugins/Musepack/Info.plist | 6 +- .../Musepack.xcodeproj/project.pbxproj | 9 +- Plugins/Musepack/MusepackDecoder.m | 14 +- Plugins/Opus/Opus.xcodeproj/project.pbxproj | 10 +- Plugins/Opus/Opus/Opus-Info.plist | 2 +- Plugins/Opus/Opus/es.lproj/InfoPlist.strings | 2 + Plugins/Pls/Info.plist | 6 +- Plugins/Pls/Pls.xcodeproj/project.pbxproj | 10 +- Plugins/Pls/PlsContainer.m | 8 +- Plugins/Pls/es.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Plugins/Shorten/Info.plist | 6 +- .../Shorten/Shorten.xcodeproj/project.pbxproj | 9 +- .../SilenceDecoder.xcodeproj/project.pbxproj | 5 +- .../SilenceDecoder/SilenceDecoder/Info.plist | 2 +- Plugins/TagLib/Info.plist | 6 +- .../TagLib/TagLib.xcodeproj/project.pbxproj | 9 +- Plugins/TagLib/TagLibMetadataReader.m | 2 +- Plugins/Vorbis/Info.plist | 6 +- .../Vorbis/Vorbis.xcodeproj/project.pbxproj | 11 +- Plugins/Vorbis/VorbisDecoder.m | 14 +- Plugins/WavPack/Info.plist | 6 +- .../WavPack/WavPack.xcodeproj/project.pbxproj | 9 +- Plugins/WavPack/WavPackDecoder.m | 20 +- .../modplay/modplay.xcodeproj/project.pbxproj | 12 +- .../modplay/es.lproj/InfoPlist.strings | 2 + Plugins/modplay/modplay/modplay-Info.plist | 2 +- .../playptmod.xcodeproj/project.pbxproj | 10 +- .../playptmod/es.lproj/InfoPlist.strings | 2 + .../playptmod/playptmod/playptmod-Info.plist | 2 +- .../sidplay/sidplay.xcodeproj/project.pbxproj | 5 +- Plugins/sidplay/sidplay/Info.plist | 2 +- .../vgmstream.xcodeproj/project.pbxproj | 10 +- .../vgmstream/es.lproj/InfoPlist.strings | 2 + .../vgmstream/vgmstream/vgmstream-Info.plist | 2 +- .../General/English.lproj/Localizable.strings | 1 - .../General/English.lproj/Preferences.xib | 36 +- .../General/General.xcodeproj/project.pbxproj | 16 +- Preferences/General/GeneralPreferencePane.m | 9 +- .../General/GeneralPreferencesPlugin.h | 2 - .../General/GeneralPreferencesPlugin.m | 10 +- Preferences/General/HotKeyPane.m | 2 +- Preferences/General/Info.plist | 6 +- Preferences/General/MIDIPane.m | 2 +- .../MIDIPluginBehaviorArrayController.m | 4 +- Preferences/General/OutputPane.m | 2 +- Preferences/General/OutputsArrayController.m | 4 +- .../General/es.lproj/InfoPlist.strings | Bin 0 -> 198 bytes .../General/es.lproj/Localizable.strings | 20 + Preferences/General/es.lproj/Preferences.xib | 613 +++++ Preferences/PreferencePluginController.m | 10 +- Preferences/PreferencesController.m | 9 - Preferences/PreferencesWindow.m | 12 - Spotlight/SpotlightPlaylistEntry.m | 8 +- Spotlight/SpotlightTransformers.m | 1 - Spotlight/SpotlightWindowController.m | 27 +- ThirdParty/AppleRemote/AppleRemote.m | 25 +- .../GCWindowMenu/GCOneShotEffectTimer.m | 18 +- ThirdParty/GCWindowMenu/GCWindowMenu.m | 21 +- ThirdParty/ImageTextCell/ImageTextCell.m | 9 +- ThirdParty/OpenURLPanel/OpenURLPanel.m | 16 +- .../NSObject+SPInvocationGrabbing.m | 9 +- ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m | 71 +- ThirdParty/ToolTip/ToolTipWindow.m | 19 +- .../FontSizetoLineHeightTransformer.m | 1 - Utils/SideViewController.h | 7 + Utils/TrackingSlider.m | 8 +- Window/NowPlayingBarView.m | 6 - Window/PlaybackButtons.m | 6 +- Window/VolumeSlider.m | 2 - es.lproj/Credits.html | 9 + es.lproj/Feedback.xib | 914 +++++++ es.lproj/FileTree.xib | 1763 ++++++++++++ es.lproj/InfoInspector.xib | 1526 +++++++++++ es.lproj/InfoPlist.strings | Bin 0 -> 250 bytes es.lproj/Localizable.strings | 30 + es.lproj/MainMenu.xib | 1896 +++++++++++++ es.lproj/OpenURLPanel.xib | 70 + es.lproj/SpotlightPanel.xib | 2110 +++++++++++++++ 751 files changed, 72137 insertions(+), 6104 deletions(-) create mode 100644 Frameworks/Dumb/es.lproj/InfoPlist.strings create mode 100644 Frameworks/FFMPEG/es.lproj/InfoPlist.strings create mode 100644 Frameworks/File_Extractor/File_Extractor/es.lproj/InfoPlist.strings create mode 100644 Frameworks/GME/es.lproj/InfoPlist.strings create mode 100644 Frameworks/HighlyAdvanced/HighlyAdvanced/es.lproj/InfoPlist.strings create mode 100644 Frameworks/HighlyExperimental/HighlyExperimental/es.lproj/InfoPlist.strings create mode 100644 Frameworks/HighlyQuixotic/HighlyQuixotic/es.lproj/InfoPlist.strings create mode 100644 Frameworks/HighlyTheoretical/HighlyTheoretical/es.lproj/InfoPlist.strings create mode 100644 Frameworks/HivelyPlayer/HivelyPlayer/es.lproj/InfoPlist.strings create mode 100644 Frameworks/MPCDec/es.lproj/InfoPlist.strings create mode 100644 Frameworks/NDHotKey/NDHotKey/es.lproj/InfoPlist.strings create mode 100644 Frameworks/Ogg/macosx/es.lproj/InfoPlist.strings create mode 100644 Frameworks/Opus/Opus/es.lproj/InfoPlist.strings create mode 100644 Frameworks/SSEQPlayer/SSEQPlayer/es.lproj/InfoPlist.strings create mode 100644 Frameworks/Shorten/es.lproj/InfoPlist.strings create mode 100644 Frameworks/TagLib/es.lproj/InfoPlist.strings create mode 100644 Frameworks/Vorbis/macosx/es.lproj/InfoPlist.strings create mode 100644 Frameworks/WavPack/es.lproj/InfoPlist.strings create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/00/00780e63e578668987cfca992355f403cdf78f4b.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/00/007b09222a2384d5aaf34b9b9d81cabeb621be69.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/02/021b17a70f01008a0833e04556385fedd3382ec7.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/02/027636b2b2db3d6c2ced399be35ac75cfae42d16.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/04/044d939d8b27688cb1c9becd1e582719f2f9a610.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/05/05513efc4115bfc9efe8a29eb96bbd4a1098cd50.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/05/05c531327690d705031fcdfb0d18ddbcbdb40b64.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/06/0684266083ff41b79816567bbd61c38fe228d11d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/07/07c734b913f53df5682b06a4922dd2c65b34049e.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/08/08089003459bc7de683aec7d1ea8c653f7c47f1a.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/09/09305c22e1879951b6055076272f35c2f54f15f5.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/09/093634c1b278d991dd4aa9974269b5487dd3accb.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/0a/0a7d1c086abdc5b8bf7f56d00ed4207754f6d751.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/11/110eac2789bc5b31505cb8da3e80be5fde61e080.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/11/11badb16eb326a20da7a8f4762e9c59273777abf.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/13/1364d18de2178fea35bc6c943e786d055e613016.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/14/144da8856a3c4a932444c44479c34a3d020245b8.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/15/15f3aea3badbebbe5d2a80c529142cf0f53e2e5c.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/17/1732df5e13112abb67ae3839d967f01d294cc153.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/17/174043ce762a9d510e7ec3bd644bc7f5d1832e4e.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/18/1896aa8d9724301719bdbc680f0e10cfde23c0c8.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/19440ad203a6dcf295620b3d4fde112b4b286fbb.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/1993aafe2e32cd6e3e8cb01497524fc0741399cb.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/19b899bae36861f21f6eb9cd17fda625355173e7.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1a/1a7956f46b32b08b8ca5e953474ebe1522ed9fca.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1b/1b2bfc9560ab5ac178f9de4cb5e2f2a68ff2417b.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1c5711ee7bac61bfd049bcb18f8b78fec22bdf40.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1ca4da6b79799e776829c461eb5a16164a1913cf.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1cd0f82433e14815a8b9baec415df4c33f128475.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1cd907a4f2396b13a80684b01d63cc2649192d65.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1e3b2894f2648a6d03324784c865c0e4c107d67e.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1e8dd1f975673f7cc215f166a922dfb7ee4214d0.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1ef74fcfbfee1b7e71d0602b1d4c7dcd1e29f990.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/20/202abd462ba794df0ca57d4252ddf390328c1b40.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/22/224576b030acac8d6fcb61abac326488630a3fed.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/23/23463f95a9f4c93b6925ce361227ca6333a4c381.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/23/23eadd1a69620f0831de153625d2b0b095b9241d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/24/243a76a8b3f837e2250fbf656bb68374e832f396.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/27/2778a9ad9984f0cf90b678b69e99f9a04a914367.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/28/287e32afeb9043dcfeb98278594e4820e76045c5.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/28/288a36e67b3f5d1e3e891a3fb16a83a1c8b533cf.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/290643272797795b2a4c69b6a70ba30b167febb0.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/2921d7254f0373eb5418cc39027227896e2a2341.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/298497a49e5a5001d8003aa2a3d1ff7d3d785789.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/29dde9b1eba5f6a602eb6e5a9ef38fae430168b7.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/2a/2acf2d75409ec92ff091ef7a6023f2ff640e4dc0.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/2b/2b0923a6deef643939c99b2b45da53a63c9e254a.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/2d/2d5875087d64b71779a6bb6465fb498c4775c27c.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/2d/2dc882eb46780fd0f041465230cade2ea42b8c33.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/2d/2ddd2bc0f24650e73694d639a5f17eee6780300c.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/2f/2fd27cbde35ba05bd63c2bb319a148389b898afc.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/30/30a7449679d7ac248ef3878e1d26d86ef53c9f67.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/31/313b69275cfec983c7647ed308d7541bc81b4fd0.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/31/317f1ad1be8e87bc2c6eb2dd78c68fd4ebc211d9.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/33/33f3fdac4e2f7f5fa44e9937410e30d046b18b84.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/36/3639265e508036519d69440d73ff8a2a0c46255f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/37/375529075c758bd445a5d12d8f133d0d6eadc81e.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/37/3769165507144f79b191efbbe2144d5d28b5734a.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/38/384766a77f7f3a368b4c462bbd247bd74d72efeb.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/3a/3a1ce39d425c385fbdd94be2609a921f75d38ad2.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/3a/3a31730a4b48589a1ef02d0a3af969c8e890106e.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/3a/3a67fd1ecfe4fbfb594419a42922b24388099409.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/3d/3dd2ce6b6e80c57fb2ff732464f1966fdbb9c0ee.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/3e/3e6cadef7e7f40ecf8511d5f6650cf35f0e986f1.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/3f/3f135bc4e1f113754e92590c1e76153697a04536.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/3f/3f612d0f53ebf123124e5f49a6f5619dc588159f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/40/403496062dc5b1d915e04d9e687e417c781162d2.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/41/41158fc20cbabcd4986b9b91a54510196e79a750.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/41/41951fa82903d94b94dd2eda88283e34697b7e61.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/41/41e159f08b977f0b80e1d4bca8262e0f0ad173f5.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/42/429b974751ac6fdbbea289f85b9b8f9d09f2785d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/45/4519c781792fc0983f39034eb691854adfe56e90.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/45/45ba21b331cec5b4cc5f864b3bc1a899fc917819.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/46/4626bed884c7b659ce8f1c70f2626b72a49b4a68.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/4d/4d6bc9d9900aa737c94c48c44f424e4adf6f16ff.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/4f/4f2e86c71b73ab76061332f8d71fe31c6f20ce1d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/50/5003e2ef4ae42ceb6f16cdbfb111ba06327ce14a.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/52/526ebece3b3304b148d1a07bcd4eed799959436a.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/53/535e19c9a18ea53c442f9f6462048620e9430f2d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/58/5854b87dd405a28fccc81938f40553fc6c22e76d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/5b/5b0eab5163defd1d023646e63790c76c57b079df.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/5c/5c244d78decdc64eb1afd7e7c90483e5fa09758a.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/5f/5f3e05919970a20dc71fccd423dff3266e373e84.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/60/60ab5b44e975a91f8221db1112c282f343d05da4.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/61/613adcc4648bd3e440bdea7a6d410bb2b210367f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/64/641d51a27f5600d750bf16b569d7444070f993f8.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/68/68def4aa35dd4a40d71da7e9f4c2a367c54ad399.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/69/691dd71d3f39a891920d6d208951bed3aaeff630.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/69/696d87d6e0cc628cfc903758f30363bfc823aafb.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6a/6a55f69e55fc3a3c0717425205c3fa899000282f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6b/6b3ce4ccb88e210ef873d478722217525f2a645f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6b/6b712ab9a95c07be76a6065da6e6f53b81d12fe5.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6c/6ca59018ba55781f96081671f34390c8fd66cba4.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6c/6cfc23f582747ed981bab32f615cdcd4f09e920d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6d/6d7e90610a3fd8627ab6c00d0dbb4d7b1e7be390.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6d/6df59989e5b4cffb481db6d4b1b6fb4a2c3b0632.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6f/6f42ba22fbb859b94c91bc4760af32f6e625a1a3.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6f/6fbbc7c9de80006bf0f88194c6211db2022da01c.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/6f/6fd93fe0abf6dd1a4b7bb59c455dc5e45bf1177d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/70/704570e63ba8700881972c83f12f19aadf024399.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/70/706076d3f9a9984a4dd4f4d182cd536c393f5951.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/71/71bcfe82bfd93079a18333dc4adbb2cf3139cfca.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/73/734289f15486021715663fe7740ddcb4adb20df5.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/75/7504b125ff93e113d79de5251625646809edcdb8.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/75/75f06127046a942516efbe93824c7d0b94a140ea.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/76/761ab705f6d3a820bc444b29417a849f34c27094.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/79/7982ca7584b64debd62e24119608f57115f8b1a3.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/7a/7aeefe09e6995f58893490b9a8fa14d223811163.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/7c/7c0be70de2e5904de94670ae5a81cde20749ee10.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/7c/7c38dd3e3dcc971a3abea044075d12fc8221a00f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/7c/7cab4221feb4298a31cc30d887b9ffdcd3b14bc5.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/7d/7dacbfc5700b9a88759eb4db080c0a48ad97981d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/7e/7ec7845bc1859bfb1fe08505caead65f73100f18.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/80/8063abf243f8de0895513927378bf1fadade28ee.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/82/825324f9905f830b536138a420657004c97671c7.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/84/8428051918a39c8538e81f8f589e675a257fde94.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/87/870153f9f0ab06d19d0f608d0e7404eaeb3be414.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/87/879103b38877d1c2c76ad8000624b214d1ba88f3.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/8a/8af8c62452f58635d172a185f8ed300969006268.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/8d/8d6c4896e1dd5caa2d619b6bd25aaf8bef9f0ace.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/8e/8e3218360e0ecdc1d6e3725ce3dc6115248e206c.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/92/9210e11d67f4a503fb23e65643402c969419b127.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/93/93d54026a4e11edd4664daf3d737f20c49609adc.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/94/94bb1e98e4a7d21aaaefd51687ab96a0653650da.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/95/959e04204ce8924faab63cfd2a7eb1c40dd3d5cf.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/96/96addf1a5f0e688ef0eb89ab3e17c02a2a96d0ea.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/98/98b82e58d35b2e713a56d690ac36c816b3f85b3d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/99/99f5b2de6b87f9f5a194b509e271a6c18611355f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/9b/9b35510462ae09429ab265a4742e05b763279737.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/9b/9b809c205449b32a9cfa7905560d6bb07e00e7ba.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/9c/9cbd1de29974d552b24527ee1f6179f13b078770.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/9d/9deaea0b57f06f5ea81ca28968c8e9ae73852d15.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/9f/9fed27e9204260f579d4a96e4e7652091e280041.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a2/a2112375907218629db8907edcd6ad5962265755.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a2/a222101192719e30e949835fc97d05e8df0083e1.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a4/a4cc4be68658e82f87863140bf26b3e4e074f969.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a5/a5c1fb911c9af07c167438778befee368102d165.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a5/a5fb42e8bc24200599053aba6de35c78efcf10ca.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a6/a6d372bad24102c06bb4276989a58929ad125b7f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a6/a6db69b8a45d6847b392afb1d386089347df37ca.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a7/a70ed8c2dafe6dd7e9da0ca04b3147094067ecae.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/a7/a76b3a1ad141e421abb8a2a36d4a0b488e7085fd.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/aa/aa79f6a18f42a39b9bf655d45dc5b96ea2f00998.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/aa/aaa53dca164c4bc9257af1afbac2119c8edc21ca.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ad/ad4b307a4d104d5e90a5380e8d33ad0e5e87dfb0.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ad/ad64ac236ea5c378677788ad0460b6656f729375.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/af/af4041036cbbaf47aeb5a7b3ccf46c11cdabd4db.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/af/afb8da2f5ee485cfd9c9960005c1e57227c6d4db.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/af/afcd849b37086754075e709580ba7f24c236a743.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b0/b002e59631fc243e714e737fda93402a0080bedc.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b0/b0c6954dce560a1b9ad374d7fb6ba7cac62f73c7.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b0/b0e0914420c16664c429175b6022ea5a84743dd1.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b2/b221801e4918a55457c7bec7e1a66a23bcffa841.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b2/b2af5b55e1df195530e169307e246afddcf44112.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b4/b425d25841c1a41fa470a7acd5c9292f6c7e7fa8.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b5/b55324bab1024d02fc928da029d0203185ea00f2.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b5/b55e1a42f49e0481f25bee93dd9766e5b91d78ac.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b6/b641d5a86b0301374a24a0f3c410513c96fbdb0b.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b7/b74bb59a28b099f20f32ebaed55075ca23a8ada9.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b9/b95f68d244b955e31e6f0f31582645cb23ddfa55.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/b9/b9eef2d9872964047d3be9ff897f2179600139b8.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/bc/bcf6ef1ab5953954dfa5ee2777c389f555d795a8.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/bd/bd634a35d2d174024f1adbca9c757da45af817dd.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/bd/bd878c35bf4c6c74770125708beb6d93805842a5.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/bd/bda68f64f7c88db391ee26007ebbf27335b1aa7b.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/be/be4dd2f8f6a5c6f6d148ec1a1cfbeda8f151bff1.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/be/beaed7f41d0a6793902d3308c92d16eb4a68309f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/be/bef74973dc231a9068c518e8d4c5f9ab6f8d7f2c.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/c2/c25e5e2e49df842a8782eec0de5e172a827b497f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/c3/c353ea2ab85acb49f7628c87cf19448566b4a7e3.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/c3/c3d5effbce0adecff352d63d2bde2a348b224471.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/c5/c55cabcad0da5da88486188344791e8f11d42bff.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/c7/c701999e149ffe314b5dd31e7abd93c540d6924c.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/c7/c79cb067079db84623ff9fe5cee96099bac29205.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/c8/c8174105c7052e18a6cf2400943e64e88f232a4a.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/c8/c89791424ef4db3315c748301c4d3517c3f41c44.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/cc/ccabbca28f8026363def1f5de16c45cc8608f5cc.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ce/ce793f046b352af5380681f2e8c1f89c7901cb61.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/d1/d116b8b1b8a915f8c8ee6726a03619ecccc7da1c.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/d1/d1b4052823c882b1992aafe8276ca92d43763709.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/d2/d2c8db54072f039878327e80b30cd260a8948220.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/d3/d33997e32750bcac967a36c093809b36c9effe30.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/d9/d9e7d959f17fc95c4a05a35fe749171e68b14fb9.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/dc/dc319bbecc2a46e734a26a5cc569dc191fa5d6e9.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/dd/dd3bded68fb576887e1ad37c279de3d1a4de48ee.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/de/de5d39ea7dbff587cb1add95800c676d30b35ef2.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/df/df85f2475d14e30dededb63f7b76a038afecb8c7.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e0/e0546936c95c249b1b49f4c8b7c4be1aad53eeb1.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e1/e12d6c5471fd0be8c145e2096c2cf374eac840c9.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e3/e3cbbf5dc50673b041013ba542dbb48e17c42aa1.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e4/e4964db51a2a13c52b9639b8dedbffa724447102.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e6/e6cab32193dea1a1949ee10fc59426fec4ecf319.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e7/e724c0d147f472135317b6ec9be159b501a3f58a.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e7/e761b0dc0d4d6913f9629c83af9b3881166eb052.svn-base rename Frameworks/libsidplay/sidplay-residfp-code/{libsidplayfp/src/c64/component.h => .svn/pristine/e8/e8d5fbe339ff1a1a71f1826d93c6613b443efb2a.svn-base} (69%) create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e9/e98ac88c78a83a03c70a6f674ed361127122bac2.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/eb/eb6e1bf360f08c7455a990dec7badb512cc1e9be.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ee/ee5ac16e27b44c8ffa8aedf4a623b92488fd924d.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f3/f33d72eb6f84db9898910aea2133fa46e14f16b3.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f4/f416344704491e69717fc88e1c7ca1a491570a72.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f6/f6e9d17965280c8a118a95443d0eddb78fc702dc.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f7/f70fff4c3b32d9f0037efa5a5499dd7810455bb0.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f8/f82fdd3ea4f9a314f381e98bbd7b32a15f95f7c6.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f8/f8c83aab72adf86d17231d59eb45085d5942f285.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f9/f9d85f12cc9f6f2a1002964766e77d4b6b0b2de6.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fa/fa5740dce5c3b67b311caade66cc50b3cedf3f31.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fb/fb0ba0b962563bf65f3419cadf2eebfc16daf398.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fb/fb5df060f5ad8ac33b09ed041a46d4d55c0940d2.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/fe3e548083fa1b0b03e664b87807a64aee73ed29.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/fe798081fc70f901c992ccf690b310d40bbfc4f6.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/feb1d4ec7ca9205ee333dd74cb187a10324a235f.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ff/ffb80bef01244cfd0d71d53bdb7f2972621f5b09.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ff/ffc6d6686bf5526cc2cf4b0ba309b7572bd4964b.svn-base create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/ax_lib_gcrypt.m4 create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/Event.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventCallback.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/COPYING create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/ChangeLog create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/Doxyfile.in create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/Makefile.am create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/README create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/configure.ac create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/docs/mainpage.dox create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/exSID.c create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/exSID.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/exSID_defs.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/exSID_ftdiwrap.c create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/exSID_ftdiwrap.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/libexsid.pc.in create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/exsid-builder.cpp create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/exsid-emu.cpp create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/exsid-emu.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/exsid.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/c64/CIA/SerialPort.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/c64/CIA/interrupt.h create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/sidplayfp/SidInfo.cpp create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/sidplayfp/SidTuneInfo.cpp delete mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/sidplayfp/event.h delete mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/sidtune/sidplayer.bin create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/sidtune/sidplayer1.bin create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/sidtune/sidplayer2.bin create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/utils/md5Factory.cpp create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/tests/TestMUS.cpp create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/tests/TestPSID.cpp create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/sidplayfp/m4/sid_cxx_compile_stdcxx_11.m4 create mode 100644 Frameworks/libsidplay/sidplay-residfp-code/sidplayfp/src/sidcxx11.h create mode 100644 Frameworks/midi_processing/midi_processing/es.lproj/InfoPlist.strings create mode 100644 Frameworks/modplay/modplay/es.lproj/InfoPlist.strings create mode 100644 Frameworks/mpg123/mpg123/es.lproj/InfoPlist.strings create mode 100644 Frameworks/playptmod/playptmod/es.lproj/InfoPlist.strings create mode 100644 Frameworks/psflib/psflib/es.lproj/InfoPlist.strings create mode 100644 Frameworks/vgmstream/vgmstream/es.lproj/InfoPlist.strings create mode 100644 Frameworks/vio2sf/vio2sf/es.lproj/InfoPlist.strings create mode 100644 Plugins/ArchiveSource/ArchiveSource/es.lproj/InfoPlist.strings create mode 100644 Plugins/BASSMODS/BASSMODS/es.lproj/InfoPlist.strings create mode 100644 Plugins/CueSheet/es.lproj/InfoPlist.strings create mode 100644 Plugins/Dumb/es.lproj/InfoPlist.strings create mode 100644 Plugins/GME/es.lproj/InfoPlist.strings create mode 100644 Plugins/HighlyComplete/HighlyComplete/es.lproj/InfoPlist.strings create mode 100644 Plugins/Hively/Hively/es.lproj/InfoPlist.strings create mode 100644 Plugins/M3u/es.lproj/InfoPlist.strings create mode 100644 Plugins/MIDI/MIDI/es.lproj/InfoPlist.strings create mode 100644 Plugins/Opus/Opus/es.lproj/InfoPlist.strings create mode 100644 Plugins/Pls/es.lproj/InfoPlist.strings create mode 100644 Plugins/modplay/modplay/es.lproj/InfoPlist.strings create mode 100644 Plugins/playptmod/playptmod/es.lproj/InfoPlist.strings create mode 100644 Plugins/vgmstream/vgmstream/es.lproj/InfoPlist.strings create mode 100644 Preferences/General/es.lproj/InfoPlist.strings create mode 100644 Preferences/General/es.lproj/Localizable.strings create mode 100644 Preferences/General/es.lproj/Preferences.xib create mode 100644 es.lproj/Credits.html create mode 100644 es.lproj/Feedback.xib create mode 100644 es.lproj/FileTree.xib create mode 100644 es.lproj/InfoInspector.xib create mode 100644 es.lproj/InfoPlist.strings create mode 100644 es.lproj/Localizable.strings create mode 100644 es.lproj/MainMenu.xib create mode 100644 es.lproj/OpenURLPanel.xib create mode 100644 es.lproj/SpotlightPanel.xib diff --git a/Application/AppController.m b/Application/AppController.m index e6d56e16b..98ec34bef 100644 --- a/Application/AppController.m +++ b/Application/AppController.m @@ -1,11 +1,12 @@ #import "AppController.h" +#import "FileTreeController.h" #import "FileTreeViewController.h" +#import "FileTreeOutlineView.h" #import "PlaybackController.h" #import "PlaylistController.h" #import "PlaylistView.h" #import "PlaylistEntry.h" #import -#import "AppleRemote.h" #import "PlaylistLoader.h" #import "OpenURLPanel.h" #import "SpotlightWindowController.h" @@ -23,16 +24,16 @@ + (void)initialize { // Register transformers - NSValueTransformer *stringToURLTransformer = [[[StringToURLTransformer alloc] init]autorelease]; + NSValueTransformer *stringToURLTransformer = [[StringToURLTransformer alloc] init]; [NSValueTransformer setValueTransformer:stringToURLTransformer forName:@"StringToURLTransformer"]; NSValueTransformer *fontSizetoLineHeightTransformer = - [[[FontSizetoLineHeightTransformer alloc] init]autorelease]; + [[FontSizetoLineHeightTransformer alloc] init]; [NSValueTransformer setValueTransformer:fontSizetoLineHeightTransformer forName:@"FontSizetoLineHeightTransformer"]; - NSValueTransformer *miniModeMenuTitleTransformer = [[[MiniModeMenuTitleTransformer alloc] init] autorelease]; + NSValueTransformer *miniModeMenuTitleTransformer = [[MiniModeMenuTitleTransformer alloc] init]; [NSValueTransformer setValueTransformer:miniModeMenuTitleTransformer forName:@"MiniModeMenuTitleTransformer"]; } @@ -45,133 +46,12 @@ { [self initDefaults]; - remote = [[AppleRemote alloc] init]; - [remote setDelegate: self]; - queue = [[NSOperationQueue alloc]init]; } return self; } -- (void)dealloc -{ - [queue release]; - [expandedNodes release]; - [super dealloc]; -} - -// Listen to the remote in exclusive mode, only when Cog is the active application -- (void)applicationDidBecomeActive:(NSNotification *)notification -{ - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"remoteEnabled"] && [[NSUserDefaults standardUserDefaults] boolForKey:@"remoteOnlyOnActive"]) { - [remote startListening: self]; - } -} -- (void)applicationDidResignActive:(NSNotification *)notification -{ - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"remoteEnabled"] && [[NSUserDefaults standardUserDefaults] boolForKey:@"remoteOnlyOnActive"]) { - [remote stopListening: self]; - } -} - -/* Helper method for the remote control interface in order to trigger forward/backward and volume -increase/decrease as long as the user holds the left/right, plus/minus button */ -- (void) executeHoldActionForRemoteButton: (NSNumber*) buttonIdentifierNumber -{ - static int incrementalSearch = 1; - - if (remoteButtonHeld) - { - switch([buttonIdentifierNumber intValue]) - { - case kRemoteButtonRight_Hold: - [playbackController seekForward:incrementalSearch]; - break; - case kRemoteButtonLeft_Hold: - [playbackController seekBackward:incrementalSearch]; - break; - case kRemoteButtonVolume_Plus_Hold: - //Volume Up - [playbackController volumeUp:self]; - break; - case kRemoteButtonVolume_Minus_Hold: - //Volume Down - [playbackController volumeDown:self]; - break; - } - if (remoteButtonHeld) - { - /* there should perhaps be a max amount that incrementalSearch can - be, so as to not start skipping ahead unreasonable amounts, even - in very long files. */ - if ((incrementalSearch % 3) == 0) - incrementalSearch += incrementalSearch/3; - else - incrementalSearch++; - - /* trigger event */ - [self performSelector:@selector(executeHoldActionForRemoteButton:) - withObject:buttonIdentifierNumber - afterDelay:0.25]; - } - } - else - // if we're not holding the search button, reset the incremental search - // variable, making it ready for another search - incrementalSearch = 1; -} - -/* Apple Remote callback */ -- (void) appleRemoteButton: (AppleRemoteEventIdentifier)buttonIdentifier - pressedDown: (BOOL) pressedDown - clickCount: (unsigned int) count -{ - switch( buttonIdentifier ) - { - case k2009RemoteButtonPlay: - case kRemoteButtonPlay: - [self clickPlay]; - - break; - case kRemoteButtonVolume_Plus: - [playbackController volumeUp:self]; - break; - case kRemoteButtonVolume_Minus: - [playbackController volumeDown:self]; - break; - case kRemoteButtonRight: - [self clickNext]; - break; - case kRemoteButtonLeft: - [self clickPrev]; - break; - case kRemoteButtonRight_Hold: - case kRemoteButtonLeft_Hold: - case kRemoteButtonVolume_Plus_Hold: - case kRemoteButtonVolume_Minus_Hold: - /* simulate an event as long as the user holds the button */ - remoteButtonHeld = pressedDown; - if( pressedDown ) - { - NSNumber* buttonIdentifierNumber = [NSNumber numberWithInt: buttonIdentifier]; - [self performSelector:@selector(executeHoldActionForRemoteButton:) - withObject:buttonIdentifierNumber]; - } - break; - case kRemoteButtonMenu: - break; - case k2009RemoteButtonFullscreen: - [mainWindow toggleFullScreen:nil]; - break; - default: - /* Add here whatever you want other buttons to do */ - break; - } -} - - - - (IBAction)openFiles:(id)sender { NSOpenPanel *p; @@ -256,12 +136,7 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ [self registerHotKeys]; - [spotlightWindowController init]; - - //Init Remote - if ([[NSUserDefaults standardUserDefaults] boolForKey:@"remoteEnabled"] && ![[NSUserDefaults standardUserDefaults] boolForKey:@"remoteOnlyOnActive"]) { - [remote startListening:self]; - } + (void) [spotlightWindowController init]; [[playlistController undoManager] disableUndoRegistration]; NSString *basePath = [@"~/Library/Application Support/Cog/" stringByExpandingTildeInPath]; @@ -479,9 +354,6 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ [userDefaultsValuesDict setObject:[NSNumber numberWithInt:8] forKey:@"hotKeySpamKeyCode"]; [userDefaultsValuesDict setObject:[NSNumber numberWithInt:(NSControlKeyMask|NSCommandKeyMask)] forKey:@"hotKeySpamModifiers"]; - [userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"remoteEnabled"]; - [userDefaultsValuesDict setObject:[NSNumber numberWithBool:YES] forKey:@"remoteOnlyOnActive"]; - NSString * feedURLdefault = @"https://www.kode54.net/cog/mercury.xml"; NSString * feedURLbroken = @"https://kode54.net/cog/stable.xml"; NSString * feedURLbroken2 = @"https://kode54.net/cog/mercury.xml"; @@ -518,9 +390,6 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.hotKeyNextKeyCode" options:0 context:nil]; [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.hotKeySpamKeyCode" options:0 context:nil]; - - [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.remoteEnabled" options:0 context:nil]; - [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.remoteOnlyOnActive" options:0 context:nil]; } - (void) observeValueForKeyPath:(NSString *)keyPath @@ -540,25 +409,10 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ else if ([keyPath isEqualToString:@"values.hotKeySpamKeyCode"]) { [self registerHotKeys]; } - else if ([keyPath isEqualToString:@"values.remoteEnabled"] || [keyPath isEqualToString:@"values.remoteOnlyOnActive"]) { - if([[NSUserDefaults standardUserDefaults] boolForKey:@"remoteEnabled"]) { - BOOL onlyOnActive = [[NSUserDefaults standardUserDefaults] boolForKey:@"remoteOnlyOnActive"]; - if (!onlyOnActive || [NSApp isActive]) { - [remote startListening: self]; - } - if (onlyOnActive && ![NSApp isActive]) { //Setting a preference without being active? *shrugs* - [remote stopListening: self]; - } - } - else { - [remote stopListening: self]; - } - } } - (void)registerHotKeys { - [playHotKey release]; if ([[[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"hotKeyPlayKeyCode"] intValue]) { playHotKey = [[NDHotKeyEvent alloc] initWithKeyCode: [[[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"hotKeyPlayKeyCode"] intValue] @@ -568,7 +422,6 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ [playHotKey setEnabled:YES]; } - [prevHotKey release]; if ([[[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"hotKeyPreviousKeyCode"] intValue]) { prevHotKey = [[NDHotKeyEvent alloc] initWithKeyCode: [[NSUserDefaults standardUserDefaults] integerForKey:@"hotKeyPreviousKeyCode"] @@ -578,7 +431,6 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ [prevHotKey setEnabled:YES]; } - [nextHotKey release]; if ([[[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"hotKeyNextKeyCode"] intValue]) { nextHotKey = [[NDHotKeyEvent alloc] initWithKeyCode: [[NSUserDefaults standardUserDefaults] integerForKey:@"hotKeyNextKeyCode"] @@ -588,7 +440,6 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ [nextHotKey setEnabled:YES]; } - [spamHotKey release]; if ([[[[NSUserDefaultsController sharedUserDefaultsController] defaults] objectForKey:@"hotKeySpamKeyCode"] intValue]) { spamHotKey = [[NDHotKeyEvent alloc] initWithKeyCode: [[NSUserDefaults standardUserDefaults] integerForKey:@"hotKeySpamKeyCode"] @@ -605,7 +456,6 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ if (nil == nowPlaying) { nowPlaying = [[NowPlayingBarController alloc] init]; - [nowPlaying retain]; NSView *contentView = [mainWindow contentView]; NSRect contentRect = [contentView frame]; @@ -638,7 +488,6 @@ increase/decrease as long as the user holds the left/right, plus/minus button */ // [mainView setFrameOrigin:NSMakePoint(0.0, 0.0)]; [[nowPlaying view] removeFromSuperview]; - [nowPlaying release]; nowPlaying = nil; } } diff --git a/Application/DockIconController.m b/Application/DockIconController.m index 6cebc3861..0b273eccb 100644 --- a/Application/DockIconController.m +++ b/Application/DockIconController.m @@ -8,6 +8,7 @@ #import "DockIconController.h" #import +#import "PlaybackController.h" @implementation DockIconController @@ -15,8 +16,8 @@ static NSString *DockIconPlaybackStatusObservationContext = @"DockIconPlaybackSt - (void)startObserving { - [playbackController addObserver:self forKeyPath:@"playbackStatus" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial) context:DockIconPlaybackStatusObservationContext]; - [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.colorfulDockIcons" options:0 context:DockIconPlaybackStatusObservationContext]; + [playbackController addObserver:self forKeyPath:@"playbackStatus" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial) context:(__bridge void * _Nullable)(DockIconPlaybackStatusObservationContext)]; + [[NSUserDefaultsController sharedUserDefaultsController] addObserver:self forKeyPath:@"values.colorfulDockIcons" options:0 context:(__bridge void * _Nullable)(DockIconPlaybackStatusObservationContext)]; } - (void)stopObserving @@ -69,12 +70,11 @@ static NSString *getBadgeName(NSString *baseName, BOOL colorfulIcons) [newDockImage unlockFocus]; [NSApp setApplicationIconImage:newDockImage]; - [newDockImage release]; } - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if ([DockIconPlaybackStatusObservationContext isEqual:context]) + if ([DockIconPlaybackStatusObservationContext isEqual:(__bridge id)(context)]) { if ([keyPath isEqualToString:@"playbackStatus"]) { @@ -102,9 +102,6 @@ static NSString *getBadgeName(NSString *baseName, BOOL colorfulIcons) - (void)dealloc { [self stopObserving]; - [dockImage release]; - - [super dealloc]; } @end diff --git a/Application/PlaybackEventController.m b/Application/PlaybackEventController.m index 5b2ddf259..e12a09546 100644 --- a/Application/PlaybackEventController.m +++ b/Application/PlaybackEventController.m @@ -66,15 +66,6 @@ typedef enum return self; } -- (void)dealloc -{ - [queue release]; - - [entry release]; - - [super dealloc]; -} - - (NSDictionary *)fillNotificationDictionary:(PlaylistEntry *)pe status:(TrackStatus)status { NSMutableDictionary *dict = [NSMutableDictionary dictionary]; @@ -105,8 +96,7 @@ typedef enum - (void)performPlaybackDidBeginActions:(PlaylistEntry *)pe { if (NO == [pe error]) { - [entry release]; - entry = [pe retain]; + entry = pe; [[NSDistributedNotificationCenter defaultCenter] postNotificationName:TrackNotification object:nil userInfo:[self fillNotificationDictionary:pe status:TrackPlaying] deliverImmediately:YES]; @@ -180,7 +170,6 @@ typedef enum - (void)performPlaybackDidStopActions { [[NSDistributedNotificationCenter defaultCenter] postNotificationName:TrackNotification object:nil userInfo:[self fillNotificationDictionary:entry status:TrackStopped] deliverImmediately:YES]; - [entry release]; entry = nil; if([[NSUserDefaults standardUserDefaults] boolForKey:@"enableAudioScrobbler"]) { [scrobbler stop]; @@ -220,28 +209,24 @@ typedef enum { NSOperation *op = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(performPlaybackDidBeginActions:) object:[notification object]]; [queue addOperation:op]; - [op release]; } - (void)playbackDidPause:(NSNotification *)notification { NSOperation *op = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(performPlaybackDidPauseActions) object:nil]; [queue addOperation:op]; - [op release]; } - (void)playbackDidResume:(NSNotification *)notification { NSOperation *op = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(performPlaybackDidResumeActions) object:nil]; [queue addOperation:op]; - [op release]; } - (void)playbackDidStop:(NSNotification *)notification { NSOperation *op = [[NSInvocationOperation alloc] initWithTarget:self selector:@selector(performPlaybackDidStopActions) object:nil]; [queue addOperation:op]; - [op release]; } - (NSDictionary *) registrationDictionaryForGrowl diff --git a/Audio/AudioMetadataWriter.h b/Audio/AudioMetadataWriter.h index 42e029462..f833ff5ea 100644 --- a/Audio/AudioMetadataWriter.h +++ b/Audio/AudioMetadataWriter.h @@ -13,6 +13,6 @@ } -+ (NSDictionary *)putMetadataInURL:(NSURL *)url; ++ (int)putMetadataInURL:(NSURL *)url; @end diff --git a/Audio/AudioMetadataWriter.m b/Audio/AudioMetadataWriter.m index eba70bae3..7afb2b494 100644 --- a/Audio/AudioMetadataWriter.m +++ b/Audio/AudioMetadataWriter.m @@ -10,7 +10,7 @@ #import "PluginController.h" @implementation AudioMetadataWriter -+ (NSDictionary *)putMetadataInURL:(NSURL *)url ++ (int)putMetadataInURL:(NSURL *)url { return [[PluginController sharedPluginController] putMetadataInURL:url]; } diff --git a/Audio/AudioPlayer.m b/Audio/AudioPlayer.m index 9220f34c1..f2152004a 100644 --- a/Audio/AudioPlayer.m +++ b/Audio/AudioPlayer.m @@ -24,7 +24,7 @@ if (self) { output = NULL; - bufferChain = NULL; + bufferChain = nil; outputLaunched = NO; endOfInputReached = NO; @@ -55,10 +55,6 @@ - (void)play:(NSURL *)url withUserInfo:(id)userInfo withRGInfo:(NSDictionary *)rgi startPaused:(BOOL)paused { - if (output) - { - [output release]; - } output = [[OutputNode alloc] initWithController:self previous:nil]; [output setup]; [output setVolume: volume]; @@ -73,7 +69,7 @@ { [bufferChain setShouldContinue:NO]; - [bufferChain release]; + bufferChain = nil; } } @@ -82,7 +78,6 @@ while (![bufferChain open:url withOutputFormat:[output format] withRGInfo:rgi]) { - [bufferChain release]; bufferChain = nil; [self requestNextStream: userInfo]; @@ -173,16 +168,10 @@ - (void)setNextStream:(NSURL *)url withUserInfo:(id)userInfo withRGInfo:(NSDictionary *)rgi { - [url retain]; - [nextStream release]; nextStream = url; - [userInfo retain]; - [nextStreamUserInfo release]; nextStreamUserInfo = userInfo; - [rgi retain]; - [nextStreamRGInfo release]; nextStreamRGInfo = rgi; } @@ -261,10 +250,8 @@ BufferChain *newChain = nil; nextStreamUserInfo = [sender userInfo]; - [nextStreamUserInfo retain]; //Retained because when setNextStream is called, it will be released!!! nextStreamRGInfo = [sender rgInfo]; - [nextStreamRGInfo retain]; [self requestNextStream: nextStreamUserInfo]; @@ -293,29 +280,31 @@ [self addChainToQueue:newChain]; DLog(@"TRACK SET!!! %@", newChain); //Keep on-playin - [newChain release]; + newChain = nil; return NO; } } + + lastChain = nil; while (![newChain open:nextStream withOutputFormat:[output format] withRGInfo:nextStreamRGInfo]) { if (nextStream == nil) { - [newChain release]; + newChain = nil; return YES; } - [newChain release]; + newChain = nil; [self requestNextStream: nextStreamUserInfo]; newChain = [[BufferChain alloc] initWithController:self]; } [self addChainToQueue:newChain]; - - [newChain release]; + + newChain = nil; // I'm stupid and can't hold too much stuff in my head all at once, so writing it here. // @@ -347,17 +336,13 @@ //End of playlist [self stop]; - [bufferChain release]; bufferChain = nil; return; } - - BufferChain *oldChain = bufferChain; + bufferChain = nil; bufferChain = [chainQueue objectAtIndex:0]; - [oldChain release]; - [bufferChain retain]; [chainQueue removeObjectAtIndex:0]; DLog(@"New!!! %@ %@", bufferChain, [[bufferChain inputNode] decoder]); @@ -370,30 +355,29 @@ - (void)sendDelegateMethod:(SEL)selector withObject:(id)obj waitUntilDone:(BOOL)wait { NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[delegate methodSignatureForSelector:selector]]; + [invocation setTarget:delegate]; [invocation setSelector:selector]; - [invocation setArgument:&self atIndex:2]; //Indexes start at 2, the first being self, the second being command. + [invocation setArgument:&self atIndex:2]; [invocation setArgument:&obj atIndex:3]; + [invocation retainArguments]; - [self performSelectorOnMainThread:@selector(sendDelegateMethodMainThread:) withObject:invocation waitUntilDone:wait]; + [invocation performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:wait]; } - (void)sendDelegateMethod:(SEL)selector withObject:(id)obj withObject:(id)obj2 waitUntilDone:(BOOL)wait { NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:[delegate methodSignatureForSelector:selector]]; - [invocation setSelector:selector]; - [invocation setArgument:&self atIndex:2]; //Indexes start at 2, the first being self, the second being command. + [invocation setTarget:delegate]; + [invocation setSelector:selector]; + [invocation setArgument:&self atIndex:2]; [invocation setArgument:&obj atIndex:3]; [invocation setArgument:&obj2 atIndex:4]; + [invocation retainArguments]; - [self performSelectorOnMainThread:@selector(sendDelegateMethodMainThread:) withObject:invocation waitUntilDone:wait]; + [invocation performSelectorOnMainThread:@selector(invoke) withObject:nil waitUntilDone:wait]; } -- (void)sendDelegateMethodMainThread:(id)invocation -{ - [invocation invokeWithTarget:delegate]; -} - - (void)setPlaybackStatus:(int)status waitUntilDone:(BOOL)wait { [self sendDelegateMethod:@selector(audioPlayer:didChangeStatus:userInfo:) withObject:[NSNumber numberWithInt:status] withObject:[bufferChain userInfo] waitUntilDone:wait]; diff --git a/Audio/Chain/BufferChain.m b/Audio/Chain/BufferChain.m index 07e78cdd0..b0dba6de0 100644 --- a/Audio/Chain/BufferChain.m +++ b/Audio/Chain/BufferChain.m @@ -34,9 +34,9 @@ - (void)buildChain { - [inputNode release]; - [converterNode release]; - + inputNode = nil; + converterNode = nil; + inputNode = [[InputNode alloc] initWithController:self previous:nil]; converterNode = [[ConverterNode alloc] initWithController:self previous:inputNode]; @@ -100,8 +100,6 @@ - (void)setUserInfo:(id)i { - [i retain]; - [userInfo release]; userInfo = i; } @@ -112,8 +110,6 @@ - (void)setRGInfo:(NSDictionary *)rgi { - [rgi retain]; - [rgInfo release]; rgInfo = rgi; [converterNode setRGInfo:rgi]; } @@ -130,16 +126,7 @@ [[inputNode semaphore] signal]; [[inputNode exitAtTheEndOfTheStream] wait]; // wait for decoder to be closed (see InputNode's -(void)process ) - [rgInfo release]; - [userInfo release]; - [streamURL release]; - - [inputNode release]; - [converterNode release]; - DLog(@"Bufferchain dealloc"); - - [super dealloc]; } - (void)seek:(double)time @@ -188,9 +175,6 @@ - (void)setStreamURL:(NSURL *)url { - [url retain]; - [streamURL release]; - streamURL = url; } diff --git a/Audio/Chain/ConverterNode.m b/Audio/Chain/ConverterNode.m index e6fadff10..8a4849adc 100644 --- a/Audio/Chain/ConverterNode.m +++ b/Audio/Chain/ConverterNode.m @@ -109,7 +109,7 @@ static OSStatus ACInputProc(AudioConverterRef inAudioConverter, AudioStreamPacketDescription** outDataPacketDescription, void* inUserData) { - ConverterNode *converter = (ConverterNode *)inUserData; + ConverterNode *converter = (__bridge ConverterNode *)inUserData; OSStatus err = noErr; int amountToWrite; int amountRead; @@ -149,7 +149,7 @@ static OSStatus ACFloatProc(AudioConverterRef inAudioConverter, AudioStreamPacketDescription** outDataPacketDescription, void* inUserData) { - ConverterNode *converter = (ConverterNode *)inUserData; + ConverterNode *converter = (__bridge ConverterNode *)inUserData; OSStatus err = noErr; int amountToWrite; @@ -204,7 +204,7 @@ static OSStatus ACFloatProc(AudioConverterRef inAudioConverter, ioData.mNumberBuffers = 1; tryagain: - err = AudioConverterFillComplexBuffer(converterFloat, ACInputProc, self, &ioNumberFrames, &ioData, NULL); + err = AudioConverterFillComplexBuffer(converterFloat, ACInputProc, (__bridge void * _Nullable)(self), &ioNumberFrames, &ioData, NULL); amountRead += ioData.mBuffers[0].mDataByteSize; if (err == 100) { @@ -239,7 +239,7 @@ static OSStatus ACFloatProc(AudioConverterRef inAudioConverter, amountRead = 0; tryagain2: - err = AudioConverterFillComplexBuffer(converter, ACFloatProc, self, &ioNumberFrames, &ioData, NULL); + err = AudioConverterFillComplexBuffer(converter, ACFloatProc, (__bridge void *)(self), &ioNumberFrames, &ioData, NULL); amountRead += ioData.mBuffers[0].mDataByteSize; if (err == 100) { @@ -387,7 +387,6 @@ static float db_to_scale(float db) [[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self forKeyPath:@"values.volumeScaling"]; [self cleanUp]; - [super dealloc]; } @@ -407,15 +406,12 @@ static float db_to_scale(float db) - (void)setRGInfo:(NSDictionary *)rgi { DLog(@"Setting ReplayGain info"); - [rgInfo release]; - [rgi retain]; rgInfo = rgi; [self refreshVolumeScaling]; } - (void)cleanUp { - [rgInfo release]; rgInfo = nil; if (converterFloat) { diff --git a/Audio/Chain/InputNode.m b/Audio/Chain/InputNode.m index 02c7cf5aa..3381a7437 100644 --- a/Audio/Chain/InputNode.m +++ b/Audio/Chain/InputNode.m @@ -33,7 +33,6 @@ - (BOOL)openWithSource:(id)source { decoder = [AudioDecoder audioDecoderForSource:source]; - [decoder retain]; if (decoder == nil) return NO; @@ -62,7 +61,6 @@ { DLog(@"Opening with old decoder: %@", d); decoder = d; - [decoder retain]; NSDictionary *properties = [decoder properties]; int bitsPerSample = [[properties objectForKey:@"bitsPerSample"] intValue]; @@ -218,11 +216,6 @@ DLog(@"Input Node dealloc"); [decoder removeObserver:self forKeyPath:@"properties"]; [decoder removeObserver:self forKeyPath:@"metadata"]; - - [decoder release]; - - [exitAtTheEndOfTheStream release]; - [super dealloc]; } - (NSDictionary *) properties diff --git a/Audio/Chain/Node.h b/Audio/Chain/Node.h index baf56c04a..0329fe89a 100644 --- a/Audio/Chain/Node.h +++ b/Audio/Chain/Node.h @@ -19,8 +19,8 @@ NSLock *readLock; NSLock *writeLock; - id previousNode; - id controller; + id __weak previousNode; + id __weak controller; BOOL shouldReset; diff --git a/Audio/Chain/Node.m b/Audio/Chain/Node.m index bf5562e0c..6474b5fb8 100644 --- a/Audio/Chain/Node.m +++ b/Audio/Chain/Node.m @@ -85,15 +85,9 @@ - (void)threadEntry:(id)arg { - [self retain]; - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - - [self process]; - - [pool release]; - - [self release]; + @autoreleasepool { + [self process]; + } } - (int)readData:(void *)ptr amount:(int)amount @@ -158,8 +152,6 @@ - (void)setPreviousNode:(id)p { - [p retain]; - [previousNode release]; previousNode = p; } @@ -228,16 +220,4 @@ } -- (void)dealloc -{ - [previousNode release]; - - [buffer release]; - [semaphore release]; - [readLock release]; - [writeLock release]; - - [super dealloc]; -} - @end diff --git a/Audio/Chain/OutputNode.m b/Audio/Chain/OutputNode.m index c7972c3d8..61552b20f 100644 --- a/Audio/Chain/OutputNode.m +++ b/Audio/Chain/OutputNode.m @@ -53,27 +53,26 @@ - (int)readData:(void *)ptr amount:(int)amount { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - - int n; - [self setPreviousNode:[[controller bufferChain] finalNode]]; + @autoreleasepool { + int n; + [self setPreviousNode:[[controller bufferChain] finalNode]]; - n = [super readData:ptr amount:amount]; - amountPlayed += n; + n = [super readData:ptr amount:amount]; + amountPlayed += n; - if (endOfStream == YES) - { - amountPlayed = 0; - [controller endOfInputPlayed]; //Updates shouldContinue appropriately? - } + if (endOfStream == YES) + { + amountPlayed = 0; + [controller endOfInputPlayed]; //Updates shouldContinue appropriately? + } /* if (n == 0) { DLog(@"Output Buffer dry!"); } */ - [pool release]; - return n; + return n; + } } @@ -97,13 +96,6 @@ [output stop]; } -- (void)dealloc -{ - [output release]; - - [super dealloc]; -} - - (void)setVolume:(double) v { [output setVolume:v]; diff --git a/Audio/CogAudio.xcodeproj/project.pbxproj b/Audio/CogAudio.xcodeproj/project.pbxproj index a5d40733b..a794baf2a 100644 --- a/Audio/CogAudio.xcodeproj/project.pbxproj +++ b/Audio/CogAudio.xcodeproj/project.pbxproj @@ -362,7 +362,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; TargetAttributes = { 8DC2EF4F0486A6940098B216 = { DevelopmentTeam = N6E749HJ2X; @@ -445,6 +445,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.cogaudio; PRODUCT_NAME = CogAudio; PROVISIONING_PROFILE = ""; SDKROOT = macosx; @@ -470,6 +471,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@executable_path/../Frameworks"; OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.cogaudio; PRODUCT_NAME = CogAudio; PROVISIONING_PROFILE = ""; SDKROOT = macosx; @@ -482,6 +484,8 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; + ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -496,6 +500,7 @@ 1DEB91B308733DA50010E9CD /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; CODE_SIGN_IDENTITY = "Developer ID Application"; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_WARN_ABOUT_RETURN_TYPE = YES; diff --git a/Audio/CogPluginMulti.m b/Audio/CogPluginMulti.m index 743a5e511..3afab0d9c 100644 --- a/Audio/CogPluginMulti.m +++ b/Audio/CogPluginMulti.m @@ -59,12 +59,6 @@ NSArray * sortClassesByPriority(NSArray * theClasses) return self; } -- (void)dealloc -{ - [cachedObservers release]; - [super dealloc]; -} - - (NSDictionary *)properties { if ( theDecoder != nil ) return [theDecoder properties]; @@ -84,14 +78,13 @@ NSArray * sortClassesByPriority(NSArray * theClasses) Class decoder = NSClassFromString(classString); theDecoder = [[decoder alloc] init]; for (NSDictionary *obsItem in cachedObservers) { - [theDecoder addObserver:[obsItem objectForKey:@"observer"] forKeyPath:[obsItem objectForKey:@"keyPath"] options:[obsItem objectForKey:@"options"] context:[obsItem objectForKey:@"context"]]; + [theDecoder addObserver:[obsItem objectForKey:@"observer"] forKeyPath:[obsItem objectForKey:@"keyPath"] options:[obsItem objectForKey:@"options"] context:(__bridge void *)([obsItem objectForKey:@"context"])]; } if ([theDecoder open:source]) return YES; for (NSDictionary *obsItem in cachedObservers) { [theDecoder removeObserver:[obsItem objectForKey:@"observer"] forKeyPath:[obsItem objectForKey:@"keyPath"]]; } - [theDecoder release]; [source seek:0 whence:SEEK_SET]; } theDecoder = nil; @@ -111,7 +104,6 @@ NSArray * sortClassesByPriority(NSArray * theClasses) for (NSDictionary *obsItem in cachedObservers) { [theDecoder removeObserver:[obsItem objectForKey:@"observer"] forKeyPath:[obsItem objectForKey:@"keyPath"]]; } - [theDecoder release]; theDecoder = nil; } } diff --git a/Audio/Info.plist b/Audio/Info.plist index f85b6adad..5c18bd9f9 100644 --- a/Audio/Info.plist +++ b/Audio/Info.plist @@ -6,14 +6,14 @@ English CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} CFBundleIconFile CFBundleIdentifier - org.cogx.cogaudio + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleSignature diff --git a/Audio/Output/OutputCoreAudio.m b/Audio/Output/OutputCoreAudio.m index 4a04b354a..7156026f2 100644 --- a/Audio/Output/OutputCoreAudio.m +++ b/Audio/Output/OutputCoreAudio.m @@ -1,4 +1,4 @@ -// + // // OutputCoreAudio.m // Cog // @@ -29,7 +29,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioActionFlags, const AudioTimeStamp *inTimeStamp, UInt32 inBusNumber, UInt32 inNumberFrames, AudioBufferList *ioData) { - OutputCoreAudio *output = (OutputCoreAudio *)inRefCon; + OutputCoreAudio *output = (__bridge OutputCoreAudio *)inRefCon; OSStatus err = noErr; void *readPointer = ioData->mBuffers[0].mData; @@ -286,7 +286,7 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc //setup render callbacks renderCallback.inputProc = Sound_Renderer; - renderCallback.inputProcRefCon = self; + renderCallback.inputProcRefCon = (__bridge void * _Nullable)(self); AudioUnitSetProperty(outputUnit, kAudioUnitProperty_SetRenderCallback, kAudioUnitScope_Input, 0, &renderCallback, sizeof(AURenderCallbackStruct)); @@ -326,8 +326,6 @@ static OSStatus Sound_Renderer(void *inRefCon, AudioUnitRenderActionFlags *ioAc [self stop]; [[NSUserDefaultsController sharedUserDefaultsController] removeObserver:self forKeyPath:@"values.outputDevice"]; - - [super dealloc]; } - (void)pause diff --git a/Audio/PluginController.m b/Audio/PluginController.m index 45d4df13f..e06fc6fdb 100644 --- a/Audio/PluginController.m +++ b/Audio/PluginController.m @@ -35,16 +35,16 @@ static PluginController *sharedPluginController = nil; - (id)init { self = [super init]; if (self) { - self.sources = [[[NSMutableDictionary alloc] init] autorelease]; - self.containers = [[[NSMutableDictionary alloc] init] autorelease]; + self.sources = [[NSMutableDictionary alloc] init]; + self.containers = [[NSMutableDictionary alloc] init]; - self.metadataReaders = [[[NSMutableDictionary alloc] init] autorelease]; + self.metadataReaders = [[NSMutableDictionary alloc] init]; - self.propertiesReadersByExtension = [[[NSMutableDictionary alloc] init] autorelease]; - self.propertiesReadersByMimeType = [[[NSMutableDictionary alloc] init] autorelease]; + self.propertiesReadersByExtension = [[NSMutableDictionary alloc] init]; + self.propertiesReadersByMimeType = [[NSMutableDictionary alloc] init]; - self.decodersByExtension = [[[NSMutableDictionary alloc] init] autorelease]; - self.decodersByMimeType = [[[NSMutableDictionary alloc] init] autorelease]; + self.decodersByExtension = [[NSMutableDictionary alloc] init]; + self.decodersByMimeType = [[NSMutableDictionary alloc] init]; [self setup]; } @@ -123,7 +123,7 @@ static PluginController *sharedPluginController = nil; NSMutableArray *containerSet; if (![containers objectForKey:ext]) { - containerSet = [[[NSMutableArray alloc] init] autorelease]; + containerSet = [[NSMutableArray alloc] init]; [containers setObject:containerSet forKey:ext]; } else @@ -143,7 +143,7 @@ static PluginController *sharedPluginController = nil; NSMutableArray *decoders; if (![decodersByExtension objectForKey:ext]) { - decoders = [[[NSMutableArray alloc] init] autorelease]; + decoders = [[NSMutableArray alloc] init]; [decodersByExtension setObject:decoders forKey:ext]; } else @@ -170,7 +170,7 @@ static PluginController *sharedPluginController = nil; NSMutableArray *readers; if (![metadataReaders objectForKey:ext]) { - readers = [[[NSMutableArray alloc] init] autorelease]; + readers = [[NSMutableArray alloc] init]; [metadataReaders setObject:readers forKey:ext]; } else @@ -190,7 +190,7 @@ static PluginController *sharedPluginController = nil; NSMutableArray *readers; if (![propertiesReadersByExtension objectForKey:ext]) { - readers = [[[NSMutableArray alloc] init] autorelease]; + readers = [[NSMutableArray alloc] init]; [propertiesReadersByExtension setObject:readers forKey:ext]; } else @@ -237,7 +237,7 @@ static PluginController *sharedPluginController = nil; Class source = NSClassFromString([sources objectForKey:scheme]); - return [[[source alloc] init] autorelease]; + return [[source alloc] init]; } - (NSArray *) urlsForContainerURL:(NSURL *)url @@ -270,7 +270,7 @@ static PluginController *sharedPluginController = nil; NSString *classString; if (decoders) { if ( [decoders count] > 1 ) { - return [[[CogDecoderMulti alloc] initWithDecoders:decoders] autorelease]; + return [[CogDecoderMulti alloc] initWithDecoders:decoders]; } else { classString = [decoders objectAtIndex:0]; @@ -282,7 +282,7 @@ static PluginController *sharedPluginController = nil; Class decoder = NSClassFromString(classString); - return [[[decoder alloc] init] autorelease]; + return [[decoder alloc] init]; } - (NSDictionary *)metadataForURL:(NSURL *)url diff --git a/Audio/ThirdParty/VirtualRingBuffer/VirtualRingBuffer.m b/Audio/ThirdParty/VirtualRingBuffer/VirtualRingBuffer.m index cdfeb4105..b7452d7c0 100644 --- a/Audio/ThirdParty/VirtualRingBuffer/VirtualRingBuffer.m +++ b/Audio/ThirdParty/VirtualRingBuffer/VirtualRingBuffer.m @@ -40,8 +40,8 @@ static void deallocateVirtualBuffer(void *buffer, UInt32 bufferLength); if (buffer) { bufferEnd = buffer + bufferLength; } else { - [self release]; - return nil; + self = nil; + return nil; } readPointer = NULL; @@ -54,8 +54,6 @@ static void deallocateVirtualBuffer(void *buffer, UInt32 bufferLength); { if (buffer) deallocateVirtualBuffer(buffer, bufferLength); - - [super dealloc]; } - (void)empty diff --git a/AudioScrobbler/AudioScrobbler.m b/AudioScrobbler/AudioScrobbler.m index 49e3ffeda..599ab22b5 100644 --- a/AudioScrobbler/AudioScrobbler.m +++ b/AudioScrobbler/AudioScrobbler.m @@ -43,7 +43,7 @@ escapeForLastFM(NSString *string) options:NSLiteralSearch range:NSMakeRange(0, [result length])]; - return (nil == result ? @"" : [result autorelease]); + return (nil == result ? @"" : result); } @interface AudioScrobbler (Private) @@ -101,7 +101,7 @@ escapeForLastFM(NSString *string) if(KERN_SUCCESS != result) { ALog(@"Couldn't create semaphore (%s).", mach_error_type(result)); - [self release]; + self = nil; return nil; } @@ -115,11 +115,9 @@ escapeForLastFM(NSString *string) if([self keepProcessingAudioScrobblerCommands] || NO == [self audioScrobblerThreadCompleted]) [self shutdown]; - [_queue release], _queue = nil; + _queue = nil; semaphore_destroy(mach_task_self(), _semaphore), _semaphore = 0; - - [super dealloc]; } - (void) start:(PlaylistEntry *)pe @@ -212,76 +210,71 @@ escapeForLastFM(NSString *string) - (void) processAudioScrobblerCommands:(id)unused { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - AudioScrobblerClient *client = [[AudioScrobblerClient alloc] init]; - mach_timespec_t timeout = { 5, 0 }; - NSString *command = nil; - NSString *response = nil; - in_port_t port = 33367; + @autoreleasepool { + AudioScrobblerClient *client = [[AudioScrobblerClient alloc] init]; + mach_timespec_t timeout = { 5, 0 }; + NSString *command = nil; + NSString *response = nil; + in_port_t port = 33367; - while([self keepProcessingAudioScrobblerCommands]) { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + while([self keepProcessingAudioScrobblerCommands]) { + @autoreleasepool { - // Get the first command to be sent - @synchronized([self queue]) { - if ([[self queue] count]) { - command = [[[self queue] objectAtIndex:0] retain]; - [[self queue] removeObjectAtIndex:0]; - } - } + // Get the first command to be sent + @synchronized([self queue]) { + if ([[self queue] count]) { + command = [[self queue] objectAtIndex:0]; + [[self queue] removeObjectAtIndex:0]; + } + } - if(nil != command) { - @try { - if([client connectToHost:@"localhost" port:port]) { - port = [client connectedPort]; - [client send:command]; - [command release]; - command = nil; + if(nil != command) { + @try { + if([client connectToHost:@"localhost" port:port]) { + port = [client connectedPort]; + [client send:command]; + command = nil; - response = [client receive]; - if(2 > [response length] || NSOrderedSame != [response compare:@"OK" options:NSLiteralSearch range:NSMakeRange(0,2)]) - ALog(@"AudioScrobbler error: %@", response); + response = [client receive]; + if(2 > [response length] || NSOrderedSame != [response compare:@"OK" options:NSLiteralSearch range:NSMakeRange(0,2)]) + ALog(@"AudioScrobbler error: %@", response); - [client shutdown]; - } - } + [client shutdown]; + } + } - @catch(NSException *exception) { - [command release]; - command = nil; + @catch(NSException *exception) { + command = nil; - [client shutdown]; -// ALog(@"Exception: %@",exception); - [pool release]; - continue; - } - } + [client shutdown]; +// ALog(@"Exception: %@",exception); + continue; + } + } - semaphore_timedwait([self semaphore], timeout); - [pool release]; - } + semaphore_timedwait([self semaphore], timeout); + } + } - // Send a final stop command to cleanup - @try { - if([client connectToHost:@"localhost" port:port]) { - [client send:[NSString stringWithFormat:@"STOP c=%@\n", [self pluginID]]]; + // Send a final stop command to cleanup + @try { + if([client connectToHost:@"localhost" port:port]) { + [client send:[NSString stringWithFormat:@"STOP c=%@\n", [self pluginID]]]; - response = [client receive]; - if(2 > [response length] || NSOrderedSame != [response compare:@"OK" options:NSLiteralSearch range:NSMakeRange(0,2)]) - ALog(@"AudioScrobbler error: %@", response); + response = [client receive]; + if(2 > [response length] || NSOrderedSame != [response compare:@"OK" options:NSLiteralSearch range:NSMakeRange(0,2)]) + ALog(@"AudioScrobbler error: %@", response); - [client shutdown]; - } - } + [client shutdown]; + } + } - @catch(NSException *exception) { - [client shutdown]; - } + @catch(NSException *exception) { + [client shutdown]; + } - [client release]; - [self setAudioScrobblerThreadCompleted:YES]; - - [pool release]; + [self setAudioScrobblerThreadCompleted:YES]; + } } @end diff --git a/AudioScrobbler/AudioScrobblerClient.m b/AudioScrobbler/AudioScrobblerClient.m index 7c0814b3e..65648526b 100644 --- a/AudioScrobbler/AudioScrobblerClient.m +++ b/AudioScrobbler/AudioScrobblerClient.m @@ -141,7 +141,7 @@ addressForHost(NSString *hostname) } buffer[bytesRead] = '\0'; - result = [[[NSString alloc] initWithUTF8String:buffer] autorelease]; + result = [[NSString alloc] initWithUTF8String:buffer]; } while(keepGoing); @@ -170,7 +170,6 @@ addressForHost(NSString *hostname) if(0 != bytesRead) { NSString *received = [[NSString alloc] initWithBytes:buffer length:bytesRead encoding:NSUTF8StringEncoding]; ALog(@"Received unexpected bytes during shutdown: %@", received); - [received release]; } else break; diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index 74da734c2..3bc809cb1 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -42,7 +42,6 @@ 1770429E0B8BC53600B86321 /* PlaybackController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1770429A0B8BC53600B86321 /* PlaybackController.m */; }; 1778D3B00F645A190037E7A0 /* missingArt.png in Resources */ = {isa = PBXBuildFile; fileRef = 1778D3AF0F645A190037E7A0 /* missingArt.png */; }; 1778D3CA0F645BF00037E7A0 /* MissingAlbumArtTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 1778D3C90F645BF00037E7A0 /* MissingAlbumArtTransformer.m */; }; - 177EBFA20B8BC2A70000BC8C /* AppleRemote.m in Sources */ = {isa = PBXBuildFile; fileRef = 177EBF7F0B8BC2A70000BC8C /* AppleRemote.m */; }; 177EBFA70B8BC2A70000BC8C /* ImageTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 177EBF870B8BC2A70000BC8C /* ImageTextCell.m */; }; 177EC0270B8BC2CF0000BC8C /* TrackingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 177EC01B0B8BC2CF0000BC8C /* TrackingCell.m */; }; 177EC0290B8BC2CF0000BC8C /* TrackingSlider.m in Sources */ = {isa = PBXBuildFile; fileRef = 177EC01D0B8BC2CF0000BC8C /* TrackingSlider.m */; }; @@ -798,7 +797,6 @@ 1778D3AF0F645A190037E7A0 /* missingArt.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = missingArt.png; path = Images/missingArt.png; sourceTree = ""; }; 1778D3C80F645BF00037E7A0 /* MissingAlbumArtTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MissingAlbumArtTransformer.h; path = InfoInspector/MissingAlbumArtTransformer.h; sourceTree = ""; }; 1778D3C90F645BF00037E7A0 /* MissingAlbumArtTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MissingAlbumArtTransformer.m; path = InfoInspector/MissingAlbumArtTransformer.m; sourceTree = ""; }; - 177EBF7F0B8BC2A70000BC8C /* AppleRemote.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = AppleRemote.m; sourceTree = ""; }; 177EBF860B8BC2A70000BC8C /* ImageTextCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ImageTextCell.h; sourceTree = ""; }; 177EBF870B8BC2A70000BC8C /* ImageTextCell.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = ImageTextCell.m; sourceTree = ""; }; 177EC01A0B8BC2CF0000BC8C /* TrackingCell.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TrackingCell.h; sourceTree = ""; }; @@ -913,7 +911,6 @@ 17E0D6190F520F9F005B6FED /* VolumeButton.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VolumeButton.m; path = Window/VolumeButton.m; sourceTree = ""; }; 17E0D61A0F520F9F005B6FED /* VolumeSlider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VolumeSlider.h; path = Window/VolumeSlider.h; sourceTree = ""; }; 17E0D61B0F520F9F005B6FED /* VolumeSlider.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VolumeSlider.m; path = Window/VolumeSlider.m; sourceTree = ""; }; - 17E0D6370F522324005B6FED /* AppleRemote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppleRemote.h; sourceTree = ""; }; 17F3BB830CBC565100864489 /* CueSheet.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CueSheet.xcodeproj; path = Plugins/CueSheet/CueSheet.xcodeproj; sourceTree = ""; }; 17F5612A0C3BD4DC0019975C /* CogAudio.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = CogAudio.xcodeproj; path = Audio/CogAudio.xcodeproj; sourceTree = ""; }; 17F562260C3BD8FB0019975C /* General.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = General.xcodeproj; path = Preferences/General/General.xcodeproj; sourceTree = ""; }; @@ -942,6 +939,15 @@ 56DB08540D67185300453B6A /* NSArray+CogSort.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSArray+CogSort.m"; path = "Spotlight/NSArray+CogSort.m"; sourceTree = ""; }; 8314D63B1A354DFE00EEE8E6 /* sidplay.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = sidplay.xcodeproj; path = Plugins/sidplay/sidplay.xcodeproj; sourceTree = ""; }; 832C1252180BD1E2005507C1 /* Cog.help */ = {isa = PBXFileReference; lastKnownFileType = folder; path = Cog.help; sourceTree = ""; }; + 833F681E1CDBCAA700AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 833F681F1CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/Localizable.strings; sourceTree = ""; }; + 833F68201CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/InfoInspector.xib; sourceTree = ""; }; + 833F68211CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/MainMenu.xib; sourceTree = ""; }; + 833F68221CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/OpenURLPanel.xib; sourceTree = ""; }; + 833F68231CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/FileTree.xib; sourceTree = ""; }; + 833F68241CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/SpotlightPanel.xib; sourceTree = ""; }; + 833F68251CDBCAA800AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = es; path = es.lproj/Credits.html; sourceTree = ""; }; + 833F68261CDBCAA900AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = es; path = es.lproj/Feedback.xib; sourceTree = ""; }; 8355D6B4180612F300D05687 /* NSData+MD5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+MD5.h"; sourceTree = ""; }; 8355D6B5180612F300D05687 /* NSData+MD5.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "NSData+MD5.m"; sourceTree = ""; }; 8355D6B7180613FB00D05687 /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = System/Library/Frameworks/Security.framework; sourceTree = SDKROOT; }; @@ -1157,22 +1163,12 @@ 83790D4A1809F4980073CF51 /* SPMediaKeyTap */, 173A439D0F3FD25500676A7B /* ToolTip */, 178BAB920CD4E1B700B33D47 /* GCWindowMenu */, - 177EBF7D0B8BC2A70000BC8C /* AppleRemote */, 177EBF850B8BC2A70000BC8C /* ImageTextCell */, 179790DD0C087AB7001D6996 /* OpenURLPanel */, ); path = ThirdParty; sourceTree = ""; }; - 177EBF7D0B8BC2A70000BC8C /* AppleRemote */ = { - isa = PBXGroup; - children = ( - 17E0D6370F522324005B6FED /* AppleRemote.h */, - 177EBF7F0B8BC2A70000BC8C /* AppleRemote.m */, - ); - path = AppleRemote; - sourceTree = ""; - }; 177EBF850B8BC2A70000BC8C /* ImageTextCell */ = { isa = PBXGroup; children = ( @@ -1954,6 +1950,7 @@ Hebrew, Greek, zh_CN, + es, ); mainGroup = 29B97314FDCFA39411CA2CEA /* Cog */; projectDirPath = ""; @@ -2473,7 +2470,6 @@ 8E75757509F31D5A0080F1EE /* Shuffle.m in Sources */, 8E1296DB0A2BA9CE00443124 /* PlaylistHeaderView.m in Sources */, 8E07AB790AAC930B00A4B32F /* PreferencesController.m in Sources */, - 177EBFA20B8BC2A70000BC8C /* AppleRemote.m in Sources */, 177EBFA70B8BC2A70000BC8C /* ImageTextCell.m in Sources */, 177EC0270B8BC2CF0000BC8C /* TrackingCell.m in Sources */, 177EC0290B8BC2CF0000BC8C /* TrackingSlider.m in Sources */, @@ -2706,6 +2702,7 @@ isa = PBXVariantGroup; children = ( 089C165DFE840E0CC02AAC07 /* English */, + 833F681E1CDBCAA700AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -2714,6 +2711,7 @@ isa = PBXVariantGroup; children = ( 17211A7D0D68B7C500911CA9 /* English */, + 833F68231CDBCAA800AFB9F0 /* es */, ); name = FileTree.xib; sourceTree = ""; @@ -2722,6 +2720,7 @@ isa = PBXVariantGroup; children = ( 17342A990D5FD20B00E8D854 /* English */, + 833F68211CDBCAA800AFB9F0 /* es */, ); name = MainMenu.xib; sourceTree = ""; @@ -2730,6 +2729,7 @@ isa = PBXVariantGroup; children = ( 17342ABE0D5FD36400E8D854 /* English */, + 833F68221CDBCAA800AFB9F0 /* es */, ); name = OpenURLPanel.xib; sourceTree = ""; @@ -2738,6 +2738,7 @@ isa = PBXVariantGroup; children = ( 178456C10F6320B5007E8021 /* English */, + 833F68241CDBCAA800AFB9F0 /* es */, ); name = SpotlightPanel.xib; sourceTree = ""; @@ -2746,6 +2747,7 @@ isa = PBXVariantGroup; children = ( 17D1B0D10F6320EA00694C57 /* English */, + 833F68201CDBCAA800AFB9F0 /* es */, ); name = InfoInspector.xib; sourceTree = ""; @@ -2754,6 +2756,7 @@ isa = PBXVariantGroup; children = ( 17D1B1DB0F6330D400694C57 /* English */, + 833F68261CDBCAA900AFB9F0 /* es */, ); name = Feedback.xib; sourceTree = ""; @@ -2762,6 +2765,7 @@ isa = PBXVariantGroup; children = ( 8E7575C809F31DCA0080F1EE /* English */, + 833F68251CDBCAA800AFB9F0 /* es */, ); name = Credits.html; sourceTree = ""; @@ -2770,6 +2774,7 @@ isa = PBXVariantGroup; children = ( 8E7575DA09F31E930080F1EE /* English */, + 833F681F1CDBCAA800AFB9F0 /* es */, ); name = Localizable.strings; sourceTree = ""; @@ -2853,6 +2858,7 @@ C01FCF4F08A954540054247B /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; @@ -2866,6 +2872,7 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + CLANG_ENABLE_OBJC_ARC = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/Feedback/FeedbackController.m b/Feedback/FeedbackController.m index db751191f..df1172a86 100644 --- a/Feedback/FeedbackController.m +++ b/Feedback/FeedbackController.m @@ -28,7 +28,7 @@ - (void)alertDidEnd:(NSAlert *)alert returnCode:(int)returnCode contextInfo:(void *)contextInfo { - if ([(NSNumber *)contextInfo boolValue]== YES) + if ([(NSNumber *)CFBridgingRelease(contextInfo) boolValue]== YES) { [[self window] close]; } @@ -40,22 +40,22 @@ [sendingIndicator stopAnimation:self]; - NSAlert *alert = [[[NSAlert alloc] init] autorelease]; + NSAlert *alert = [[NSAlert alloc] init]; [alert setMessageText:NSLocalizedString(@"FeedbackFailedMessageText", @"")]; [alert setInformativeText:NSLocalizedString(@"FeedbackFailedInformativeText", @"")]; - [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:[NSNumber numberWithBool:NO]]; + [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:(void *)CFBridgingRetain([NSNumber numberWithBool:NO])]; } - (void)feedbackDidSend:(FeedbackSocket *)feedback { [sendingIndicator stopAnimation:self]; - NSAlert *alert = [[[NSAlert alloc] init] autorelease]; + NSAlert *alert = [[NSAlert alloc] init]; [alert setMessageText:NSLocalizedString(@"FeedbackSuccessMessageText", @"")]; [alert setInformativeText:NSLocalizedString(@"FeedbackSuccessInformativeText", @"")]; - [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:[NSNumber numberWithBool:YES]]; + [alert beginSheetModalForWindow:[self window] modalDelegate:self didEndSelector:@selector(alertDidEnd:returnCode:contextInfo:) contextInfo:(void *)CFBridgingRetain([NSNumber numberWithBool:YES])]; } diff --git a/Feedback/FeedbackSocket.m b/Feedback/FeedbackSocket.m index cab2f11ff..6559827ee 100644 --- a/Feedback/FeedbackSocket.m +++ b/Feedback/FeedbackSocket.m @@ -14,44 +14,42 @@ NSString *encodeForURL(NSString *s) { - return [(NSString*) CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)s, NULL, NULL, kCFStringEncodingUTF8) autorelease]; + return (NSString*) CFBridgingRelease(CFURLCreateStringByAddingPercentEscapes(NULL, (CFStringRef)s, NULL, NULL, kCFStringEncodingUTF8)); } - (void)sendFeedbackThread:(id)sender { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + @autoreleasepool { + NSString *f = encodeForURL(from); + NSString *s = encodeForURL(subject); + NSString *m = encodeForURL(message); + NSString *v = encodeForURL(version); - NSString *f = encodeForURL(from); - NSString *s = encodeForURL(subject); - NSString *m = encodeForURL(message); - NSString *v = encodeForURL(version); + NSString *postString = [NSString stringWithFormat:@"from=%@&subject=%@&message=%@&version=%@", f, s, m, v]; - NSString *postString = [NSString stringWithFormat:@"from=%@&subject=%@&message=%@&version=%@", f, s, m, v]; + NSData *postData = [postString dataUsingEncoding:NSASCIIStringEncoding]; - NSData *postData = [postString dataUsingEncoding:NSASCIIStringEncoding]; + NSURL *url = [NSURL URLWithString:@"http://cogx.org/feedback.php"]; + NSMutableURLRequest *post = [NSMutableURLRequest requestWithURL:url]; - NSURL *url = [NSURL URLWithString:@"http://cogx.org/feedback.php"]; - NSMutableURLRequest *post = [NSMutableURLRequest requestWithURL:url]; + [post addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; + [post setHTTPMethod:@"POST"]; + [post setHTTPBody:postData]; - [post addValue:@"application/x-www-form-urlencoded" forHTTPHeaderField:@"Content-Type"]; - [post setHTTPMethod:@"POST"]; - [post setHTTPBody:postData]; - - NSError* error; - NSURLResponse* response; - NSData* resultData = [NSURLConnection sendSynchronousRequest:post returningResponse:&response error:&error]; - NSString *resultString = [[[NSString alloc] initWithData:resultData encoding:NSASCIIStringEncoding] autorelease]; - //DLog(@"RESULT: %@", resultString); - if ([resultString caseInsensitiveCompare:@"SUCCESS"] == NSOrderedSame) - { - [self performSelectorOnMainThread:@selector(returnSuccess:) withObject:nil waitUntilDone:NO]; - } - else - { - [self performSelectorOnMainThread:@selector(returnFailure:) withObject:nil waitUntilDone:NO]; - } - - [pool release]; + NSError* error; + NSURLResponse* response; + NSData* resultData = [NSURLConnection sendSynchronousRequest:post returningResponse:&response error:&error]; + NSString *resultString = [[NSString alloc] initWithData:resultData encoding:NSASCIIStringEncoding]; + //DLog(@"RESULT: %@", resultString); + if ([resultString caseInsensitiveCompare:@"SUCCESS"] == NSOrderedSame) + { + [self performSelectorOnMainThread:@selector(returnSuccess:) withObject:nil waitUntilDone:NO]; + } + else + { + [self performSelectorOnMainThread:@selector(returnFailure:) withObject:nil waitUntilDone:NO]; + } + } } - (void)sendFeedback: (NSString *)f subject:(NSString *)s message:(NSString *)m version:(NSString *)v @@ -90,33 +88,21 @@ NSString *encodeForURL(NSString *s) - (void)setFrom:(NSString *)f { - [f retain]; - [from release]; - from = f; } - (void)setSubject:(NSString *)s { - [s retain]; - [subject release]; - subject = s; } - (void)setMessage:(NSString *)m { - [m retain]; - [message release]; - message = m; } - (void)setVersion:(NSString *)v { - [v retain]; - [version release]; - version = v; } diff --git a/FileTree/ContainedNode.m b/FileTree/ContainedNode.m index 4418751eb..6917687f7 100644 --- a/FileTree/ContainedNode.m +++ b/FileTree/ContainedNode.m @@ -23,7 +23,6 @@ if ([u fragment]) { - [display release]; NSDictionary *metadata = [AudioMetadataReader metadataForURL:u]; NSString *title = nil; NSString *artist = nil; @@ -37,11 +36,10 @@ { if (artist && [artist length]) { display = [[u fragment] stringByAppendingFormat:@": %@ - %@", artist, title];} else { display = [[u fragment] stringByAppendingFormat:@": %@", title]; } - [display retain]; } else { - display = [[u fragment] retain]; + display = [u fragment]; } } } diff --git a/FileTree/ContainerNode.m b/FileTree/ContainerNode.m index 0dd5a919f..12d1e03bd 100644 --- a/FileTree/ContainerNode.m +++ b/FileTree/ContainerNode.m @@ -30,12 +30,9 @@ ContainedNode *node = [[ContainedNode alloc] initWithDataSource:dataSource url:u]; DLog(@"Node: %@", u); [paths addObject:node]; - [node release]; - } + } [self setSubpaths:paths]; - - [paths release]; } @end diff --git a/FileTree/DirectoryNode.m b/FileTree/DirectoryNode.m index ece3e35c2..659d618f5 100644 --- a/FileTree/DirectoryNode.m +++ b/FileTree/DirectoryNode.m @@ -31,8 +31,6 @@ } [self processPaths: [fullPaths sortedArrayUsingSelector:@selector(finderCompare:)]]; - - [fullPaths release]; } @end diff --git a/FileTree/FileTreeController.m b/FileTree/FileTreeController.m index c1e71df10..a79bc1217 100644 --- a/FileTree/FileTreeController.m +++ b/FileTree/FileTreeController.m @@ -8,6 +8,7 @@ #import "PlaylistController.h" #import "FileTreeController.h" +#import "SideViewController.h" @implementation FileTreeController @@ -30,7 +31,6 @@ } [controller doAddToPlaylist:urls origin:origin]; - [urls release]; } - (void)addToPlaylistExternal:(id)sender diff --git a/FileTree/FileTreeDataSource.m b/FileTree/FileTreeDataSource.m index 9a4f1e668..07b380015 100644 --- a/FileTree/FileTreeDataSource.m +++ b/FileTree/FileTreeDataSource.m @@ -73,7 +73,6 @@ if (![[NSFileManager defaultManager] fileExistsAtPath:[rootURL path]]) rootURL = [NSURL fileURLWithPath:[@"~/Music" stringByExpandingTildeInPath]]; - [rootNode release]; rootNode = [[DirectoryNode alloc] initWithDataSource:self url:rootURL]; [watcher setPath:[rootURL path]]; @@ -181,11 +180,4 @@ } } -- (void)dealloc -{ - [rootNode release]; - - [super dealloc]; -} - @end diff --git a/FileTree/FileTreeViewController.m b/FileTree/FileTreeViewController.m index 2367c114c..800640b16 100644 --- a/FileTree/FileTreeViewController.m +++ b/FileTree/FileTreeViewController.m @@ -8,6 +8,7 @@ #import "FileTreeViewController.h" #import "PlaylistLoader.h" +#import "PlaybackController.h" @implementation FileTreeViewController diff --git a/FileTree/PathNode.m b/FileTree/PathNode.m index 54b1943b2..e797e9680 100644 --- a/FileTree/PathNode.m +++ b/FileTree/PathNode.m @@ -36,7 +36,7 @@ NSURL *resolveAliases(NSURL *url) if (resolvedUrl != NULL) { //DLog(@"Resolved..."); - return [(NSURL *)resolvedUrl autorelease]; + return (NSURL *)CFBridgingRelease(resolvedUrl); } } } @@ -60,19 +60,11 @@ NSURL *resolveAliases(NSURL *url) - (void)setURL:(NSURL *)u { - [u retain]; - - [url release]; - url = u; - [display release]; display = [[NSFileManager defaultManager] displayNameAtPath:[u path]]; - [display retain]; - [icon release]; icon = [[NSWorkspace sharedWorkspace] iconForFile:[url path]]; - [icon retain]; [icon setSize: NSMakeSize(16.0, 16.0)]; } @@ -144,15 +136,10 @@ NSURL *resolveAliases(NSURL *url) [newSubpathsDirs addObject:newNode]; else [newSubpaths addObject:newNode]; - - [newNode release]; } [newSubpathsDirs addObjectsFromArray:newSubpaths]; [self setSubpaths:newSubpathsDirs]; - - [newSubpathsDirs release]; - [newSubpaths release]; } - (NSArray *)subpaths @@ -167,8 +154,6 @@ NSURL *resolveAliases(NSURL *url) - (void)setSubpaths:(NSArray *)s { - [s retain]; - [subpaths release]; subpaths = s; } @@ -180,9 +165,7 @@ NSURL *resolveAliases(NSURL *url) - (void)setDisplay:(NSString *)s { - [display release]; display = s; - [display retain]; } - (NSString *)display @@ -195,14 +178,4 @@ NSURL *resolveAliases(NSURL *url) return icon; } -- (void)dealloc -{ - [url release]; - [icon release]; - - [subpaths release]; - - [super dealloc]; -} - @end diff --git a/FileTree/PathWatcher.m b/FileTree/PathWatcher.m index 2282a12a4..04b70f5ad 100644 --- a/FileTree/PathWatcher.m +++ b/FileTree/PathWatcher.m @@ -18,13 +18,12 @@ static void myFSEventCallback( { int i; char **paths = eventPaths; - PathWatcher *pathWatcher = (PathWatcher *)clientCallBackInfo; + PathWatcher *pathWatcher = (__bridge PathWatcher *)clientCallBackInfo; printf("Callback called\n"); for (i=0; iversion = 0; - context->info = (void *)self; + context->info = (__bridge void *)self; context->retain = NULL; context->release = NULL; @@ -61,14 +60,12 @@ static void myFSEventCallback( stream = FSEventStreamCreate(NULL, &myFSEventCallback, context, - pathsToWatch, + (__bridge CFArrayRef)pathsToWatch, kFSEventStreamEventIdSinceNow, // Or a previous event ID 1.0, //latency in seconds kFSEventStreamCreateFlagNone // Watch this and all its subdirectories ); - CFRelease(pathsToWatch); - FSEventStreamScheduleWithRunLoop(stream, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode); FSEventStreamStart(stream); @@ -76,8 +73,6 @@ static void myFSEventCallback( - (void)setDelegate:(id)d { - [d retain]; - [delegate release]; delegate = d; } - (id)delegate @@ -88,8 +83,6 @@ static void myFSEventCallback( - (void) dealloc { [self cleanUp]; - - [super dealloc]; } diff --git a/FileTree/SmartFolderNode.h b/FileTree/SmartFolderNode.h index 35b59f840..05b045e47 100644 --- a/FileTree/SmartFolderNode.h +++ b/FileTree/SmartFolderNode.h @@ -11,6 +11,7 @@ #import "PathNode.h" @interface SmartFolderNode : PathNode { + MDQueryRef _query; } @end diff --git a/FileTree/SmartFolderNode.m b/FileTree/SmartFolderNode.m index 1879b9dca..4bad87597 100644 --- a/FileTree/SmartFolderNode.m +++ b/FileTree/SmartFolderNode.m @@ -28,11 +28,12 @@ // Ugh, Carbon from now on... MDQueryRef query = MDQueryCreate(kCFAllocatorDefault, (CFStringRef)rawQuery, NULL, NULL); + _query = query; MDQuerySetSearchScope(query, (CFArrayRef)searchPaths, 0); - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(queryFinished:) name:(NSString*)kMDQueryDidFinishNotification object:(id)query]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(queryUpdate:) name:(NSString*)kMDQueryDidUpdateNotification object:(id)query]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(queryFinished:) name:(NSString*)kMDQueryDidFinishNotification object:(__bridge id)query]; + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(queryUpdate:) name:(NSString*)kMDQueryDidUpdateNotification object:(__bridge id)query]; DLog(@"Making query!"); MDQueryExecute(query, kMDQueryWantsUpdates); @@ -42,8 +43,6 @@ - (void)setSubpaths:(id)s { - [s retain]; - [subpaths release]; subpaths = s; } @@ -60,7 +59,7 @@ - (void)queryFinished:(NSNotification *)notification { DLog(@"Query finished!"); - MDQueryRef query = (MDQueryRef)[notification object]; + MDQueryRef query = (__bridge MDQueryRef)[notification object]; NSMutableArray *results = [NSMutableArray array]; @@ -72,11 +71,9 @@ { MDItemRef item = (MDItemRef)MDQueryGetResultAtIndex(query, i); - NSString *itemPath = (NSString*)MDItemCopyAttribute(item, kMDItemPath); + NSString *itemPath = (NSString *) CFBridgingRelease(MDItemCopyAttribute(item, kMDItemPath)); [results addObject:itemPath]; - - [itemPath release]; } MDQueryEnableUpdates(query); @@ -94,6 +91,11 @@ [self queryFinished: notification]; } +- (void)dealloc +{ + CFRelease(_query); +} + @end diff --git a/Formatters/BlankZeroFormatter.m b/Formatters/BlankZeroFormatter.m index 2fc33a62c..5950513fc 100644 --- a/Formatters/BlankZeroFormatter.m +++ b/Formatters/BlankZeroFormatter.m @@ -46,7 +46,7 @@ NSAttributedString *result = nil; result = [[NSAttributedString alloc] initWithString:[self stringForObjectValue:object] attributes:attributes]; - return [result autorelease]; + return result; } @end diff --git a/Formatters/IndexFormatter.m b/Formatters/IndexFormatter.m index 46b53e9ab..d48031ece 100644 --- a/Formatters/IndexFormatter.m +++ b/Formatters/IndexFormatter.m @@ -43,7 +43,7 @@ NSAttributedString *result = nil; result = [[NSAttributedString alloc] initWithString:[self stringForObjectValue:object] attributes:attributes]; - return [result autorelease]; + return result; } @end diff --git a/Formatters/SecondsFormatter.m b/Formatters/SecondsFormatter.m index 5978fbb72..d0f3a8799 100644 --- a/Formatters/SecondsFormatter.m +++ b/Formatters/SecondsFormatter.m @@ -103,7 +103,7 @@ NSAttributedString *result = nil; result = [[NSAttributedString alloc] initWithString:[self stringForObjectValue:object] attributes:attributes]; - return [result autorelease]; + return result; } @end diff --git a/Frameworks/Dumb/Dumb.xcodeproj/project.pbxproj b/Frameworks/Dumb/Dumb.xcodeproj/project.pbxproj index 77b954e61..7cddcfd85 100644 --- a/Frameworks/Dumb/Dumb.xcodeproj/project.pbxproj +++ b/Frameworks/Dumb/Dumb.xcodeproj/project.pbxproj @@ -156,6 +156,7 @@ 17C8F63B0CBEE797008D969D /* readxm.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = readxm.c; sourceTree = ""; }; 17C8F63C0CBEE797008D969D /* readxm2.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = readxm2.c; sourceTree = ""; }; 17C8F63D0CBEE797008D969D /* xmeffect.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; path = xmeffect.c; sourceTree = ""; }; + 833F68341CDBCAB100AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 8370B61E17F60FE2001A4D7A /* barray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = barray.h; sourceTree = ""; }; 8370B62017F60FE2001A4D7A /* dumbfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dumbfile.h; sourceTree = ""; }; 8370B62217F60FE2001A4D7A /* lpc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lpc.h; sourceTree = ""; }; @@ -484,7 +485,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Dumb" */; compatibilityVersion = "Xcode 3.2"; @@ -492,6 +493,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* Dumb */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -614,6 +616,7 @@ isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, + 833F68341CDBCAB100AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -640,6 +643,7 @@ INSTALL_PATH = "@loader_path/../Frameworks"; OBJROOT = ../../build; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.dumb; PRODUCT_NAME = Dumb; SDKROOT = macosx; SHARED_PRECOMPS_DIR = ""; @@ -665,6 +669,7 @@ INSTALL_PATH = "@loader_path/../Frameworks"; OBJROOT = ../../build; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.dumb; PRODUCT_NAME = Dumb; SDKROOT = macosx; SHARED_PRECOMPS_DIR = ""; @@ -677,6 +682,7 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "DEBUG=1", "VAR_ARRAYS=1", diff --git a/Frameworks/Dumb/Info.plist b/Frameworks/Dumb/Info.plist index 563116699..5c18bd9f9 100644 --- a/Frameworks/Dumb/Info.plist +++ b/Frameworks/Dumb/Info.plist @@ -6,14 +6,14 @@ English CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} CFBundleIconFile CFBundleIdentifier - org.cogx.lib.dumb + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleSignature diff --git a/Frameworks/Dumb/dumb/src/helpers/resamp3.inc b/Frameworks/Dumb/dumb/src/helpers/resamp3.inc index c270c83e9..3a77ebe26 100644 --- a/Frameworks/Dumb/dumb/src/helpers/resamp3.inc +++ b/Frameworks/Dumb/dumb/src/helpers/resamp3.inc @@ -52,7 +52,7 @@ long dumb_resample(DUMB_RESAMPLER *resampler, sample_t *dst, long dst_size, VOLU long todo; LONG_LONG todo64; int quality; - int check; + /*int check;*/ if (!resampler || resampler->dir == 0) return 0; ASSERT(resampler->dir == -1 || resampler->dir == 1); diff --git a/Frameworks/Dumb/es.lproj/InfoPlist.strings b/Frameworks/Dumb/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..948e12b991d433e9dc3ebc46350cb859c5bc1e07 GIT binary patch literal 204 zcmW-a%?`m}5Jk`0Q#6*1sMuJDl?@3NJb)A}LVwaCsWCFBundleIconFile CFBundleIdentifier - org.cogx.lib.ffmpeg + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/FFMPEG/es.lproj/InfoPlist.strings b/Frameworks/FFMPEG/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..2fe6c8f6d97570feaa41bde62563830270234e49 GIT binary patch literal 204 zcmW-a%?`m}5Jk`0Q#6*1s8~tF%7z3B9zco~p+9Mn)Ejw8oHmopd~@%e^ZmXNApt82 zj>O!#@+RS=_HtI#Dh0VSaHjU9Tk3mA+2v~t;+pO1ZSt##W}X09bP5@WZda|fozjI4<_Q~&z|gli-1 literal 0 HcmV?d00001 diff --git a/Frameworks/FLAC/Info.plist b/Frameworks/FLAC/Info.plist index 59257d5e7..5c18bd9f9 100644 --- a/Frameworks/FLAC/Info.plist +++ b/Frameworks/FLAC/Info.plist @@ -6,14 +6,14 @@ English CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} CFBundleIconFile CFBundleIdentifier - org.xiph.libflac + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleSignature diff --git a/Frameworks/FLAC/flac-1.2.1/src/libFLAC/cpu.c b/Frameworks/FLAC/flac-1.2.1/src/libFLAC/cpu.c index 60b73bff1..5df9a3094 100644 --- a/Frameworks/FLAC/flac-1.2.1/src/libFLAC/cpu.c +++ b/Frameworks/FLAC/flac-1.2.1/src/libFLAC/cpu.c @@ -87,6 +87,7 @@ static void sigill_handler (int sig) #endif /* these are flags in EDX of CPUID AX=00000001 */ +#if 0 static const unsigned FLAC__CPUINFO_IA32_CPUID_CMOV = 0x00008000; static const unsigned FLAC__CPUINFO_IA32_CPUID_MMX = 0x00800000; static const unsigned FLAC__CPUINFO_IA32_CPUID_FXSR = 0x01000000; @@ -99,6 +100,7 @@ static const unsigned FLAC__CPUINFO_IA32_CPUID_SSSE3 = 0x00000200; static const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_3DNOW = 0x80000000; static const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXT3DNOW = 0x40000000; static const unsigned FLAC__CPUINFO_IA32_CPUID_EXTENDED_AMD_EXTMMX = 0x00400000; +#endif /* diff --git a/Frameworks/FLAC/flac.xcodeproj/project.pbxproj b/Frameworks/FLAC/flac.xcodeproj/project.pbxproj index c6b0a99b1..6b44a4cfd 100644 --- a/Frameworks/FLAC/flac.xcodeproj/project.pbxproj +++ b/Frameworks/FLAC/flac.xcodeproj/project.pbxproj @@ -421,7 +421,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "flac" */; compatibilityVersion = "Xcode 3.2"; @@ -509,6 +509,7 @@ OTHER_CFLAGS_QUOTED_1 = "-DVERSION=\\\"1.2.1\\\""; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; + PRODUCT_BUNDLE_IDENTIFIER = org.xiph.libflac; PRODUCT_NAME = FLAC; PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; SKIP_INSTALL = YES; @@ -547,6 +548,7 @@ OTHER_CFLAGS_QUOTED_1 = "-DVERSION=\\\"1.2.1\\\""; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; PRIVATE_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/PrivateHeaders"; + PRODUCT_BUNDLE_IDENTIFIER = org.xiph.libflac; PRODUCT_NAME = FLAC; PUBLIC_HEADERS_FOLDER_PATH = "$(CONTENTS_FOLDER_PATH)/Headers"; SKIP_INSTALL = YES; @@ -559,6 +561,7 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj b/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj index a90aa603e..29686b956 100644 --- a/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj +++ b/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj @@ -144,6 +144,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 833F68401CDBCAB300AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 8359000017FEF40E0060F3ED /* unrar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = unrar.h; sourceTree = ""; }; 8359000117FEF40E0060F3ED /* unrar_misc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = unrar_misc.cpp; sourceTree = ""; }; 8359009017FEF5830060F3ED /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; @@ -614,7 +615,7 @@ 8359FF3317FEF39F0060F3ED /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Christopher Snowhill"; }; buildConfigurationList = 8359FF3617FEF39F0060F3ED /* Build configuration list for PBXProject "File_Extractor" */; @@ -623,6 +624,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 8359FF3217FEF39F0060F3ED; productRefGroup = 8359FF3D17FEF39F0060F3ED /* Products */; @@ -723,6 +725,7 @@ isa = PBXVariantGroup; children = ( 8359FF4917FEF39F0060F3ED /* en */, + 833F68401CDBCAB300AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -746,6 +749,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -815,6 +819,7 @@ ); INFOPLIST_FILE = "File_Extractor/File_Extractor-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.fileextractor; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -837,6 +842,7 @@ ); INFOPLIST_FILE = "File_Extractor/File_Extractor-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.fileextractor; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; diff --git a/Frameworks/File_Extractor/File_Extractor/File_Extractor-Info.plist b/Frameworks/File_Extractor/File_Extractor/File_Extractor-Info.plist index 93ab3b770..d621f5f87 100644 --- a/Frameworks/File_Extractor/File_Extractor/File_Extractor-Info.plist +++ b/Frameworks/File_Extractor/File_Extractor/File_Extractor-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - net.kode54.fileextractor + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/File_Extractor/File_Extractor/es.lproj/InfoPlist.strings b/Frameworks/File_Extractor/File_Extractor/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/File_Extractor/File_Extractor/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/File_Extractor/File_Extractor/fex/File_Extractor.cpp b/Frameworks/File_Extractor/File_Extractor/fex/File_Extractor.cpp index c51080f0e..413742c1f 100644 --- a/Frameworks/File_Extractor/File_Extractor/fex/File_Extractor.cpp +++ b/Frameworks/File_Extractor/File_Extractor/fex/File_Extractor.cpp @@ -63,9 +63,11 @@ static void make_unbuffered( Std_File_Reader* r ) r->make_unbuffered(); } +#if 0 inline static void make_unbuffered( void* ) { } +#endif blargg_err_t File_Extractor::open_arc_file( bool unbuffered ) { diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/archive.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/archive.cpp index 528da7506..91d9612ea 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/archive.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/archive.cpp @@ -21,6 +21,7 @@ RARFORMAT Archive::IsSignature(const byte *D,size_t Size) { RARFORMAT Type=RARFMT_NONE; if (Size>=1 && D[0]==0x52) + { #ifndef SFX_MODULE if (Size>=4 && D[1]==0x45 && D[2]==0x7e && D[3]==0x5e) Type=RARFMT14; @@ -38,6 +39,7 @@ RARFORMAT Archive::IsSignature(const byte *D,size_t Size) else if (D[6]==2) Type=RARFMT_FUTURE; } + } return Type; } diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/arcread.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/arcread.cpp index b29f38dad..798fce025 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/arcread.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/arcread.cpp @@ -361,6 +361,8 @@ unrar_err_t Archive::ReadHeader50(size_t *ReadSize) switch(ShortBlock.HeaderType) { + default: break; + case HEAD_CRYPT: return unrar_err_encrypted; case HEAD_MAIN: @@ -720,10 +722,12 @@ void Archive::ConvertFileHeader(FileHeader *hd) if (Format==RARFMT15 && hd->UnpVer<20 && (hd->FileAttr & 0x10)) hd->Dir=true; if (hd->HSType==HSYS_UNKNOWN) + { if (hd->Dir) hd->FileAttr=0x10; else hd->FileAttr=0x20; + } } diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/pathfn.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/pathfn.cpp index 7c254a560..2c444ea25 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/pathfn.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/pathfn.cpp @@ -9,7 +9,7 @@ wchar* GetWideName(const char *Name,const wchar *NameW,wchar *DestW,size_t DestS } else if (Name!=NULL) - CharToWide(Name,DestW,DestSize); + CharToWide(Name,DestW,(int)DestSize); else *DestW=0; diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/rarvm.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/rarvm.cpp index 5afd8b635..11e96adf0 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/rarvm.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/rarvm.cpp @@ -896,6 +896,8 @@ void RarVM::ExecuteStandardFilter(VM_StandardFilters FilterType) { switch(FilterType) { + default: break; + case VMSF_E8: case VMSF_E8E9: { diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/rawread.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/rawread.cpp index 2e8df202e..c9fe9d91c 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/rawread.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/rawread.cpp @@ -20,7 +20,7 @@ size_t RawRead::Read(size_t Size) if (Size!=0) { Data.Add(Size); - ReadSize=SrcFile->Read(&Data[DataSize],Size); + ReadSize=SrcFile->Read(&Data[DataSize],(int)Size); DataSize+=ReadSize; } return ReadSize; diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/unpack.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/unpack.cpp index 8efa1f9e1..4504b1859 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/unpack.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/unpack.cpp @@ -87,6 +87,7 @@ void Unpack::Init(size_t WinSize,bool Solid) byte *NewWindow=Fragmented ? NULL : (byte *)malloc(WinSize); if (NewWindow==NULL) + { if (Grow || WinSize<0x1000000) { // We do not support growth for new fragmented window. @@ -103,6 +104,7 @@ void Unpack::Init(size_t WinSize,bool Solid) FragWindow.Init(WinSize); Fragmented=true; } + } if (!Fragmented) { diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/unpack15.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/unpack15.cpp index 1328de946..16dd55056 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/unpack15.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/unpack15.cpp @@ -295,6 +295,7 @@ void Unpack::LongLZ() OldAvr3=AvrLn3; if (Length!=1 && Length!=4) + { if (Length==0 && Distance <= MaxDist3) { AvrLn3++; @@ -303,6 +304,7 @@ void Unpack::LongLZ() else if (AvrLn3 > 0) AvrLn3--; + } Length+=3; if (Distance >= MaxDist3) Length++; diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/unpack20.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/unpack20.cpp index f0b8e41e7..0f8503a6b 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/unpack20.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/unpack20.cpp @@ -154,11 +154,11 @@ void Unpack::UnpWriteBuf20() if (UnpPtrUnpWrite(&Window[WrPtr],-(int)WrPtr & MaxWinMask); - UnpIO->UnpWrite(Window,UnpPtr); + UnpIO->UnpWrite(Window,(int)UnpPtr); UnpAllBuf=true; } else - UnpIO->UnpWrite(&Window[WrPtr],UnpPtr-WrPtr); + UnpIO->UnpWrite(&Window[WrPtr],(int)(UnpPtr-WrPtr)); WrPtr=UnpPtr; } @@ -254,6 +254,7 @@ bool Unpack::ReadTables20() void Unpack::ReadLastTables() { if (ReadTop>=Inp.InAddr+5) + { if (UnpAudioBlock) { if (DecodeNumber(Inp,&MD[UnpCurChannel])==256) @@ -262,6 +263,7 @@ void Unpack::ReadLastTables() else if (DecodeNumber(Inp,&BlockTables.LD)==269) ReadTables20(); + } } diff --git a/Frameworks/File_Extractor/File_Extractor/unrar/unpack50.cpp b/Frameworks/File_Extractor/File_Extractor/unrar/unpack50.cpp index caa1996e3..abbdb51ff 100644 --- a/Frameworks/File_Extractor/File_Extractor/unrar/unpack50.cpp +++ b/Frameworks/File_Extractor/File_Extractor/unrar/unpack50.cpp @@ -24,8 +24,8 @@ void Unpack::Unpack5(bool Solid) // We use 'while', because for empty block containing only Huffman table, // we'll be on the block border once again just after reading the table. while (Inp.InAddr>BlockHeader.BlockStart+BlockHeader.BlockSize-1 || - Inp.InAddr==BlockHeader.BlockStart+BlockHeader.BlockSize-1 && - Inp.InBit>=BlockHeader.BlockBitSize) + (Inp.InAddr==BlockHeader.BlockStart+BlockHeader.BlockSize-1 && + Inp.InBit>=BlockHeader.BlockBitSize)) { if (BlockHeader.LastBlockInFile) { @@ -124,10 +124,12 @@ void Unpack::Unpack5(bool Solid) if (MainSlot==257) { if (LastLength!=0) + { if (Fragmented) FragWindow.CopyString(LastLength,OldDist[0],UnpPtr,MaxWinMask); else CopyString(LastLength,OldDist[0]); + } continue; } if (MainSlot<262) @@ -380,7 +382,7 @@ void Unpack::UnpWriteBuf() // Choose the nearest among WriteBorder and WrPtr actual written border. // If border is equal to UnpPtr, it means that we have MaxWinSize data ahead. if (WriteBorder==UnpPtr || - WrPtr!=UnpPtr && ((WrPtr-UnpPtr)&MaxWinMask)<((WriteBorder-UnpPtr)&MaxWinMask)) + (WrPtr!=UnpPtr && ((WrPtr-UnpPtr)&MaxWinMask)<((WriteBorder-UnpPtr)&MaxWinMask))) WriteBorder=WrPtr; } @@ -500,7 +502,7 @@ void Unpack::UnpWriteData(byte *Data,size_t Size) int64 LeftToWrite=DestUnpSize-WrittenFileSize; if ((int64)WriteSize>LeftToWrite) WriteSize=(size_t)LeftToWrite; - UnpIO->UnpWrite(Data,WriteSize); + UnpIO->UnpWrite(Data,(int)WriteSize); WrittenFileSize+=Size; } diff --git a/Frameworks/GME/GME.xcodeproj/project.pbxproj b/Frameworks/GME/GME.xcodeproj/project.pbxproj index 4aab1d7d6..b06d35ba1 100644 --- a/Frameworks/GME/GME.xcodeproj/project.pbxproj +++ b/Frameworks/GME/GME.xcodeproj/project.pbxproj @@ -401,6 +401,7 @@ 17C8F1ED0CBED286008D969D /* Ym2413_Emu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Ym2413_Emu.h; path = gme/Ym2413_Emu.h; sourceTree = ""; }; 17C8F1EE0CBED286008D969D /* Ym2612_Emu.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = Ym2612_Emu.cpp; path = gme/Ym2612_Emu.cpp; sourceTree = ""; }; 17C8F1EF0CBED286008D969D /* Ym2612_Emu.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Ym2612_Emu.h; path = gme/Ym2612_Emu.h; sourceTree = ""; }; + 833F68361CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 8370B68D17F615FD001A4D7A /* Ay_Core.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Ay_Core.cpp; path = gme/Ay_Core.cpp; sourceTree = ""; }; 8370B68E17F615FD001A4D7A /* Ay_Core.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Ay_Core.h; path = gme/Ay_Core.h; sourceTree = ""; }; 8370B68F17F615FD001A4D7A /* blargg_common.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = blargg_common.cpp; path = gme/blargg_common.cpp; sourceTree = ""; }; @@ -1272,7 +1273,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "GME" */; compatibilityVersion = "Xcode 3.2"; @@ -1280,6 +1281,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* GME */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -1462,6 +1464,7 @@ isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, + 833F68361CDBCAB200AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -1493,6 +1496,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.gme; PRODUCT_NAME = GME; SDKROOT = macosx; SHARED_PRECOMPS_DIR = ""; @@ -1524,6 +1528,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR = NO; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.gme; PRODUCT_NAME = GME; SDKROOT = macosx; SHARED_PRECOMPS_DIR = ""; @@ -1536,6 +1541,7 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/Frameworks/GME/Info.plist b/Frameworks/GME/Info.plist index c8cb37d96..5c18bd9f9 100644 --- a/Frameworks/GME/Info.plist +++ b/Frameworks/GME/Info.plist @@ -6,14 +6,14 @@ English CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} CFBundleIconFile CFBundleIdentifier - org.cogx.lib.gme + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleSignature diff --git a/Frameworks/GME/es.lproj/InfoPlist.strings b/Frameworks/GME/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..948e12b991d433e9dc3ebc46350cb859c5bc1e07 GIT binary patch literal 204 zcmW-a%?`m}5Jk`0Q#6*1sMuJDl?@3NJb)A}LVwaCsWCFBundleIconFile CFBundleIdentifier - net.kode54.highlyadvanced + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/HighlyAdvanced/HighlyAdvanced/es.lproj/InfoPlist.strings b/Frameworks/HighlyAdvanced/HighlyAdvanced/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/HighlyAdvanced/HighlyAdvanced/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj/project.pbxproj b/Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj/project.pbxproj index 223ba45c9..1727bc872 100644 --- a/Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj/project.pbxproj +++ b/Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj/project.pbxproj @@ -28,6 +28,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 833F682B1CDBCAB000AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 8360EF1017F92C91005208A4 /* HighlyExperimental.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HighlyExperimental.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8360EF1B17F92C91005208A4 /* HighlyExperimental-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HighlyExperimental-Info.plist"; sourceTree = ""; }; 8360EF1D17F92C91005208A4 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -173,7 +174,7 @@ 8360EF0717F92C91005208A4 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Christopher Snowhill"; }; buildConfigurationList = 8360EF0A17F92C91005208A4 /* Build configuration list for PBXProject "HighlyExperimental" */; @@ -182,6 +183,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 8360EF0617F92C91005208A4; productRefGroup = 8360EF1117F92C91005208A4 /* Products */; @@ -227,6 +229,7 @@ isa = PBXVariantGroup; children = ( 8360EF1D17F92C91005208A4 /* en */, + 833F682B1CDBCAB000AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -250,6 +253,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -319,6 +323,7 @@ ); INFOPLIST_FILE = "HighlyExperimental/HighlyExperimental-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.highlyexperimental; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; @@ -342,6 +347,7 @@ ); INFOPLIST_FILE = "HighlyExperimental/HighlyExperimental-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.highlyexperimental; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; WRAPPER_EXTENSION = framework; diff --git a/Frameworks/HighlyExperimental/HighlyExperimental/HighlyExperimental-Info.plist b/Frameworks/HighlyExperimental/HighlyExperimental/HighlyExperimental-Info.plist index 201cbbaa1..d621f5f87 100644 --- a/Frameworks/HighlyExperimental/HighlyExperimental/HighlyExperimental-Info.plist +++ b/Frameworks/HighlyExperimental/HighlyExperimental/HighlyExperimental-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - net.kode54.highlyexperimental + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/HighlyExperimental/HighlyExperimental/es.lproj/InfoPlist.strings b/Frameworks/HighlyExperimental/HighlyExperimental/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/HighlyExperimental/HighlyExperimental/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj b/Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj index 62eceebaa..2b243ae7e 100644 --- a/Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj +++ b/Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj @@ -20,6 +20,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 833F682E1CDBCAB100AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 834378DE17F96E2600584396 /* HighlyQuixotic.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HighlyQuixotic.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 834378E917F96E2600584396 /* HighlyQuixotic-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HighlyQuixotic-Info.plist"; sourceTree = ""; }; 834378EB17F96E2600584396 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -145,7 +146,7 @@ 834378D517F96E2600584396 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Christopher Snowhill"; }; buildConfigurationList = 834378D817F96E2600584396 /* Build configuration list for PBXProject "HighlyQuixotic" */; @@ -154,6 +155,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 834378D417F96E2600584396; productRefGroup = 834378DF17F96E2600584396 /* Products */; @@ -195,6 +197,7 @@ isa = PBXVariantGroup; children = ( 834378EB17F96E2600584396 /* en */, + 833F682E1CDBCAB100AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -218,6 +221,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -290,6 +294,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = NO; INFOPLIST_FILE = "HighlyQuixotic/HighlyQuixotic-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.highlyquixotic; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; WRAPPER_EXTENSION = framework; @@ -306,6 +311,7 @@ GCC_PRECOMPILE_PREFIX_HEADER = NO; INFOPLIST_FILE = "HighlyQuixotic/HighlyQuixotic-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.highlyquixotic; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; WRAPPER_EXTENSION = framework; diff --git a/Frameworks/HighlyQuixotic/HighlyQuixotic/HighlyQuixotic-Info.plist b/Frameworks/HighlyQuixotic/HighlyQuixotic/HighlyQuixotic-Info.plist index ee45d0730..d621f5f87 100644 --- a/Frameworks/HighlyQuixotic/HighlyQuixotic/HighlyQuixotic-Info.plist +++ b/Frameworks/HighlyQuixotic/HighlyQuixotic/HighlyQuixotic-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - net.kode54.highlyquixotic + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/HighlyQuixotic/HighlyQuixotic/es.lproj/InfoPlist.strings b/Frameworks/HighlyQuixotic/HighlyQuixotic/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/HighlyQuixotic/HighlyQuixotic/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/HighlyTheoretical/HighlyTheoretical.xcodeproj/project.pbxproj b/Frameworks/HighlyTheoretical/HighlyTheoretical.xcodeproj/project.pbxproj index 4df5f4fb0..797c36cdf 100644 --- a/Frameworks/HighlyTheoretical/HighlyTheoretical.xcodeproj/project.pbxproj +++ b/Frameworks/HighlyTheoretical/HighlyTheoretical.xcodeproj/project.pbxproj @@ -29,6 +29,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 833F682D1CDBCAB000AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 8343786E17F9658E00584396 /* HighlyTheoretical.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HighlyTheoretical.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8343787917F9658E00584396 /* HighlyTheoretical-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HighlyTheoretical-Info.plist"; sourceTree = ""; }; 8343787B17F9658E00584396 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -187,7 +188,7 @@ 8343786517F9658E00584396 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Christopher Snowhill"; }; buildConfigurationList = 8343786817F9658E00584396 /* Build configuration list for PBXProject "HighlyTheoretical" */; @@ -196,6 +197,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 8343786417F9658E00584396; productRefGroup = 8343786F17F9658E00584396 /* Products */; @@ -240,6 +242,7 @@ isa = PBXVariantGroup; children = ( 8343787B17F9658E00584396 /* en */, + 833F682D1CDBCAB000AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -263,6 +266,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -340,6 +344,7 @@ INFOPLIST_FILE = "HighlyTheoretical/HighlyTheoretical-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.highlytheoretical; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -358,6 +363,7 @@ INFOPLIST_FILE = "HighlyTheoretical/HighlyTheoretical-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.6; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.highlytheoretical; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; diff --git a/Frameworks/HighlyTheoretical/HighlyTheoretical/HighlyTheoretical-Info.plist b/Frameworks/HighlyTheoretical/HighlyTheoretical/HighlyTheoretical-Info.plist index 6a399e65b..d621f5f87 100644 --- a/Frameworks/HighlyTheoretical/HighlyTheoretical/HighlyTheoretical-Info.plist +++ b/Frameworks/HighlyTheoretical/HighlyTheoretical/HighlyTheoretical-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - net.kode54.highlytheoretical + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/HighlyTheoretical/HighlyTheoretical/es.lproj/InfoPlist.strings b/Frameworks/HighlyTheoretical/HighlyTheoretical/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/HighlyTheoretical/HighlyTheoretical/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj b/Frameworks/HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj index e35dd0c71..22540142c 100644 --- a/Frameworks/HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj +++ b/Frameworks/HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 833F68481CDBCABF00AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 836FB556182053D700B3AD2D /* HivelyPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = HivelyPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 836FB561182053D700B3AD2D /* HivelyPlayer-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HivelyPlayer-Info.plist"; sourceTree = ""; }; 836FB563182053D700B3AD2D /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; @@ -127,7 +128,7 @@ 836FB54D182053D700B3AD2D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Christopher Snowhill"; }; buildConfigurationList = 836FB550182053D700B3AD2D /* Build configuration list for PBXProject "HivelyPlayer" */; @@ -136,6 +137,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 836FB54C182053D700B3AD2D; productRefGroup = 836FB557182053D700B3AD2D /* Products */; @@ -175,6 +177,7 @@ isa = PBXVariantGroup; children = ( 836FB563182053D700B3AD2D /* en */, + 833F68481CDBCABF00AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -198,6 +201,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -261,6 +265,7 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "HivelyPlayer/HivelyPlayer-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.hivelyplayer; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; WRAPPER_EXTENSION = framework; @@ -277,6 +282,7 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "HivelyPlayer/HivelyPlayer-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.hivelyplayer; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; WRAPPER_EXTENSION = framework; diff --git a/Frameworks/HivelyPlayer/HivelyPlayer/HivelyPlayer-Info.plist b/Frameworks/HivelyPlayer/HivelyPlayer/HivelyPlayer-Info.plist index 02410e2cd..d621f5f87 100644 --- a/Frameworks/HivelyPlayer/HivelyPlayer/HivelyPlayer-Info.plist +++ b/Frameworks/HivelyPlayer/HivelyPlayer/HivelyPlayer-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - net.kode54.hivelyplayer + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/HivelyPlayer/HivelyPlayer/blip_buf.c b/Frameworks/HivelyPlayer/HivelyPlayer/blip_buf.c index ffa9582f5..97d00ba3d 100644 --- a/Frameworks/HivelyPlayer/HivelyPlayer/blip_buf.c +++ b/Frameworks/HivelyPlayer/HivelyPlayer/blip_buf.c @@ -170,7 +170,7 @@ int hvl_blip_clocks_needed( const hvl_blip_t* m, int samples ) if ( needed < m->offset ) return 0; - return (needed - m->offset + m->factor - 1) / m->factor; + return (int)((needed - m->offset + m->factor - 1) / m->factor); } void hvl_blip_end_frame( hvl_blip_t* m, unsigned t ) @@ -213,7 +213,7 @@ int hvl_blip_read_samples( hvl_blip_t* m, int out [], int count, int gain ) do { /* Eliminate fraction */ - int s = ARITH_SHIFT( sum, delta_bits ); + int s = (int) ARITH_SHIFT( sum, delta_bits ); sum += *in++; diff --git a/Frameworks/HivelyPlayer/HivelyPlayer/es.lproj/InfoPlist.strings b/Frameworks/HivelyPlayer/HivelyPlayer/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/HivelyPlayer/HivelyPlayer/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/HivelyPlayer/HivelyPlayer/hvl_replay.c b/Frameworks/HivelyPlayer/HivelyPlayer/hvl_replay.c index ee5031c70..9db18a3ac 100644 --- a/Frameworks/HivelyPlayer/HivelyPlayer/hvl_replay.c +++ b/Frameworks/HivelyPlayer/HivelyPlayer/hvl_replay.c @@ -121,7 +121,7 @@ static int32 clipshifted8(int32 in) { int16 top = (int16)(in >> 16); if (top > 127) in = 127 << 16; - else if (top < -128) in = -128 << 16; + else if (top < -128) in = -128 * (1 << 16); return in; } @@ -314,10 +314,10 @@ void hvl_InitReplayer( void ) hvl_GenFilterWaves( &waves[WO_TRIANGLE_04], &waves[WO_LOWPASSES], &waves[WO_HIGHPASSES] ); } -struct hvl_tune *hvl_load_ahx( uint8 *buf, uint32 buflen, uint32 defstereo, uint32 freq ) +struct hvl_tune *hvl_load_ahx( const uint8 *buf, uint32 buflen, uint32 defstereo, uint32 freq ) { - uint8 *bptr; - TEXT *nptr; + const uint8 *bptr; + const TEXT *nptr; uint32 i, j, k, l, posn, insn, ssn, hs, trkn, trkl; struct hvl_tune *ht; struct hvl_plsentry *ple; @@ -406,12 +406,12 @@ struct hvl_tune *hvl_load_ahx( uint8 *buf, uint32 buflen, uint32 defstereo, uint } bptr = &buf[(buf[4]<<8)|buf[5]]; - i = min( 128, buf + buflen - bptr ); + i = min( 128, (uint32) (buf + buflen - bptr) ); strncpy( ht->ht_Name, (TEXT *)bptr, i ); if ( i < 128 ) ht->ht_Name[ i ] = 0; nptr = (TEXT *)bptr+strlen( ht->ht_Name )+1; - if ( nptr > buf + buflen ) + if ( (uint8*) nptr > buf + buflen ) { free( ht ); return NULL; @@ -541,10 +541,9 @@ struct hvl_tune *hvl_load_ahx( uint8 *buf, uint32 buflen, uint32 defstereo, uint struct hvl_tune *hvl_LoadTune( const uint8 *buf, uint32 buflen, uint32 freq, uint32 defstereo ) { struct hvl_tune *ht; - uint8 *bptr; - TEXT *nptr; + const uint8 *bptr; + const TEXT *nptr; uint32 i, j, posn, insn, ssn, chnn, hs, trkl, trkn; - FILE *fh; struct hvl_plsentry *ple; if ( !buf || buflen < 4 ) @@ -670,12 +669,12 @@ struct hvl_tune *hvl_LoadTune( const uint8 *buf, uint32 buflen, uint32 freq, uin free( ht ); return NULL; } - i = min( 128, buf + buflen - bptr ); + i = min( 128, (uint32) (buf + buflen - bptr) ); strncpy( ht->ht_Name, (TEXT *)bptr, i ); if ( i < 128 ) ht->ht_Name[ i ] = 0; nptr = (TEXT *)bptr+strlen( ht->ht_Name )+1; - if ( nptr > buf + buflen ) + if ( (uint8 *)nptr > buf + buflen ) { free( ht ); return NULL; @@ -1884,7 +1883,7 @@ void hvl_mixchunk( struct hvl_tune *ht, uint32 samples, int8 *buf1, int8 *buf2, int32 vol[MAX_CHANNELS]; uint32 pos[MAX_CHANNELS]; uint32 rpos[MAX_CHANNELS]; - uint32 cnt; + // uint32 cnt; int32 panl[MAX_CHANNELS]; int32 panr[MAX_CHANNELS]; // uint32 vu[MAX_CHANNELS]; diff --git a/Frameworks/MPCDec/Files/src/huffman-bcl.c b/Frameworks/MPCDec/Files/src/huffman-bcl.c index c36eb52b5..cb710f94f 100755 --- a/Frameworks/MPCDec/Files/src/huffman-bcl.c +++ b/Frameworks/MPCDec/Files/src/huffman-bcl.c @@ -218,7 +218,7 @@ void _Huffman_PrintCodes(huff_sym_t * sym, unsigned int num_symbols, int print_t qsort(sym, num_symbols, sizeof(huff_sym_t), (int (*)(const void *, const void *)) _Huffman_CompBits); printf("{\n "); - for( i = num_symbols - 1; i >= 0; i--) { + for( i = num_symbols - 1; i != ~0; i--) { printf("{0x%.8x, %u, %i}", sym[i].Code << (32 - sym[i].Bits), sym[i].Bits, sym[i].Symbol - offset); if (i != 0) printf(", "); @@ -229,7 +229,7 @@ void _Huffman_PrintCodes(huff_sym_t * sym, unsigned int num_symbols, int print_t qsort(sym, num_symbols, sizeof(huff_sym_t), (int (*)(const void *, const void *)) _Huffman_CompBits); printf("{\n "); - for( i = num_symbols - 1; i >= 0; i--) { + for( i = num_symbols - 1; i != ~0; i--) { int symbol = sym[i].Symbol; packs[3] = symbol / (offset * offset * offset); packs[2] = (symbol - packs[3] * offset * offset * offset) / (offset * offset); diff --git a/Frameworks/MPCDec/Files/src/mpc_demux.c b/Frameworks/MPCDec/Files/src/mpc_demux.c index 0882c0d38..bf5e1b2b4 100755 --- a/Frameworks/MPCDec/Files/src/mpc_demux.c +++ b/Frameworks/MPCDec/Files/src/mpc_demux.c @@ -109,8 +109,8 @@ mpc_demux_fill(mpc_demux * d, mpc_uint32_t min_bytes, int flags) mpc_uint32_t bytesread; if (flags & MPC_BUFFER_SWAP) { - bytes2read &= -1 << 2; - offset = (unread_bytes + 3) & ( -1 << 2); + bytes2read &= -1 * (1 << 2); + offset = (unread_bytes + 3) & ( -1 * (1 << 2)); offset -= unread_bytes; } @@ -162,7 +162,7 @@ mpc_demux_seek(mpc_demux * d, mpc_seek_t fpos, mpc_uint32_t min_bytes) { } else { mpc_seek_t next_pos = fpos >> 3; if (d->si.stream_version == 7) - next_pos = ((next_pos - d->si.header_position) & (-1 << 2)) + d->si.header_position; + next_pos = ((next_pos - d->si.header_position) & (-1 * (1 << 2))) + d->si.header_position; bit_offset = (int) (fpos - (next_pos << 3)); mpc_demux_clear_buff(d); @@ -312,7 +312,7 @@ static mpc_status mpc_demux_ST(mpc_demux * d) for (i = 2; i < file_table_size; i++) { int code = mpc_bits_golomb_dec(&r, 12); if (code & 1) - code = -(code & (-1 << 1)); + code = -(code & (-1 * (1 << 1))); code <<= 2; last[i & 1] = code + 2 * last[(i-1) & 1] - last[i & 1]; if ((i & mask) == 0) diff --git a/Frameworks/MPCDec/Files/src/tags.c b/Frameworks/MPCDec/Files/src/tags.c index c843cc9e4..d8eb13014 100755 --- a/Frameworks/MPCDec/Files/src/tags.c +++ b/Frameworks/MPCDec/Files/src/tags.c @@ -1084,6 +1084,7 @@ CopyTags_APE ( FILE* fp ) */ +#if 0 static const char* const parser_strings [] = { "/A_Tx", "/A/Tx", @@ -1098,6 +1099,7 @@ static const char* const parser_strings [] = { "/A/C N_0x", "/A/C_0x", }; +#endif /* * dst[0] = Artist diff --git a/Frameworks/MPCDec/Info.plist b/Frameworks/MPCDec/Info.plist index 5426cf3f9..5c18bd9f9 100644 --- a/Frameworks/MPCDec/Info.plist +++ b/Frameworks/MPCDec/Info.plist @@ -6,14 +6,14 @@ English CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} CFBundleIconFile CFBundleIdentifier - org.cogx.lib.mpcdec + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleSignature diff --git a/Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj b/Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj index ca274849a..803c86ffe 100644 --- a/Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj +++ b/Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj @@ -37,6 +37,7 @@ /* Begin PBXFileReference section */ 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 833F683F1CDBCAB300AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 83A16EED19F48A2E00842DBC /* huffman.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = huffman.c; path = Files/src/huffman.c; sourceTree = ""; }; 83A16EEE19F48A2E00842DBC /* mpc_bits_reader.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mpc_bits_reader.c; path = Files/src/mpc_bits_reader.c; sourceTree = ""; }; 83A16EEF19F48A2E00842DBC /* mpc_demux.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = mpc_demux.c; path = Files/src/mpc_demux.c; sourceTree = ""; }; @@ -228,7 +229,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "MPCDec" */; compatibilityVersion = "Xcode 3.2"; @@ -236,6 +237,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* MPCDec */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -285,6 +287,7 @@ isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, + 833F683F1CDBCAB300AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -309,6 +312,7 @@ HEADER_SEARCH_PATHS = Files/include/; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.mpcdec; PRODUCT_NAME = mpcdec; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -330,6 +334,7 @@ GCC_PREFIX_HEADER = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.mpcdec; PRODUCT_NAME = mpcdec; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -341,6 +346,7 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/Frameworks/MPCDec/es.lproj/InfoPlist.strings b/Frameworks/MPCDec/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..7080cf949924e8817cb2121399f078b287079883 GIT binary patch literal 204 zcmW-ZOAf&R6h+Utt7r@xK@3d9$bMd*s%ZBv=Kme5Fyy^_xDn;J8+CjLwb{$gz->i_@% literal 0 HcmV?d00001 diff --git a/Frameworks/NDHotKey/NDHotKey.xcodeproj/project.pbxproj b/Frameworks/NDHotKey/NDHotKey.xcodeproj/project.pbxproj index 1dae7df33..0b5f49113 100644 --- a/Frameworks/NDHotKey/NDHotKey.xcodeproj/project.pbxproj +++ b/Frameworks/NDHotKey/NDHotKey.xcodeproj/project.pbxproj @@ -34,6 +34,7 @@ 32F1617814E6BBFC00D6AB2F /* NDKeyboardLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NDKeyboardLayout.h; sourceTree = ""; }; 32F1617914E6BBFC00D6AB2F /* NDKeyboardLayout.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NDKeyboardLayout.m; sourceTree = ""; }; 32F1618D14E6BE7300D6AB2F /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = System/Library/Frameworks/Carbon.framework; sourceTree = SDKROOT; }; + 833F681D1CDBCAA700AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -150,7 +151,7 @@ 32F1614C14E6BB3B00D6AB2F /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "dmitry.promsky@gmail.com"; }; buildConfigurationList = 32F1614F14E6BB3B00D6AB2F /* Build configuration list for PBXProject "NDHotKey" */; @@ -159,6 +160,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 32F1614A14E6BB3B00D6AB2F; productRefGroup = 32F1615714E6BB3B00D6AB2F /* Products */; @@ -199,6 +201,7 @@ isa = PBXVariantGroup; children = ( 32F1616314E6BB3B00D6AB2F /* en */, + 833F681D1CDBCAA700AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -210,16 +213,21 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + 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_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", @@ -245,17 +253,21 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + 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"; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_ENABLE_OBJC_EXCEPTIONS = YES; + GCC_NO_COMMON_BLOCKS = YES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; @@ -281,6 +293,7 @@ GCC_PREFIX_HEADER = "NDHotKey/NDHotKey-Prefix.pch"; INFOPLIST_FILE = "NDHotKey/NDHotKey-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "ND.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -299,6 +312,7 @@ GCC_PREFIX_HEADER = "NDHotKey/NDHotKey-Prefix.pch"; INFOPLIST_FILE = "NDHotKey/NDHotKey-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "ND.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; diff --git a/Frameworks/NDHotKey/NDHotKey/NDHotKey-Info.plist b/Frameworks/NDHotKey/NDHotKey/NDHotKey-Info.plist index d781b0062..e8a6fe741 100644 --- a/Frameworks/NDHotKey/NDHotKey/NDHotKey-Info.plist +++ b/Frameworks/NDHotKey/NDHotKey/NDHotKey-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - ND.${PRODUCT_NAME:rfc1034identifier} + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m b/Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m index 6e2761831..dc5f6182c 100644 --- a/Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m +++ b/Frameworks/NDHotKey/NDHotKey/NDHotKeyEvent.m @@ -89,17 +89,21 @@ static NSString * describeHashFunction( NSHashTable * aTable, const void * aHotK static UInt32 _idForCharacterAndModifer( unichar aCharacter, NSUInteger aModFlags ) { return (UInt32)aCharacter | (UInt32)(aModFlags<<16); } +#if 0 static void _getCharacterAndModiferForId( UInt32 anId, unichar *aCharacter, NSUInteger *aModFlags ) { *aModFlags = anId>>16; *aCharacter = anId&0xFFFF; } +#endif +#ifndef NDMapTableClassDefined struct HotKeyMappingEntry { UInt32 hotKeyId; NDHotKeyEvent * hotKeyEvent; }; +#endif + (BOOL)install { @@ -115,7 +119,7 @@ struct HotKeyMappingEntry NDHotKeyEventLock; if( theHotKeyEvents != nil && hotKeysEventHandler == NULL ) { - if( InstallEventHandler( GetEventDispatcherTarget(), NewEventHandlerUPP((EventHandlerProcPtr)eventHandlerCallback), 2, theTypeSpec, theHotKeyEvents, &hotKeysEventHandler ) != noErr ) + if( InstallEventHandler( GetEventDispatcherTarget(), NewEventHandlerUPP((EventHandlerProcPtr)eventHandlerCallback), 2, theTypeSpec, (__bridge void *)(theHotKeyEvents), &hotKeysEventHandler ) != noErr ) NSLog(@"Could not install Event handler"); } NDHotKeyEventUnlock; @@ -268,37 +272,37 @@ struct HotKeyMappingEntry + (id)hotKeyWithEvent:(NSEvent *)anEvent { - return [[[self alloc] initWithEvent:anEvent] autorelease]; + return [[self alloc] initWithEvent:anEvent]; } + (id)hotKeyWithEvent:(NSEvent *)anEvent target:(id)aTarget selector:(SEL)aSelector { - return [[[self alloc] initWithEvent:anEvent target:aTarget selector:aSelector] autorelease]; + return [[self alloc] initWithEvent:anEvent target:aTarget selector:aSelector]; } + (id)hotKeyWithKeyCharacter:(unichar)aKeyCharacter modifierFlags:(NSUInteger)aModifierFlags { - return [[[self alloc] initWithKeyCharacter:aKeyCharacter modifierFlags:aModifierFlags target:nil selector:(SEL)0] autorelease]; + return [[self alloc] initWithKeyCharacter:aKeyCharacter modifierFlags:aModifierFlags target:nil selector:(SEL)0]; } + (id)hotKeyWithKeyCode:(UInt16)aKeyCode modifierFlags:(NSUInteger)aModifierFlags { - return [[[self alloc] initWithKeyCode:aKeyCode modifierFlags:aModifierFlags target:nil selector:(SEL)0] autorelease]; + return [[self alloc] initWithKeyCode:aKeyCode modifierFlags:aModifierFlags target:nil selector:(SEL)0]; } + (id)hotKeyWithKeyCharacter:(unichar)aKeyCharacter modifierFlags:(NSUInteger)aModifierFlags target:(id)aTarget selector:(SEL)aSelector { - return [[[self alloc] initWithKeyCharacter:aKeyCharacter modifierFlags:aModifierFlags target:aTarget selector:aSelector] autorelease]; + return [[self alloc] initWithKeyCharacter:aKeyCharacter modifierFlags:aModifierFlags target:aTarget selector:aSelector]; } + (id)hotKeyWithKeyCode:(UInt16)aKeyCode modifierFlags:(NSUInteger)aModifierFlags target:(id)aTarget selector:(SEL)aSelector { - return [[[self alloc] initWithKeyCode:aKeyCode modifierFlags:aModifierFlags target:aTarget selector:aSelector] autorelease]; + return [[self alloc] initWithKeyCode:aKeyCode modifierFlags:aModifierFlags target:aTarget selector:aSelector]; } + (id)hotKeyWithWithPropertyList:(id)aPropertyList { - return [[[self alloc] initWithPropertyList:aPropertyList] autorelease]; + return [[self alloc] initWithPropertyList:aPropertyList]; } + (NSString *)description @@ -325,7 +329,7 @@ struct HotKeyMappingEntry #pragma mark - creation and destruction - (id)init { - [self release]; + self = nil; NSAssert( NO, @"You can not initialize a Hot Key with the init method" ); return nil; } @@ -373,7 +377,7 @@ struct HotKeyMappingEntry [self addHotKey]; } else - [self release], self = nil; + self = nil; return self; } @@ -456,7 +460,7 @@ struct HotKeyMappingEntry } } else - [self release], self = nil; + self = nil; return self; } @@ -471,52 +475,30 @@ struct HotKeyMappingEntry nil]; } -- (oneway void)release -{ - /* - * We need to remove the hot key from the hash table before it's retain count reaches zero - */ - if( [self retainCount] == 1 ) - { -#ifdef NDMapTableClassDefined - NSMapTable * theAllHotKeyEvents = [NDHotKeyEvent allHotKeyEvents]; -#else - NSHashTable * theAllHotKeyEvents = [NDHotKeyEvent allHotKeyEvents]; -#endif - if( theAllHotKeyEvents ) - { -#ifndef NDMapTableClassDefined - struct HotKeyMappingEntry theDummyEntry = {[self hotKeyId],nil}; -#endif - NDHotKeyEventLock; - if( [self retainCount] == 1 ) // check again because it might have changed - { - switchHotKey( self, NO ); -#ifdef NDMapTableClassDefined - [theAllHotKeyEvents removeObjectForKey:[NSNumber numberWithUnsignedInt:[self hotKeyId]]]; -#else - id theHotKeyEvent = NSHashGet( theAllHotKeyEvents, (void*)&theDummyEntry ); - if( theHotKeyEvent ) - NSHashRemove( theAllHotKeyEvents, theHotKeyEvent ); -#endif - } - NDHotKeyEventUnlock; - } - } - [super release]; -} - -#if 0 - (void)dealloc { - if( reference ) - { - if( UnregisterEventHotKey( reference ) != noErr ) // in lock from release - NSLog( @"Failed to unregister hot key %@", self ); - } - [super dealloc]; -} +#ifdef NDMapTableClassDefined + NSMapTable * theAllHotKeyEvents = [NDHotKeyEvent allHotKeyEvents]; +#else + NSHashTable * theAllHotKeyEvents = [NDHotKeyEvent allHotKeyEvents]; #endif + if( theAllHotKeyEvents ) + { +#ifndef NDMapTableClassDefined + struct HotKeyMappingEntry theDummyEntry = {[self hotKeyId],nil}; +#endif + NDHotKeyEventLock; + switchHotKey( self, NO ); +#ifdef NDMapTableClassDefined + [theAllHotKeyEvents removeObjectForKey:[NSNumber numberWithUnsignedInt:[self hotKeyId]]]; +#else + id theHotKeyEvent = NSHashGet( theAllHotKeyEvents, (void*)&theDummyEntry ); + if( theHotKeyEvent ) + NSHashRemove( theAllHotKeyEvents, theHotKeyEvent ); +#endif + NDHotKeyEventUnlock; + } +} - (BOOL)setEnabled:(BOOL)aFlag { @@ -581,8 +563,8 @@ struct HotKeyMappingEntry selectorPressed = aSelectorPressed; #ifdef NS_BLOCKS_AVAILABLE - [releasedBlock release], releasedBlock = nil; - [pressedBlock release], pressedBlock = nil; + releasedBlock = nil; + pressedBlock = nil; #endif return theResult; // was change succesful @@ -596,10 +578,10 @@ struct HotKeyMappingEntry if( ![target respondsToSelector:@selector(targetWillChangeToObject:forHotKeyEvent:)] || [target targetWillChangeToObject:nil forHotKeyEvent:self] ) { if( releasedBlock != aReleasedBlock ) - [releasedBlock release], releasedBlock = [aReleasedBlock copy]; + releasedBlock = [aReleasedBlock copy]; if( pressedBlock != aPressedBlock ) - [pressedBlock release], pressedBlock = [aPressedBlock copy]; + pressedBlock = [aPressedBlock copy]; selectorReleased = (SEL)0; selectorPressed = (SEL)0; @@ -902,7 +884,7 @@ static OSStatus switchHotKey( NDHotKeyEvent * self, BOOL aFlag ) */ + (id)hotKeyWithKeyCode:(UInt16)aKeyCode character:(unichar)aChar modifierFlags:(NSUInteger)aModifierFlags target:(id)aTarget selector:(SEL)aSelector { - return [[[self alloc] initWithKeyCode:aKeyCode modifierFlags:aModifierFlags target:aTarget selector:aSelector] autorelease]; + return [[self alloc] initWithKeyCode:aKeyCode modifierFlags:aModifierFlags target:aTarget selector:aSelector]; } /* diff --git a/Frameworks/NDHotKey/NDHotKey/NDKeyboardLayout.m b/Frameworks/NDHotKey/NDHotKey/NDKeyboardLayout.m index 6ef63eda3..fe5dd7928 100644 --- a/Frameworks/NDHotKey/NDHotKey/NDKeyboardLayout.m +++ b/Frameworks/NDHotKey/NDHotKey/NDKeyboardLayout.m @@ -318,8 +318,8 @@ static volatile NDKeyboardLayout * kCurrentKeyboardLayout = nil; static void NDKeyboardLayoutNotificationCallback( CFNotificationCenterRef aCenter, void * self, CFStringRef aName, const void * anObj, CFDictionaryRef aUserInfo ) { NSDictionary * theUserInfo = [NSDictionary dictionaryWithObject:kCurrentKeyboardLayout forKey:NDKeyboardLayoutPreviousKeyboardLayoutUserInfoKey]; - @synchronized(self) { [kCurrentKeyboardLayout release], kCurrentKeyboardLayout = nil; } - [[NSNotificationCenter defaultCenter] postNotificationName:NDKeyboardLayoutSelectedKeyboardInputSourceChangedNotification object:self userInfo:theUserInfo]; + @synchronized(self) { kCurrentKeyboardLayout = nil; } + [[NSNotificationCenter defaultCenter] postNotificationName:NDKeyboardLayoutSelectedKeyboardInputSourceChangedNotification object:(__bridge id _Nullable)(self) userInfo:theUserInfo]; } + (void)initialize @@ -364,22 +364,21 @@ static void NDKeyboardLayoutNotificationCallback( CFNotificationCenterRef aCente - (id)init { - [self release]; - return [[NDKeyboardLayout keyboardLayout] retain]; + return [NDKeyboardLayout keyboardLayout]; } -- (id)initWithLanguage:(NSString *)aLangauge { return [self initWithInputSource:TISCopyInputSourceForLanguage((CFStringRef)aLangauge)]; } +- (id)initWithLanguage:(NSString *)aLangauge { return [self initWithInputSource:TISCopyInputSourceForLanguage((__bridge CFStringRef)aLangauge)]; } - (id)initWithInputSource:(TISInputSourceRef)aSource { if( (self = [super init]) != nil ) { - if( aSource != NULL && (keyboardLayoutData = (CFDataRef)CFMakeCollectable(TISGetInputSourceProperty(aSource, kTISPropertyUnicodeKeyLayoutData))) != nil ) + if( aSource != NULL && (keyboardLayoutData = (CFDataRef)TISGetInputSourceProperty(aSource, kTISPropertyUnicodeKeyLayoutData)) != nil ) { CFRetain( keyboardLayoutData ); } else - self = nil, [self release]; + self = nil; } return self; } @@ -390,7 +389,6 @@ static void NDKeyboardLayoutNotificationCallback( CFNotificationCenterRef aCente free( (void*)mappings ); if( keyboardLayoutData != NULL ) CFRelease( keyboardLayoutData ); - [super dealloc]; } - (NSString*)stringForCharacter:(unichar)aCharacter modifierFlags:(UInt32)aModifierFlags diff --git a/Frameworks/NDHotKey/NDHotKey/es.lproj/InfoPlist.strings b/Frameworks/NDHotKey/NDHotKey/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/NDHotKey/NDHotKey/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/Ogg/macosx/Info.plist b/Frameworks/Ogg/macosx/Info.plist index d07545652..39c39adaf 100644 --- a/Frameworks/Ogg/macosx/Info.plist +++ b/Frameworks/Ogg/macosx/Info.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - org.xiph.ogg + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType @@ -22,9 +22,9 @@ ???? CFBundleVersion 1.1.4 - NSHumanReadableCopyright - Ogg framework 1.1.4, Copyright © 1994-2009 Xiph.Org Foundation CSResourcesFileMapped + NSHumanReadableCopyright + Ogg framework 1.1.4, Copyright © 1994-2009 Xiph.Org Foundation diff --git a/Frameworks/Ogg/macosx/Ogg.xcodeproj/project.pbxproj b/Frameworks/Ogg/macosx/Ogg.xcodeproj/project.pbxproj index 24158ff72..3124ea60f 100644 --- a/Frameworks/Ogg/macosx/Ogg.xcodeproj/project.pbxproj +++ b/Frameworks/Ogg/macosx/Ogg.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -25,6 +25,7 @@ 730F236509181ABE00AB638C /* ogg.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ogg.h; path = ../include/ogg/ogg.h; sourceTree = SOURCE_ROOT; }; 730F236609181ABE00AB638C /* os_types.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = os_types.h; path = ../include/ogg/os_types.h; sourceTree = SOURCE_ROOT; }; 734FB2E50B18B33E00D561D7 /* libogg.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libogg.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 833F683C1CDBCAB300AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8D07F2C80486CC7A007CD1D0 /* Ogg.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Ogg.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -169,13 +170,15 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { + LastUpgradeCheck = 0730; }; buildConfigurationList = 730F235809181A3A00AB638C /* Build configuration list for PBXProject "Ogg" */; - compatibilityVersion = "Xcode 2.4"; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 1; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* Ogg */; productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */; @@ -235,6 +238,7 @@ isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, + 833F683C1CDBCAB300AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -245,6 +249,7 @@ 730F235509181A3A00AB638C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -257,6 +262,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_BUNDLE_IDENTIFIER = org.xiph.ogg; PRODUCT_NAME = Ogg; SDKROOT = macosx; WRAPPER_EXTENSION = framework; @@ -267,8 +273,8 @@ 730F235609181A3A00AB638C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; CODE_SIGN_IDENTITY = "Developer ID Application"; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -280,6 +286,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/Frameworks"; MACOSX_DEPLOYMENT_TARGET = 10.7; + PRODUCT_BUNDLE_IDENTIFIER = org.xiph.ogg; PRODUCT_NAME = Ogg; SDKROOT = macosx; WRAPPER_EXTENSION = framework; @@ -290,8 +297,10 @@ 730F235909181A3A00AB638C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_TESTABILITY = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__; + ONLY_ACTIVE_ARCH = YES; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Debug; @@ -299,10 +308,6 @@ 730F235A09181A3A00AB638C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - ppc, - i386, - ); GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__; OTHER_CFLAGS = ( @@ -316,6 +321,7 @@ 734FB2EE0B18B3B900D561D7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -330,6 +336,7 @@ 734FB2EF0B18B3B900D561D7 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; diff --git a/Frameworks/Ogg/macosx/es.lproj/InfoPlist.strings b/Frameworks/Ogg/macosx/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..b230fea4930f0172f7afde95bd251c7efb4da1ba GIT binary patch literal 136 zcmW-Z-3o$W5JbCFBundleIconFile CFBundleIdentifier - org.xiph.libopus + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/Opus/Opus/es.lproj/InfoPlist.strings b/Frameworks/Opus/Opus/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/Opus/Opus/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/Opus/Opus/opus/silk/A2NLSF.c b/Frameworks/Opus/Opus/opus/silk/A2NLSF.c index b6e9e5ffc..c63774257 100644 --- a/Frameworks/Opus/Opus/opus/silk/A2NLSF.c +++ b/Frameworks/Opus/Opus/opus/silk/A2NLSF.c @@ -74,19 +74,19 @@ static OPUS_INLINE opus_int32 silk_A2NLSF_eval_poly( /* return the polynomial ev if ( opus_likely( 8 == dd ) ) { - y32 = silk_SMLAWW( p[ 7 ], y32, x_Q16 ); - y32 = silk_SMLAWW( p[ 6 ], y32, x_Q16 ); - y32 = silk_SMLAWW( p[ 5 ], y32, x_Q16 ); - y32 = silk_SMLAWW( p[ 4 ], y32, x_Q16 ); - y32 = silk_SMLAWW( p[ 3 ], y32, x_Q16 ); - y32 = silk_SMLAWW( p[ 2 ], y32, x_Q16 ); - y32 = silk_SMLAWW( p[ 1 ], y32, x_Q16 ); - y32 = silk_SMLAWW( p[ 0 ], y32, x_Q16 ); + y32 = (opus_int32) silk_SMLAWW( p[ 7 ], y32, x_Q16 ); + y32 = (opus_int32) silk_SMLAWW( p[ 6 ], y32, x_Q16 ); + y32 = (opus_int32) silk_SMLAWW( p[ 5 ], y32, x_Q16 ); + y32 = (opus_int32) silk_SMLAWW( p[ 4 ], y32, x_Q16 ); + y32 = (opus_int32) silk_SMLAWW( p[ 3 ], y32, x_Q16 ); + y32 = (opus_int32) silk_SMLAWW( p[ 2 ], y32, x_Q16 ); + y32 = (opus_int32) silk_SMLAWW( p[ 1 ], y32, x_Q16 ); + y32 = (opus_int32) silk_SMLAWW( p[ 0 ], y32, x_Q16 ); } else { for( n = dd - 1; n >= 0; n-- ) { - y32 = silk_SMLAWW( p[ n ], y32, x_Q16 ); /* Q16 */ + y32 = (opus_int32) silk_SMLAWW( p[ n ], y32, x_Q16 ); /* Q16 */ } } return y32; diff --git a/Frameworks/Opus/Opus/opus/silk/CNG.c b/Frameworks/Opus/Opus/opus/silk/CNG.c index 61787c230..b7a56d7ea 100644 --- a/Frameworks/Opus/Opus/opus/silk/CNG.c +++ b/Frameworks/Opus/Opus/opus/silk/CNG.c @@ -128,14 +128,14 @@ void silk_CNG( ALLOC( CNG_sig_Q10, length + MAX_LPC_ORDER, opus_int32 ); /* Generate CNG excitation */ - gain_Q16 = silk_SMULWW( psDec->sPLC.randScale_Q14, psDec->sPLC.prevGain_Q16[1] ); + gain_Q16 = (opus_int32) silk_SMULWW( psDec->sPLC.randScale_Q14, psDec->sPLC.prevGain_Q16[1] ); if( gain_Q16 >= (1 << 21) || psCNG->CNG_smth_Gain_Q16 > (1 << 23) ) { gain_Q16 = silk_SMULTT( gain_Q16, gain_Q16 ); gain_Q16 = silk_SUB_LSHIFT32(silk_SMULTT( psCNG->CNG_smth_Gain_Q16, psCNG->CNG_smth_Gain_Q16 ), gain_Q16, 5 ); gain_Q16 = silk_LSHIFT32( silk_SQRT_APPROX( gain_Q16 ), 16 ); } else { - gain_Q16 = silk_SMULWW( gain_Q16, gain_Q16 ); - gain_Q16 = silk_SUB_LSHIFT32(silk_SMULWW( psCNG->CNG_smth_Gain_Q16, psCNG->CNG_smth_Gain_Q16 ), gain_Q16, 5 ); + gain_Q16 = (opus_int32) silk_SMULWW( gain_Q16, gain_Q16 ); + gain_Q16 = (opus_int32) silk_SUB_LSHIFT32(silk_SMULWW( psCNG->CNG_smth_Gain_Q16, psCNG->CNG_smth_Gain_Q16 ), gain_Q16, 5 ); gain_Q16 = silk_LSHIFT32( silk_SQRT_APPROX( gain_Q16 ), 8 ); } silk_CNG_exc( CNG_sig_Q10 + MAX_LPC_ORDER, psCNG->CNG_exc_buf_Q14, gain_Q16, length, &psCNG->rand_seed ); @@ -149,23 +149,23 @@ void silk_CNG( silk_assert( psDec->LPC_order == 10 || psDec->LPC_order == 16 ); /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ sum_Q6 = silk_RSHIFT( psDec->LPC_order, 1 ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 1 ], A_Q12[ 0 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 2 ], A_Q12[ 1 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 3 ], A_Q12[ 2 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 4 ], A_Q12[ 3 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 5 ], A_Q12[ 4 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 6 ], A_Q12[ 5 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 7 ], A_Q12[ 6 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 8 ], A_Q12[ 7 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 9 ], A_Q12[ 8 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 10 ], A_Q12[ 9 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 1 ], A_Q12[ 0 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 2 ], A_Q12[ 1 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 3 ], A_Q12[ 2 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 4 ], A_Q12[ 3 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 5 ], A_Q12[ 4 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 6 ], A_Q12[ 5 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 7 ], A_Q12[ 6 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 8 ], A_Q12[ 7 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 9 ], A_Q12[ 8 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 10 ], A_Q12[ 9 ] ); if( psDec->LPC_order == 16 ) { - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 11 ], A_Q12[ 10 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 12 ], A_Q12[ 11 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 13 ], A_Q12[ 12 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 14 ], A_Q12[ 13 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 15 ], A_Q12[ 14 ] ); - sum_Q6 = silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 16 ], A_Q12[ 15 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 11 ], A_Q12[ 10 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 12 ], A_Q12[ 11 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 13 ], A_Q12[ 12 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 14 ], A_Q12[ 13 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 15 ], A_Q12[ 14 ] ); + sum_Q6 = (opus_int32) silk_SMLAWB( sum_Q6, CNG_sig_Q10[ MAX_LPC_ORDER + i - 16 ], A_Q12[ 15 ] ); } /* Update states */ diff --git a/Frameworks/Opus/Opus/opus/silk/HP_variable_cutoff.c b/Frameworks/Opus/Opus/opus/silk/HP_variable_cutoff.c index bbe10f04c..c30509c57 100644 --- a/Frameworks/Opus/Opus/opus/silk/HP_variable_cutoff.c +++ b/Frameworks/Opus/Opus/opus/silk/HP_variable_cutoff.c @@ -52,7 +52,7 @@ void silk_HP_variable_cutoff( /* adjustment based on quality */ quality_Q15 = psEncC1->input_quality_bands_Q15[ 0 ]; - pitch_freq_log_Q7 = silk_SMLAWB( pitch_freq_log_Q7, silk_SMULWB( silk_LSHIFT( -quality_Q15, 2 ), quality_Q15 ), + pitch_freq_log_Q7 = (opus_int32) silk_SMLAWB( pitch_freq_log_Q7, silk_SMULWB( silk_LSHIFT( -quality_Q15, 2 ), quality_Q15 ), pitch_freq_log_Q7 - ( silk_lin2log( SILK_FIX_CONST( VARIABLE_HP_MIN_CUTOFF_HZ, 16 ) ) - ( 16 << 7 ) ) ); /* delta_freq = pitch_freq_log - psEnc->variable_HP_smth1; */ diff --git a/Frameworks/Opus/Opus/opus/silk/Inlines.h b/Frameworks/Opus/Opus/opus/silk/Inlines.h index ec986cdfd..2b65c68b0 100644 --- a/Frameworks/Opus/Opus/opus/silk/Inlines.h +++ b/Frameworks/Opus/Opus/opus/silk/Inlines.h @@ -88,7 +88,7 @@ static OPUS_INLINE opus_int32 silk_SQRT_APPROX( opus_int32 x ) y >>= silk_RSHIFT(lz, 1); /* increment using fractional part of input */ - y = silk_SMLAWB(y, y, silk_SMULBB(213, frac_Q7)); + y = (opus_int32) silk_SMLAWB(y, y, silk_SMULBB(213, frac_Q7)); return y; } @@ -116,14 +116,14 @@ static OPUS_INLINE opus_int32 silk_DIV32_varQ( /* O returns a good approxim b32_inv = silk_DIV32_16( silk_int32_MAX >> 2, silk_RSHIFT(b32_nrm, 16) ); /* Q: 29 + 16 - b_headrm */ /* First approximation */ - result = silk_SMULWB(a32_nrm, b32_inv); /* Q: 29 + a_headrm - b_headrm */ + result = (opus_int32) silk_SMULWB(a32_nrm, b32_inv); /* Q: 29 + a_headrm - b_headrm */ /* Compute residual by subtracting product of denominator and first approximation */ /* It's OK to overflow because the final value of a32_nrm should always be small */ a32_nrm = silk_SUB32_ovflw(a32_nrm, silk_LSHIFT_ovflw( silk_SMMUL(b32_nrm, result), 3 )); /* Q: a_headrm */ /* Refinement */ - result = silk_SMLAWB(result, a32_nrm, b32_inv); /* Q: 29 + a_headrm - b_headrm */ + result = (opus_int32) silk_SMLAWB(result, a32_nrm, b32_inv); /* Q: 29 + a_headrm - b_headrm */ /* Convert to Qres domain */ lshift = 29 + a_headrm - b_headrm - Qres; @@ -165,7 +165,7 @@ static OPUS_INLINE opus_int32 silk_INVERSE32_varQ( /* O returns a good appr err_Q32 = silk_LSHIFT( ((opus_int32)1<<29) - silk_SMULWB(b32_nrm, b32_inv), 3 ); /* Q32 */ /* Refinement */ - result = silk_SMLAWW(result, err_Q32, b32_inv); /* Q: 61 - b_headrm */ + result = (opus_int32) silk_SMLAWW(result, err_Q32, b32_inv); /* Q: 61 - b_headrm */ /* Convert to Qres domain */ lshift = 61 - b_headrm - Qres; diff --git a/Frameworks/Opus/Opus/opus/silk/LP_variable_cutoff.c b/Frameworks/Opus/Opus/opus/silk/LP_variable_cutoff.c index f639e1f89..faa8fd452 100644 --- a/Frameworks/Opus/Opus/opus/silk/LP_variable_cutoff.c +++ b/Frameworks/Opus/Opus/opus/silk/LP_variable_cutoff.c @@ -52,14 +52,14 @@ static OPUS_INLINE void silk_LP_interpolate_filter_taps( if( fac_Q16 < 32768 ) { /* fac_Q16 is in range of a 16-bit int */ /* Piece-wise linear interpolation of B and A */ for( nb = 0; nb < TRANSITION_NB; nb++ ) { - B_Q28[ nb ] = silk_SMLAWB( + B_Q28[ nb ] = (opus_int32) silk_SMLAWB( silk_Transition_LP_B_Q28[ ind ][ nb ], silk_Transition_LP_B_Q28[ ind + 1 ][ nb ] - silk_Transition_LP_B_Q28[ ind ][ nb ], fac_Q16 ); } for( na = 0; na < TRANSITION_NA; na++ ) { - A_Q28[ na ] = silk_SMLAWB( + A_Q28[ na ] = (opus_int32) silk_SMLAWB( silk_Transition_LP_A_Q28[ ind ][ na ], silk_Transition_LP_A_Q28[ ind + 1 ][ na ] - silk_Transition_LP_A_Q28[ ind ][ na ], @@ -69,14 +69,14 @@ static OPUS_INLINE void silk_LP_interpolate_filter_taps( silk_assert( fac_Q16 - ( 1 << 16 ) == silk_SAT16( fac_Q16 - ( 1 << 16 ) ) ); /* Piece-wise linear interpolation of B and A */ for( nb = 0; nb < TRANSITION_NB; nb++ ) { - B_Q28[ nb ] = silk_SMLAWB( + B_Q28[ nb ] = (opus_int32) silk_SMLAWB( silk_Transition_LP_B_Q28[ ind + 1 ][ nb ], silk_Transition_LP_B_Q28[ ind + 1 ][ nb ] - silk_Transition_LP_B_Q28[ ind ][ nb ], fac_Q16 - ( (opus_int32)1 << 16 ) ); } for( na = 0; na < TRANSITION_NA; na++ ) { - A_Q28[ na ] = silk_SMLAWB( + A_Q28[ na ] = (opus_int32) silk_SMLAWB( silk_Transition_LP_A_Q28[ ind + 1 ][ na ], silk_Transition_LP_A_Q28[ ind + 1 ][ na ] - silk_Transition_LP_A_Q28[ ind ][ na ], diff --git a/Frameworks/Opus/Opus/opus/silk/NLSF_decode.c b/Frameworks/Opus/Opus/opus/silk/NLSF_decode.c index 9f715060b..3a2473390 100644 --- a/Frameworks/Opus/Opus/opus/silk/NLSF_decode.c +++ b/Frameworks/Opus/Opus/opus/silk/NLSF_decode.c @@ -51,7 +51,7 @@ static OPUS_INLINE void silk_NLSF_residual_dequant( /* O Return } else if( out_Q10 < 0 ) { out_Q10 = silk_ADD16( out_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) ); } - out_Q10 = silk_SMLAWB( pred_Q10, (opus_int32)out_Q10, quant_step_size_Q16 ); + out_Q10 = (opus_int) silk_SMLAWB( pred_Q10, (opus_int32)out_Q10, quant_step_size_Q16 ); x_Q10[ i ] = out_Q10; } } diff --git a/Frameworks/Opus/Opus/opus/silk/NLSF_del_dec_quant.c b/Frameworks/Opus/Opus/opus/silk/NLSF_del_dec_quant.c index c3b9efccf..775ea434e 100644 --- a/Frameworks/Opus/Opus/opus/silk/NLSF_del_dec_quant.c +++ b/Frameworks/Opus/Opus/opus/silk/NLSF_del_dec_quant.c @@ -74,8 +74,8 @@ opus_int32 silk_NLSF_del_dec_quant( /* O Returns out0_Q10 = silk_ADD16( out0_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) ); out1_Q10 = silk_ADD16( out1_Q10, SILK_FIX_CONST( NLSF_QUANT_LEVEL_ADJ, 10 ) ); } - out0_Q10_table[ i + NLSF_QUANT_MAX_AMPLITUDE_EXT ] = silk_SMULWB( (opus_int32)out0_Q10, quant_step_size_Q16 ); - out1_Q10_table[ i + NLSF_QUANT_MAX_AMPLITUDE_EXT ] = silk_SMULWB( (opus_int32)out1_Q10, quant_step_size_Q16 ); + out0_Q10_table[ i + NLSF_QUANT_MAX_AMPLITUDE_EXT ] = (opus_int) silk_SMULWB( (opus_int32)out0_Q10, quant_step_size_Q16 ); + out1_Q10_table[ i + NLSF_QUANT_MAX_AMPLITUDE_EXT ] = (opus_int) silk_SMULWB( (opus_int32)out1_Q10, quant_step_size_Q16 ); } silk_assert( (NLSF_QUANT_DEL_DEC_STATES & (NLSF_QUANT_DEL_DEC_STATES-1)) == 0 ); /* must be power of two */ @@ -88,9 +88,9 @@ opus_int32 silk_NLSF_del_dec_quant( /* O Returns pred_coef_Q16 = silk_LSHIFT( (opus_int32)pred_coef_Q8[ i ], 8 ); in_Q10 = x_Q10[ i ]; for( j = 0; j < nStates; j++ ) { - pred_Q10 = silk_SMULWB( pred_coef_Q16, prev_out_Q10[ j ] ); + pred_Q10 = (opus_int) silk_SMULWB( pred_coef_Q16, prev_out_Q10[ j ] ); res_Q10 = silk_SUB16( in_Q10, pred_Q10 ); - ind_tmp = silk_SMULWB( (opus_int32)inv_quant_step_size_Q6, res_Q10 ); + ind_tmp = (opus_int) silk_SMULWB( (opus_int32)inv_quant_step_size_Q6, res_Q10 ); ind_tmp = silk_LIMIT( ind_tmp, -NLSF_QUANT_MAX_AMPLITUDE_EXT, NLSF_QUANT_MAX_AMPLITUDE_EXT-1 ); ind[ j ][ i ] = (opus_int8)ind_tmp; diff --git a/Frameworks/Opus/Opus/opus/silk/NSQ.c b/Frameworks/Opus/Opus/opus/silk/NSQ.c index a06588407..1accb8e2a 100644 --- a/Frameworks/Opus/Opus/opus/silk/NSQ.c +++ b/Frameworks/Opus/Opus/opus/silk/NSQ.c @@ -223,23 +223,23 @@ void silk_noise_shape_quantizer( silk_assert( predictLPCOrder == 10 || predictLPCOrder == 16 ); /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LPC_pred_Q10 = silk_RSHIFT( predictLPCOrder, 1 ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ 0 ], a_Q12[ 0 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -1 ], a_Q12[ 1 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -2 ], a_Q12[ 2 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -3 ], a_Q12[ 3 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -4 ], a_Q12[ 4 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -5 ], a_Q12[ 5 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -6 ], a_Q12[ 6 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -7 ], a_Q12[ 7 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -8 ], a_Q12[ 8 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -9 ], a_Q12[ 9 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ 0 ], a_Q12[ 0 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -1 ], a_Q12[ 1 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -2 ], a_Q12[ 2 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -3 ], a_Q12[ 3 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -4 ], a_Q12[ 4 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -5 ], a_Q12[ 5 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -6 ], a_Q12[ 6 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -7 ], a_Q12[ 7 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -8 ], a_Q12[ 8 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -9 ], a_Q12[ 9 ] ); if( predictLPCOrder == 16 ) { - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -10 ], a_Q12[ 10 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -11 ], a_Q12[ 11 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -12 ], a_Q12[ 12 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -13 ], a_Q12[ 13 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -14 ], a_Q12[ 14 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -15 ], a_Q12[ 15 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -10 ], a_Q12[ 10 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -11 ], a_Q12[ 11 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -12 ], a_Q12[ 12 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -13 ], a_Q12[ 13 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -14 ], a_Q12[ 14 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, psLPC_Q14[ -15 ], a_Q12[ 15 ] ); } /* Long-term prediction */ @@ -247,11 +247,11 @@ void silk_noise_shape_quantizer( /* Unrolled loop */ /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LTP_pred_Q13 = 2; - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ 0 ], b_Q14[ 0 ] ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -1 ], b_Q14[ 1 ] ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -2 ], b_Q14[ 2 ] ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -3 ], b_Q14[ 3 ] ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], b_Q14[ 4 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ 0 ], b_Q14[ 0 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -1 ], b_Q14[ 1 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -2 ], b_Q14[ 2 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -3 ], b_Q14[ 3 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], b_Q14[ 4 ] ); pred_lag_ptr++; } else { LTP_pred_Q13 = 0; @@ -263,22 +263,22 @@ void silk_noise_shape_quantizer( tmp1 = NSQ->sAR2_Q14[ 0 ]; NSQ->sAR2_Q14[ 0 ] = tmp2; n_AR_Q12 = silk_RSHIFT( shapingLPCOrder, 1 ); - n_AR_Q12 = silk_SMLAWB( n_AR_Q12, tmp2, AR_shp_Q13[ 0 ] ); + n_AR_Q12 = (opus_int32) silk_SMLAWB( n_AR_Q12, tmp2, AR_shp_Q13[ 0 ] ); for( j = 2; j < shapingLPCOrder; j += 2 ) { tmp2 = NSQ->sAR2_Q14[ j - 1 ]; NSQ->sAR2_Q14[ j - 1 ] = tmp1; - n_AR_Q12 = silk_SMLAWB( n_AR_Q12, tmp1, AR_shp_Q13[ j - 1 ] ); + n_AR_Q12 = (opus_int32) silk_SMLAWB( n_AR_Q12, tmp1, AR_shp_Q13[ j - 1 ] ); tmp1 = NSQ->sAR2_Q14[ j + 0 ]; NSQ->sAR2_Q14[ j + 0 ] = tmp2; - n_AR_Q12 = silk_SMLAWB( n_AR_Q12, tmp2, AR_shp_Q13[ j ] ); + n_AR_Q12 = (opus_int32) silk_SMLAWB( n_AR_Q12, tmp2, AR_shp_Q13[ j ] ); } NSQ->sAR2_Q14[ shapingLPCOrder - 1 ] = tmp1; - n_AR_Q12 = silk_SMLAWB( n_AR_Q12, tmp1, AR_shp_Q13[ shapingLPCOrder - 1 ] ); + n_AR_Q12 = (opus_int32) silk_SMLAWB( n_AR_Q12, tmp1, AR_shp_Q13[ shapingLPCOrder - 1 ] ); n_AR_Q12 = silk_LSHIFT32( n_AR_Q12, 1 ); /* Q11 -> Q12 */ - n_AR_Q12 = silk_SMLAWB( n_AR_Q12, NSQ->sLF_AR_shp_Q14, Tilt_Q14 ); + n_AR_Q12 = (opus_int32) silk_SMLAWB( n_AR_Q12, NSQ->sLF_AR_shp_Q14, Tilt_Q14 ); - n_LF_Q12 = silk_SMULWB( NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - 1 ], LF_shp_Q14 ); + n_LF_Q12 = (opus_int32) silk_SMULWB( NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - 1 ], LF_shp_Q14 ); n_LF_Q12 = silk_SMLAWT( n_LF_Q12, NSQ->sLF_AR_shp_Q14, LF_shp_Q14 ); silk_assert( lag > 0 || signalType != TYPE_VOICED ); @@ -288,7 +288,7 @@ void silk_noise_shape_quantizer( tmp1 = silk_SUB32( tmp1, n_LF_Q12 ); /* Q12 */ if( lag > 0 ) { /* Symmetric, packed FIR coefficients */ - n_LTP_Q13 = silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); + n_LTP_Q13 = (opus_int32) silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); n_LTP_Q13 = silk_SMLAWT( n_LTP_Q13, shp_lag_ptr[ -1 ], HarmShapeFIRPacked_Q14 ); n_LTP_Q13 = silk_LSHIFT( n_LTP_Q13, 1 ); shp_lag_ptr++; @@ -408,7 +408,7 @@ static OPUS_INLINE void silk_nsq_scale_states( /* Scale input */ inv_gain_Q23 = silk_RSHIFT_ROUND( inv_gain_Q31, 8 ); for( i = 0; i < psEncC->subfr_length; i++ ) { - x_sc_Q10[ i ] = silk_SMULWW( x_Q3[ i ], inv_gain_Q23 ); + x_sc_Q10[ i ] = (opus_int32) silk_SMULWW( x_Q3[ i ], inv_gain_Q23 ); } /* Save inverse gain */ @@ -422,7 +422,7 @@ static OPUS_INLINE void silk_nsq_scale_states( } for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) { silk_assert( i < MAX_FRAME_LENGTH ); - sLTP_Q15[ i ] = silk_SMULWB( inv_gain_Q31, sLTP[ i ] ); + sLTP_Q15[ i ] = (opus_int32) silk_SMULWB( inv_gain_Q31, sLTP[ i ] ); } } @@ -430,24 +430,24 @@ static OPUS_INLINE void silk_nsq_scale_states( if( gain_adj_Q16 != (opus_int32)1 << 16 ) { /* Scale long-term shaping state */ for( i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx; i++ ) { - NSQ->sLTP_shp_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] ); + NSQ->sLTP_shp_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] ); } /* Scale long-term prediction state */ if( signal_type == TYPE_VOICED && NSQ->rewhite_flag == 0 ) { for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) { - sLTP_Q15[ i ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] ); + sLTP_Q15[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] ); } } - NSQ->sLF_AR_shp_Q14 = silk_SMULWW( gain_adj_Q16, NSQ->sLF_AR_shp_Q14 ); + NSQ->sLF_AR_shp_Q14 = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sLF_AR_shp_Q14 ); /* Scale short-term prediction and shaping states */ for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) { - NSQ->sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLPC_Q14[ i ] ); + NSQ->sLPC_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sLPC_Q14[ i ] ); } for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) { - NSQ->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sAR2_Q14[ i ] ); + NSQ->sAR2_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sAR2_Q14[ i ] ); } } } diff --git a/Frameworks/Opus/Opus/opus/silk/NSQ_del_dec.c b/Frameworks/Opus/Opus/opus/silk/NSQ_del_dec.c index aff560c22..810ebabc0 100644 --- a/Frameworks/Opus/Opus/opus/silk/NSQ_del_dec.c +++ b/Frameworks/Opus/Opus/opus/silk/NSQ_del_dec.c @@ -363,11 +363,11 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec( /* Unrolled loop */ /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LTP_pred_Q14 = 2; - LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ 0 ], b_Q14[ 0 ] ); - LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -1 ], b_Q14[ 1 ] ); - LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -2 ], b_Q14[ 2 ] ); - LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -3 ], b_Q14[ 3 ] ); - LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -4 ], b_Q14[ 4 ] ); + LTP_pred_Q14 = (opus_int32) silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ 0 ], b_Q14[ 0 ] ); + LTP_pred_Q14 = (opus_int32) silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -1 ], b_Q14[ 1 ] ); + LTP_pred_Q14 = (opus_int32) silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -2 ], b_Q14[ 2 ] ); + LTP_pred_Q14 = (opus_int32) silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -3 ], b_Q14[ 3 ] ); + LTP_pred_Q14 = (opus_int32) silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -4 ], b_Q14[ 4 ] ); LTP_pred_Q14 = silk_LSHIFT( LTP_pred_Q14, 1 ); /* Q13 -> Q14 */ pred_lag_ptr++; } else { @@ -377,7 +377,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec( /* Long-term shaping */ if( lag > 0 ) { /* Symmetric, packed FIR coefficients */ - n_LTP_Q14 = silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); + n_LTP_Q14 = (opus_int32) silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); n_LTP_Q14 = silk_SMLAWT( n_LTP_Q14, shp_lag_ptr[ -1 ], HarmShapeFIRPacked_Q14 ); n_LTP_Q14 = silk_SUB_LSHIFT32( LTP_pred_Q14, n_LTP_Q14, 2 ); /* Q12 -> Q14 */ shp_lag_ptr++; @@ -401,54 +401,54 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec( silk_assert( predictLPCOrder == 10 || predictLPCOrder == 16 ); /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LPC_pred_Q14 = silk_RSHIFT( predictLPCOrder, 1 ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ 0 ], a_Q12[ 0 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -1 ], a_Q12[ 1 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -2 ], a_Q12[ 2 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -3 ], a_Q12[ 3 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -4 ], a_Q12[ 4 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -5 ], a_Q12[ 5 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -6 ], a_Q12[ 6 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -7 ], a_Q12[ 7 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -8 ], a_Q12[ 8 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -9 ], a_Q12[ 9 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ 0 ], a_Q12[ 0 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -1 ], a_Q12[ 1 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -2 ], a_Q12[ 2 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -3 ], a_Q12[ 3 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -4 ], a_Q12[ 4 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -5 ], a_Q12[ 5 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -6 ], a_Q12[ 6 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -7 ], a_Q12[ 7 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -8 ], a_Q12[ 8 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -9 ], a_Q12[ 9 ] ); if( predictLPCOrder == 16 ) { - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -10 ], a_Q12[ 10 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -11 ], a_Q12[ 11 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -12 ], a_Q12[ 12 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -13 ], a_Q12[ 13 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -14 ], a_Q12[ 14 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -15 ], a_Q12[ 15 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -10 ], a_Q12[ 10 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -11 ], a_Q12[ 11 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -12 ], a_Q12[ 12 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -13 ], a_Q12[ 13 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -14 ], a_Q12[ 14 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -15 ], a_Q12[ 15 ] ); } LPC_pred_Q14 = silk_LSHIFT( LPC_pred_Q14, 4 ); /* Q10 -> Q14 */ /* Noise shape feedback */ silk_assert( ( shapingLPCOrder & 1 ) == 0 ); /* check that order is even */ /* Output of lowpass section */ - tmp2 = silk_SMLAWB( psLPC_Q14[ 0 ], psDD->sAR2_Q14[ 0 ], warping_Q16 ); + tmp2 = (opus_int32) silk_SMLAWB( psLPC_Q14[ 0 ], psDD->sAR2_Q14[ 0 ], warping_Q16 ); /* Output of allpass section */ - tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ 0 ], psDD->sAR2_Q14[ 1 ] - tmp2, warping_Q16 ); + tmp1 = (opus_int32) silk_SMLAWB( psDD->sAR2_Q14[ 0 ], psDD->sAR2_Q14[ 1 ] - tmp2, warping_Q16 ); psDD->sAR2_Q14[ 0 ] = tmp2; n_AR_Q14 = silk_RSHIFT( shapingLPCOrder, 1 ); - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] ); + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] ); /* Loop over allpass sections */ for( j = 2; j < shapingLPCOrder; j += 2 ) { /* Output of allpass section */ - tmp2 = silk_SMLAWB( psDD->sAR2_Q14[ j - 1 ], psDD->sAR2_Q14[ j + 0 ] - tmp1, warping_Q16 ); + tmp2 = (opus_int32) silk_SMLAWB( psDD->sAR2_Q14[ j - 1 ], psDD->sAR2_Q14[ j + 0 ] - tmp1, warping_Q16 ); psDD->sAR2_Q14[ j - 1 ] = tmp1; - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] ); + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] ); /* Output of allpass section */ - tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ j + 0 ], psDD->sAR2_Q14[ j + 1 ] - tmp2, warping_Q16 ); + tmp1 = (opus_int32) silk_SMLAWB( psDD->sAR2_Q14[ j + 0 ], psDD->sAR2_Q14[ j + 1 ] - tmp2, warping_Q16 ); psDD->sAR2_Q14[ j + 0 ] = tmp2; - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ j ] ); + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ j ] ); } psDD->sAR2_Q14[ shapingLPCOrder - 1 ] = tmp1; - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ shapingLPCOrder - 1 ] ); + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ shapingLPCOrder - 1 ] ); n_AR_Q14 = silk_LSHIFT( n_AR_Q14, 1 ); /* Q11 -> Q12 */ - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, psDD->LF_AR_Q14, Tilt_Q14 ); /* Q12 */ + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, psDD->LF_AR_Q14, Tilt_Q14 ); /* Q12 */ n_AR_Q14 = silk_LSHIFT( n_AR_Q14, 2 ); /* Q12 -> Q14 */ - n_LF_Q14 = silk_SMULWB( psDD->Shape_Q14[ *smpl_buf_idx ], LF_shp_Q14 ); /* Q12 */ + n_LF_Q14 = (opus_int32) silk_SMULWB( psDD->Shape_Q14[ *smpl_buf_idx ], LF_shp_Q14 ); /* Q12 */ n_LF_Q14 = silk_SMLAWT( n_LF_Q14, psDD->LF_AR_Q14, LF_shp_Q14 ); /* Q12 */ n_LF_Q14 = silk_LSHIFT( n_LF_Q14, 2 ); /* Q12 -> Q14 */ @@ -670,7 +670,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states( /* Scale input */ inv_gain_Q23 = silk_RSHIFT_ROUND( inv_gain_Q31, 8 ); for( i = 0; i < psEncC->subfr_length; i++ ) { - x_sc_Q10[ i ] = silk_SMULWW( x_Q3[ i ], inv_gain_Q23 ); + x_sc_Q10[ i ] = (opus_int32) silk_SMULWW( x_Q3[ i ], inv_gain_Q23 ); } /* Save inverse gain */ @@ -684,7 +684,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states( } for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) { silk_assert( i < MAX_FRAME_LENGTH ); - sLTP_Q15[ i ] = silk_SMULWB( inv_gain_Q31, sLTP[ i ] ); + sLTP_Q15[ i ] = (opus_int32) silk_SMULWB( inv_gain_Q31, sLTP[ i ] ); } } @@ -692,13 +692,13 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states( if( gain_adj_Q16 != (opus_int32)1 << 16 ) { /* Scale long-term shaping state */ for( i = NSQ->sLTP_shp_buf_idx - psEncC->ltp_mem_length; i < NSQ->sLTP_shp_buf_idx; i++ ) { - NSQ->sLTP_shp_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] ); + NSQ->sLTP_shp_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] ); } /* Scale long-term prediction state */ if( signal_type == TYPE_VOICED && NSQ->rewhite_flag == 0 ) { for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx - decisionDelay; i++ ) { - sLTP_Q15[ i ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] ); + sLTP_Q15[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] ); } } @@ -706,18 +706,18 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states( psDD = &psDelDec[ k ]; /* Scale scalar states */ - psDD->LF_AR_Q14 = silk_SMULWW( gain_adj_Q16, psDD->LF_AR_Q14 ); + psDD->LF_AR_Q14 = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->LF_AR_Q14 ); /* Scale short-term prediction and shaping states */ for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) { - psDD->sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->sLPC_Q14[ i ] ); + psDD->sLPC_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->sLPC_Q14[ i ] ); } for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) { - psDD->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->sAR2_Q14[ i ] ); + psDD->sAR2_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->sAR2_Q14[ i ] ); } for( i = 0; i < DECISION_DELAY; i++ ) { - psDD->Pred_Q15[ i ] = silk_SMULWW( gain_adj_Q16, psDD->Pred_Q15[ i ] ); - psDD->Shape_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->Shape_Q14[ i ] ); + psDD->Pred_Q15[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->Pred_Q15[ i ] ); + psDD->Shape_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->Shape_Q14[ i ] ); } } } diff --git a/Frameworks/Opus/Opus/opus/silk/PLC.c b/Frameworks/Opus/Opus/opus/silk/PLC.c index 34a94bc31..2680f2ee1 100644 --- a/Frameworks/Opus/Opus/opus/silk/PLC.c +++ b/Frameworks/Opus/Opus/opus/silk/PLC.c @@ -281,7 +281,7 @@ static OPUS_INLINE void silk_PLC_conceal( down_scale_Q30 = silk_max_32( silk_RSHIFT( (opus_int32)1 << 30, LOG2_INV_LPC_GAIN_LOW_THRES ), down_scale_Q30 ); down_scale_Q30 = silk_LSHIFT( down_scale_Q30, LOG2_INV_LPC_GAIN_HIGH_THRES ); - rand_Gain_Q15 = silk_RSHIFT( silk_SMULWB( down_scale_Q30, rand_Gain_Q15 ), 14 ); + rand_Gain_Q15 = (opus_int32) silk_RSHIFT( silk_SMULWB( down_scale_Q30, rand_Gain_Q15 ), 14 ); } } @@ -297,7 +297,7 @@ static OPUS_INLINE void silk_PLC_conceal( inv_gain_Q30 = silk_INVERSE32_varQ( psPLC->prevGain_Q16[ 1 ], 46 ); inv_gain_Q30 = silk_min( inv_gain_Q30, silk_int32_MAX >> 1 ); for( i = idx + psDec->LPC_order; i < psDec->ltp_mem_length; i++ ) { - sLTP_Q14[ i ] = silk_SMULWB( inv_gain_Q30, sLTP[ i ] ); + sLTP_Q14[ i ] = (opus_int32) silk_SMULWB( inv_gain_Q30, sLTP[ i ] ); } /***************************/ @@ -310,11 +310,11 @@ static OPUS_INLINE void silk_PLC_conceal( /* Unrolled loop */ /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LTP_pred_Q12 = 2; - LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ 0 ], B_Q14[ 0 ] ); - LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -1 ], B_Q14[ 1 ] ); - LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -2 ], B_Q14[ 2 ] ); - LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -3 ], B_Q14[ 3 ] ); - LTP_pred_Q12 = silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -4 ], B_Q14[ 4 ] ); + LTP_pred_Q12 = (opus_int32) silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ 0 ], B_Q14[ 0 ] ); + LTP_pred_Q12 = (opus_int32) silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -1 ], B_Q14[ 1 ] ); + LTP_pred_Q12 = (opus_int32) silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -2 ], B_Q14[ 2 ] ); + LTP_pred_Q12 = (opus_int32) silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -3 ], B_Q14[ 3 ] ); + LTP_pred_Q12 = (opus_int32) silk_SMLAWB( LTP_pred_Q12, pred_lag_ptr[ -4 ], B_Q14[ 4 ] ); pred_lag_ptr++; /* Generate LPC excitation */ @@ -350,18 +350,18 @@ static OPUS_INLINE void silk_PLC_conceal( /* partly unrolled */ /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LPC_pred_Q10 = silk_RSHIFT( psDec->LPC_order, 1 ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 1 ], A_Q12[ 0 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 2 ], A_Q12[ 1 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 3 ], A_Q12[ 2 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 4 ], A_Q12[ 3 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 5 ], A_Q12[ 4 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 6 ], A_Q12[ 5 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 7 ], A_Q12[ 6 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 8 ], A_Q12[ 7 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 9 ], A_Q12[ 8 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 10 ], A_Q12[ 9 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 1 ], A_Q12[ 0 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 2 ], A_Q12[ 1 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 3 ], A_Q12[ 2 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 4 ], A_Q12[ 3 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 5 ], A_Q12[ 4 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 6 ], A_Q12[ 5 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 7 ], A_Q12[ 6 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 8 ], A_Q12[ 7 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 9 ], A_Q12[ 8 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - 10 ], A_Q12[ 9 ] ); for( j = 10; j < psDec->LPC_order; j++ ) { - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - j - 1 ], A_Q12[ j ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14_ptr[ MAX_LPC_ORDER + i - j - 1 ], A_Q12[ j ] ); } /* Add prediction to LPC excitation */ diff --git a/Frameworks/Opus/Opus/opus/silk/VAD.c b/Frameworks/Opus/Opus/opus/silk/VAD.c index 0a782af2f..311b62e05 100644 --- a/Frameworks/Opus/Opus/opus/silk/VAD.c +++ b/Frameworks/Opus/Opus/opus/silk/VAD.c @@ -219,9 +219,9 @@ opus_int silk_VAD_GetSA_Q8_c( /* O Return v /* Tilt measure */ if( speech_nrg < ( (opus_int32)1 << 20 ) ) { /* Scale down SNR value for small subband speech energies */ - SNR_Q7 = silk_SMULWB( silk_LSHIFT( silk_SQRT_APPROX( speech_nrg ), 6 ), SNR_Q7 ); + SNR_Q7 = (opus_int) silk_SMULWB( silk_LSHIFT( silk_SQRT_APPROX( speech_nrg ), 6 ), SNR_Q7 ); } - input_tilt = silk_SMLAWB( input_tilt, tiltWeights[ b ], SNR_Q7 ); + input_tilt = (opus_int) silk_SMLAWB( input_tilt, tiltWeights[ b ], SNR_Q7 ); } else { NrgToNoiseRatio_Q8[ b ] = 256; } @@ -236,7 +236,7 @@ opus_int silk_VAD_GetSA_Q8_c( /* O Return v /*********************************/ /* Speech Probability Estimation */ /*********************************/ - SA_Q15 = silk_sigm_Q15( silk_SMULWB( VAD_SNR_FACTOR_Q16, pSNR_dB_Q7 ) - VAD_NEGATIVE_OFFSET_Q5 ); + SA_Q15 = silk_sigm_Q15( (opus_int) (silk_SMULWB( VAD_SNR_FACTOR_Q16, pSNR_dB_Q7 ) - VAD_NEGATIVE_OFFSET_Q5) ); /**************************/ /* Frequency Tilt Measure */ @@ -264,7 +264,7 @@ opus_int silk_VAD_GetSA_Q8_c( /* O Return v /* square-root */ speech_nrg = silk_SQRT_APPROX( speech_nrg ); - SA_Q15 = silk_SMULWB( 32768 + speech_nrg, SA_Q15 ); + SA_Q15 = (opus_int) silk_SMULWB( 32768 + speech_nrg, SA_Q15 ); } /* Copy the resulting speech activity in Q8 */ @@ -274,7 +274,7 @@ opus_int silk_VAD_GetSA_Q8_c( /* O Return v /* Energy Level and SNR estimation */ /***********************************/ /* Smoothing coefficient */ - smooth_coef_Q16 = silk_SMULWB( VAD_SNR_SMOOTH_COEF_Q18, silk_SMULWB( (opus_int32)SA_Q15, SA_Q15 ) ); + smooth_coef_Q16 = (opus_int32) silk_SMULWB( VAD_SNR_SMOOTH_COEF_Q18, silk_SMULWB( (opus_int32)SA_Q15, SA_Q15 ) ); if( psEncC->frame_length == 10 * psEncC->fs_kHz ) { smooth_coef_Q16 >>= 1; @@ -282,7 +282,7 @@ opus_int silk_VAD_GetSA_Q8_c( /* O Return v for( b = 0; b < VAD_N_BANDS; b++ ) { /* compute smoothed energy-to-noise ratio per band */ - psSilk_VAD->NrgRatioSmth_Q8[ b ] = silk_SMLAWB( psSilk_VAD->NrgRatioSmth_Q8[ b ], + psSilk_VAD->NrgRatioSmth_Q8[ b ] = (opus_int32) silk_SMLAWB( psSilk_VAD->NrgRatioSmth_Q8[ b ], NrgToNoiseRatio_Q8[ b ] - psSilk_VAD->NrgRatioSmth_Q8[ b ], smooth_coef_Q16 ); /* signal to noise ratio in dB per band */ @@ -343,7 +343,7 @@ void silk_VAD_GetNoiseLevels( coef = silk_max_int( coef, min_coef ); /* Smooth inverse energies */ - psSilk_VAD->inv_NL[ k ] = silk_SMLAWB( psSilk_VAD->inv_NL[ k ], inv_nrg - psSilk_VAD->inv_NL[ k ], coef ); + psSilk_VAD->inv_NL[ k ] = (opus_int32) silk_SMLAWB( psSilk_VAD->inv_NL[ k ], inv_nrg - psSilk_VAD->inv_NL[ k ], coef ); silk_assert( psSilk_VAD->inv_NL[ k ] >= 0 ); /* Compute noise level by inverting again */ diff --git a/Frameworks/Opus/Opus/opus/silk/VQ_WMat_EC.c b/Frameworks/Opus/Opus/opus/silk/VQ_WMat_EC.c index 7983f1db8..4e81edc2d 100644 --- a/Frameworks/Opus/Opus/opus/silk/VQ_WMat_EC.c +++ b/Frameworks/Opus/Opus/opus/silk/VQ_WMat_EC.c @@ -72,38 +72,38 @@ void silk_VQ_WMat_EC_c( silk_assert( sum1_Q14 >= 0 ); /* first row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 1 ], diff_Q14[ 1 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 2 ], diff_Q14[ 2 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 3 ], diff_Q14[ 3 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 4 ], diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 1 ], diff_Q14[ 1 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 2 ], diff_Q14[ 2 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 3 ], diff_Q14[ 3 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 4 ], diff_Q14[ 4 ] ); sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 0 ], diff_Q14[ 0 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 0 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 0 ], diff_Q14[ 0 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 0 ] ); /* second row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 7 ], diff_Q14[ 2 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 8 ], diff_Q14[ 3 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 9 ], diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 7 ], diff_Q14[ 2 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 8 ], diff_Q14[ 3 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 9 ], diff_Q14[ 4 ] ); sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 6 ], diff_Q14[ 1 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 1 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 6 ], diff_Q14[ 1 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 1 ] ); /* third row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 13 ], diff_Q14[ 3 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 14 ], diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 13 ], diff_Q14[ 3 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 14 ], diff_Q14[ 4 ] ); sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 12 ], diff_Q14[ 2 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 2 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 12 ], diff_Q14[ 2 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 2 ] ); /* fourth row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 19 ], diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 19 ], diff_Q14[ 4 ] ); sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 18 ], diff_Q14[ 3 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 3 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 18 ], diff_Q14[ 3 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 3 ] ); /* last row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 24 ], diff_Q14[ 4 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 24 ], diff_Q14[ 4 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 4 ] ); silk_assert( sum1_Q14 >= 0 ); diff --git a/Frameworks/Opus/Opus/opus/silk/ana_filt_bank_1.c b/Frameworks/Opus/Opus/opus/silk/ana_filt_bank_1.c index 24cfb03fd..b950b86cd 100644 --- a/Frameworks/Opus/Opus/opus/silk/ana_filt_bank_1.c +++ b/Frameworks/Opus/Opus/opus/silk/ana_filt_bank_1.c @@ -54,7 +54,7 @@ void silk_ana_filt_bank_1( /* All-pass section for even input sample */ Y = silk_SUB32( in32, S[ 0 ] ); - X = silk_SMLAWB( Y, Y, A_fb1_21 ); + X = (opus_int32) silk_SMLAWB( Y, Y, A_fb1_21 ); out_1 = silk_ADD32( S[ 0 ], X ); S[ 0 ] = silk_ADD32( in32, X ); @@ -63,7 +63,7 @@ void silk_ana_filt_bank_1( /* All-pass section for odd input sample, and add to output of previous section */ Y = silk_SUB32( in32, S[ 1 ] ); - X = silk_SMULWB( Y, A_fb1_20 ); + X = (opus_int32) silk_SMULWB( Y, A_fb1_20 ); out_2 = silk_ADD32( S[ 1 ], X ); S[ 1 ] = silk_ADD32( in32, X ); diff --git a/Frameworks/Opus/Opus/opus/silk/biquad_alt.c b/Frameworks/Opus/Opus/opus/silk/biquad_alt.c index d55f5ee92..ee563ad2e 100644 --- a/Frameworks/Opus/Opus/opus/silk/biquad_alt.c +++ b/Frameworks/Opus/Opus/opus/silk/biquad_alt.c @@ -64,13 +64,13 @@ void silk_biquad_alt( inval = in[ k * stride ]; out32_Q14 = silk_LSHIFT( silk_SMLAWB( S[ 0 ], B_Q28[ 0 ], inval ), 2 ); - S[ 0 ] = S[1] + silk_RSHIFT_ROUND( silk_SMULWB( out32_Q14, A0_L_Q28 ), 14 ); - S[ 0 ] = silk_SMLAWB( S[ 0 ], out32_Q14, A0_U_Q28 ); - S[ 0 ] = silk_SMLAWB( S[ 0 ], B_Q28[ 1 ], inval); + S[ 0 ] = (opus_int32) (S[1] + silk_RSHIFT_ROUND( silk_SMULWB( out32_Q14, A0_L_Q28 ), 14 )); + S[ 0 ] = (opus_int32) silk_SMLAWB( S[ 0 ], out32_Q14, A0_U_Q28 ); + S[ 0 ] = (opus_int32) silk_SMLAWB( S[ 0 ], B_Q28[ 1 ], inval); - S[ 1 ] = silk_RSHIFT_ROUND( silk_SMULWB( out32_Q14, A1_L_Q28 ), 14 ); - S[ 1 ] = silk_SMLAWB( S[ 1 ], out32_Q14, A1_U_Q28 ); - S[ 1 ] = silk_SMLAWB( S[ 1 ], B_Q28[ 2 ], inval ); + S[ 1 ] = (opus_int32) silk_RSHIFT_ROUND( silk_SMULWB( out32_Q14, A1_L_Q28 ), 14 ); + S[ 1 ] = (opus_int32) silk_SMLAWB( S[ 1 ], out32_Q14, A1_U_Q28 ); + S[ 1 ] = (opus_int32) silk_SMLAWB( S[ 1 ], B_Q28[ 2 ], inval ); /* Scale back to Q0 and saturate */ out[ k * stride ] = (opus_int16)silk_SAT16( silk_RSHIFT( out32_Q14 + (1<<14) - 1, 14 ) ); diff --git a/Frameworks/Opus/Opus/opus/silk/bwexpander_32.c b/Frameworks/Opus/Opus/opus/silk/bwexpander_32.c index d0010f73d..3c7d9fe9c 100644 --- a/Frameworks/Opus/Opus/opus/silk/bwexpander_32.c +++ b/Frameworks/Opus/Opus/opus/silk/bwexpander_32.c @@ -42,9 +42,9 @@ void silk_bwexpander_32( opus_int32 chirp_minus_one_Q16 = chirp_Q16 - 65536; for( i = 0; i < d - 1; i++ ) { - ar[ i ] = silk_SMULWW( chirp_Q16, ar[ i ] ); + ar[ i ] = (opus_int32) silk_SMULWW( chirp_Q16, ar[ i ] ); chirp_Q16 += silk_RSHIFT_ROUND( silk_MUL( chirp_Q16, chirp_minus_one_Q16 ), 16 ); } - ar[ d - 1 ] = silk_SMULWW( chirp_Q16, ar[ d - 1 ] ); + ar[ d - 1 ] = (opus_int32) silk_SMULWW( chirp_Q16, ar[ d - 1 ] ); } diff --git a/Frameworks/Opus/Opus/opus/silk/decode_core.c b/Frameworks/Opus/Opus/opus/silk/decode_core.c index b88991e34..3d7589227 100644 --- a/Frameworks/Opus/Opus/opus/silk/decode_core.c +++ b/Frameworks/Opus/Opus/opus/silk/decode_core.c @@ -112,7 +112,7 @@ void silk_decode_core( /* Scale short term state */ for( i = 0; i < MAX_LPC_ORDER; i++ ) { - sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, sLPC_Q14[ i ] ); + sLPC_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, sLPC_Q14[ i ] ); } } else { gain_adj_Q16 = (opus_int32)1 << 16; @@ -156,13 +156,13 @@ void silk_decode_core( inv_gain_Q31 = silk_LSHIFT( silk_SMULWB( inv_gain_Q31, psDecCtrl->LTP_scale_Q14 ), 2 ); } for( i = 0; i < lag + LTP_ORDER/2; i++ ) { - sLTP_Q15[ sLTP_buf_idx - i - 1 ] = silk_SMULWB( inv_gain_Q31, sLTP[ psDec->ltp_mem_length - i - 1 ] ); + sLTP_Q15[ sLTP_buf_idx - i - 1 ] = (opus_int32) silk_SMULWB( inv_gain_Q31, sLTP[ psDec->ltp_mem_length - i - 1 ] ); } } else { /* Update LTP state when Gain changes */ if( gain_adj_Q16 != (opus_int32)1 << 16 ) { for( i = 0; i < lag + LTP_ORDER/2; i++ ) { - sLTP_Q15[ sLTP_buf_idx - i - 1 ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ sLTP_buf_idx - i - 1 ] ); + sLTP_Q15[ sLTP_buf_idx - i - 1 ] = (opus_int32) silk_SMULWW( gain_adj_Q16, sLTP_Q15[ sLTP_buf_idx - i - 1 ] ); } } } @@ -176,11 +176,11 @@ void silk_decode_core( /* Unrolled loop */ /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LTP_pred_Q13 = 2; - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ 0 ], B_Q14[ 0 ] ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -1 ], B_Q14[ 1 ] ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -2 ], B_Q14[ 2 ] ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -3 ], B_Q14[ 3 ] ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], B_Q14[ 4 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ 0 ], B_Q14[ 0 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -1 ], B_Q14[ 1 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -2 ], B_Q14[ 2 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -3 ], B_Q14[ 3 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], B_Q14[ 4 ] ); pred_lag_ptr++; /* Generate LPC excitation */ @@ -199,23 +199,23 @@ void silk_decode_core( silk_assert( psDec->LPC_order == 10 || psDec->LPC_order == 16 ); /* Avoids introducing a bias because silk_SMLAWB() always rounds to -inf */ LPC_pred_Q10 = silk_RSHIFT( psDec->LPC_order, 1 ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 1 ], A_Q12_tmp[ 0 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 2 ], A_Q12_tmp[ 1 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 3 ], A_Q12_tmp[ 2 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 4 ], A_Q12_tmp[ 3 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 5 ], A_Q12_tmp[ 4 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 6 ], A_Q12_tmp[ 5 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 7 ], A_Q12_tmp[ 6 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 8 ], A_Q12_tmp[ 7 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 9 ], A_Q12_tmp[ 8 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 10 ], A_Q12_tmp[ 9 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 1 ], A_Q12_tmp[ 0 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 2 ], A_Q12_tmp[ 1 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 3 ], A_Q12_tmp[ 2 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 4 ], A_Q12_tmp[ 3 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 5 ], A_Q12_tmp[ 4 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 6 ], A_Q12_tmp[ 5 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 7 ], A_Q12_tmp[ 6 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 8 ], A_Q12_tmp[ 7 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 9 ], A_Q12_tmp[ 8 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 10 ], A_Q12_tmp[ 9 ] ); if( psDec->LPC_order == 16 ) { - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 11 ], A_Q12_tmp[ 10 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 12 ], A_Q12_tmp[ 11 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 13 ], A_Q12_tmp[ 12 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 14 ], A_Q12_tmp[ 13 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 15 ], A_Q12_tmp[ 14 ] ); - LPC_pred_Q10 = silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 16 ], A_Q12_tmp[ 15 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 11 ], A_Q12_tmp[ 10 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 12 ], A_Q12_tmp[ 11 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 13 ], A_Q12_tmp[ 12 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 14 ], A_Q12_tmp[ 13 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 15 ], A_Q12_tmp[ 14 ] ); + LPC_pred_Q10 = (opus_int32) silk_SMLAWB( LPC_pred_Q10, sLPC_Q14[ MAX_LPC_ORDER + i - 16 ], A_Q12_tmp[ 15 ] ); } /* Add prediction to LPC excitation */ diff --git a/Frameworks/Opus/Opus/opus/silk/enc_API.c b/Frameworks/Opus/Opus/opus/silk/enc_API.c index f8060286d..80a2edb20 100644 --- a/Frameworks/Opus/Opus/opus/silk/enc_API.c +++ b/Frameworks/Opus/Opus/opus/silk/enc_API.c @@ -522,7 +522,7 @@ opus_int silk_Encode( /* O Returns error co psEnc->nBitsExceeded = silk_LIMIT( psEnc->nBitsExceeded, 0, 10000 ); /* Update flag indicating if bandwidth switching is allowed */ - speech_act_thr_for_switch_Q8 = silk_SMLAWB( SILK_FIX_CONST( SPEECH_ACTIVITY_DTX_THRES, 8 ), + speech_act_thr_for_switch_Q8 = (opus_int) silk_SMLAWB( SILK_FIX_CONST( SPEECH_ACTIVITY_DTX_THRES, 8 ), SILK_FIX_CONST( ( 1 - SPEECH_ACTIVITY_DTX_THRES ) / MAX_BANDWIDTH_SWITCH_DELAY_MS, 16 + 8 ), psEnc->timeSinceSwitchAllowed_ms ); if( psEnc->state_Fxx[ 0 ].sCmn.speech_activity_Q8 < speech_act_thr_for_switch_Q8 ) { psEnc->allowBandwidthSwitch = 1; diff --git a/Frameworks/Opus/Opus/opus/silk/gain_quant.c b/Frameworks/Opus/Opus/opus/silk/gain_quant.c index 64ccd0611..6c380f0b0 100644 --- a/Frameworks/Opus/Opus/opus/silk/gain_quant.c +++ b/Frameworks/Opus/Opus/opus/silk/gain_quant.c @@ -85,7 +85,7 @@ void silk_gains_quant( } /* Scale and convert to linear scale */ - gain_Q16[ k ] = silk_log2lin( silk_min_32( silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */ + gain_Q16[ k ] = silk_log2lin( silk_min_32( (opus_int32) silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */ } } @@ -119,7 +119,7 @@ void silk_gains_dequant( *prev_ind = silk_LIMIT_int( *prev_ind, 0, N_LEVELS_QGAIN - 1 ); /* Scale and convert to linear scale */ - gain_Q16[ k ] = silk_log2lin( silk_min_32( silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */ + gain_Q16[ k ] = silk_log2lin( silk_min_32( (opus_int32) silk_SMULWB( INV_SCALE_Q16, *prev_ind ) + OFFSET, 3967 ) ); /* 3967 = 31 in Q7 */ } } diff --git a/Frameworks/Opus/Opus/opus/silk/process_NLSFs.c b/Frameworks/Opus/Opus/opus/silk/process_NLSFs.c index c27cf0304..911e15a5c 100644 --- a/Frameworks/Opus/Opus/opus/silk/process_NLSFs.c +++ b/Frameworks/Opus/Opus/opus/silk/process_NLSFs.c @@ -54,7 +54,7 @@ void silk_process_NLSFs( /* Calculate mu values */ /***********************/ /* NLSF_mu = 0.003 - 0.0015 * psEnc->speech_activity; */ - NLSF_mu_Q20 = silk_SMLAWB( SILK_FIX_CONST( 0.003, 20 ), SILK_FIX_CONST( -0.001, 28 ), psEncC->speech_activity_Q8 ); + NLSF_mu_Q20 = (opus_int) silk_SMLAWB( SILK_FIX_CONST( 0.003, 20 ), SILK_FIX_CONST( -0.001, 28 ), psEncC->speech_activity_Q8 ); if( psEncC->nb_subfr == 2 ) { /* Multiply by 1.5 for 10 ms packets */ NLSF_mu_Q20 = silk_ADD_RSHIFT( NLSF_mu_Q20, NLSF_mu_Q20, 1 ); diff --git a/Frameworks/Opus/Opus/opus/silk/resampler_down2_3.c b/Frameworks/Opus/Opus/opus/silk/resampler_down2_3.c index 4342614dc..23aeee7fb 100644 --- a/Frameworks/Opus/Opus/opus/silk/resampler_down2_3.c +++ b/Frameworks/Opus/Opus/opus/silk/resampler_down2_3.c @@ -66,18 +66,18 @@ void silk_resampler_down2_3( counter = nSamplesIn; while( counter > 2 ) { /* Inner product */ - res_Q6 = silk_SMULWB( buf_ptr[ 0 ], silk_Resampler_2_3_COEFS_LQ[ 2 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 1 ], silk_Resampler_2_3_COEFS_LQ[ 3 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 2 ], silk_Resampler_2_3_COEFS_LQ[ 5 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 3 ], silk_Resampler_2_3_COEFS_LQ[ 4 ] ); + res_Q6 = (opus_int32) silk_SMULWB( buf_ptr[ 0 ], silk_Resampler_2_3_COEFS_LQ[ 2 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 1 ], silk_Resampler_2_3_COEFS_LQ[ 3 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 2 ], silk_Resampler_2_3_COEFS_LQ[ 5 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 3 ], silk_Resampler_2_3_COEFS_LQ[ 4 ] ); /* Scale down, saturate and store in output array */ *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) ); - res_Q6 = silk_SMULWB( buf_ptr[ 1 ], silk_Resampler_2_3_COEFS_LQ[ 4 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 2 ], silk_Resampler_2_3_COEFS_LQ[ 5 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 3 ], silk_Resampler_2_3_COEFS_LQ[ 3 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 4 ], silk_Resampler_2_3_COEFS_LQ[ 2 ] ); + res_Q6 = (opus_int32) silk_SMULWB( buf_ptr[ 1 ], silk_Resampler_2_3_COEFS_LQ[ 4 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 2 ], silk_Resampler_2_3_COEFS_LQ[ 5 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 3 ], silk_Resampler_2_3_COEFS_LQ[ 3 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 4 ], silk_Resampler_2_3_COEFS_LQ[ 2 ] ); /* Scale down, saturate and store in output array */ *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) ); diff --git a/Frameworks/Opus/Opus/opus/silk/resampler_private_AR2.c b/Frameworks/Opus/Opus/opus/silk/resampler_private_AR2.c index 5fff23714..38f6e0e6b 100644 --- a/Frameworks/Opus/Opus/opus/silk/resampler_private_AR2.c +++ b/Frameworks/Opus/Opus/opus/silk/resampler_private_AR2.c @@ -48,8 +48,8 @@ void silk_resampler_private_AR2( out32 = silk_ADD_LSHIFT32( S[ 0 ], (opus_int32)in[ k ], 8 ); out_Q8[ k ] = out32; out32 = silk_LSHIFT( out32, 2 ); - S[ 0 ] = silk_SMLAWB( S[ 1 ], out32, A_Q14[ 0 ] ); - S[ 1 ] = silk_SMULWB( out32, A_Q14[ 1 ] ); + S[ 0 ] = (opus_int32) silk_SMLAWB( S[ 1 ], out32, A_Q14[ 0 ] ); + S[ 1 ] = (opus_int32) silk_SMULWB( out32, A_Q14[ 1 ] ); } } diff --git a/Frameworks/Opus/Opus/opus/silk/resampler_private_down_FIR.c b/Frameworks/Opus/Opus/opus/silk/resampler_private_down_FIR.c index 783e42b35..963c97393 100644 --- a/Frameworks/Opus/Opus/opus/silk/resampler_private_down_FIR.c +++ b/Frameworks/Opus/Opus/opus/silk/resampler_private_down_FIR.c @@ -55,29 +55,29 @@ static OPUS_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL( buf_ptr = buf + silk_RSHIFT( index_Q16, 16 ); /* Fractional part gives interpolation coefficients */ - interpol_ind = silk_SMULWB( index_Q16 & 0xFFFF, FIR_Fracs ); + interpol_ind = (opus_int32) silk_SMULWB( index_Q16 & 0xFFFF, FIR_Fracs ); /* Inner product */ interpol_ptr = &FIR_Coefs[ RESAMPLER_DOWN_ORDER_FIR0 / 2 * interpol_ind ]; - res_Q6 = silk_SMULWB( buf_ptr[ 0 ], interpol_ptr[ 0 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 1 ], interpol_ptr[ 1 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 2 ], interpol_ptr[ 2 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 3 ], interpol_ptr[ 3 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 4 ], interpol_ptr[ 4 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 5 ], interpol_ptr[ 5 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 6 ], interpol_ptr[ 6 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 7 ], interpol_ptr[ 7 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 8 ], interpol_ptr[ 8 ] ); + res_Q6 = (opus_int32) silk_SMULWB( buf_ptr[ 0 ], interpol_ptr[ 0 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 1 ], interpol_ptr[ 1 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 2 ], interpol_ptr[ 2 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 3 ], interpol_ptr[ 3 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 4 ], interpol_ptr[ 4 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 5 ], interpol_ptr[ 5 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 6 ], interpol_ptr[ 6 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 7 ], interpol_ptr[ 7 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 8 ], interpol_ptr[ 8 ] ); interpol_ptr = &FIR_Coefs[ RESAMPLER_DOWN_ORDER_FIR0 / 2 * ( FIR_Fracs - 1 - interpol_ind ) ]; - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 17 ], interpol_ptr[ 0 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 16 ], interpol_ptr[ 1 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 15 ], interpol_ptr[ 2 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 14 ], interpol_ptr[ 3 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 13 ], interpol_ptr[ 4 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 12 ], interpol_ptr[ 5 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 11 ], interpol_ptr[ 6 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 10 ], interpol_ptr[ 7 ] ); - res_Q6 = silk_SMLAWB( res_Q6, buf_ptr[ 9 ], interpol_ptr[ 8 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 17 ], interpol_ptr[ 0 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 16 ], interpol_ptr[ 1 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 15 ], interpol_ptr[ 2 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 14 ], interpol_ptr[ 3 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 13 ], interpol_ptr[ 4 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 12 ], interpol_ptr[ 5 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 11 ], interpol_ptr[ 6 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 10 ], interpol_ptr[ 7 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, buf_ptr[ 9 ], interpol_ptr[ 8 ] ); /* Scale down, saturate and store in output array */ *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) ); @@ -89,18 +89,18 @@ static OPUS_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL( buf_ptr = buf + silk_RSHIFT( index_Q16, 16 ); /* Inner product */ - res_Q6 = silk_SMULWB( silk_ADD32( buf_ptr[ 0 ], buf_ptr[ 23 ] ), FIR_Coefs[ 0 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 1 ], buf_ptr[ 22 ] ), FIR_Coefs[ 1 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 2 ], buf_ptr[ 21 ] ), FIR_Coefs[ 2 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 3 ], buf_ptr[ 20 ] ), FIR_Coefs[ 3 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 4 ], buf_ptr[ 19 ] ), FIR_Coefs[ 4 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 5 ], buf_ptr[ 18 ] ), FIR_Coefs[ 5 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 6 ], buf_ptr[ 17 ] ), FIR_Coefs[ 6 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 7 ], buf_ptr[ 16 ] ), FIR_Coefs[ 7 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 8 ], buf_ptr[ 15 ] ), FIR_Coefs[ 8 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 9 ], buf_ptr[ 14 ] ), FIR_Coefs[ 9 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 10 ], buf_ptr[ 13 ] ), FIR_Coefs[ 10 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 11 ], buf_ptr[ 12 ] ), FIR_Coefs[ 11 ] ); + res_Q6 = (opus_int32) silk_SMULWB( silk_ADD32( buf_ptr[ 0 ], buf_ptr[ 23 ] ), FIR_Coefs[ 0 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 1 ], buf_ptr[ 22 ] ), FIR_Coefs[ 1 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 2 ], buf_ptr[ 21 ] ), FIR_Coefs[ 2 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 3 ], buf_ptr[ 20 ] ), FIR_Coefs[ 3 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 4 ], buf_ptr[ 19 ] ), FIR_Coefs[ 4 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 5 ], buf_ptr[ 18 ] ), FIR_Coefs[ 5 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 6 ], buf_ptr[ 17 ] ), FIR_Coefs[ 6 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 7 ], buf_ptr[ 16 ] ), FIR_Coefs[ 7 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 8 ], buf_ptr[ 15 ] ), FIR_Coefs[ 8 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 9 ], buf_ptr[ 14 ] ), FIR_Coefs[ 9 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 10 ], buf_ptr[ 13 ] ), FIR_Coefs[ 10 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 11 ], buf_ptr[ 12 ] ), FIR_Coefs[ 11 ] ); /* Scale down, saturate and store in output array */ *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) ); @@ -112,24 +112,24 @@ static OPUS_INLINE opus_int16 *silk_resampler_private_down_FIR_INTERPOL( buf_ptr = buf + silk_RSHIFT( index_Q16, 16 ); /* Inner product */ - res_Q6 = silk_SMULWB( silk_ADD32( buf_ptr[ 0 ], buf_ptr[ 35 ] ), FIR_Coefs[ 0 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 1 ], buf_ptr[ 34 ] ), FIR_Coefs[ 1 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 2 ], buf_ptr[ 33 ] ), FIR_Coefs[ 2 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 3 ], buf_ptr[ 32 ] ), FIR_Coefs[ 3 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 4 ], buf_ptr[ 31 ] ), FIR_Coefs[ 4 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 5 ], buf_ptr[ 30 ] ), FIR_Coefs[ 5 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 6 ], buf_ptr[ 29 ] ), FIR_Coefs[ 6 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 7 ], buf_ptr[ 28 ] ), FIR_Coefs[ 7 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 8 ], buf_ptr[ 27 ] ), FIR_Coefs[ 8 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 9 ], buf_ptr[ 26 ] ), FIR_Coefs[ 9 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 10 ], buf_ptr[ 25 ] ), FIR_Coefs[ 10 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 11 ], buf_ptr[ 24 ] ), FIR_Coefs[ 11 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 12 ], buf_ptr[ 23 ] ), FIR_Coefs[ 12 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 13 ], buf_ptr[ 22 ] ), FIR_Coefs[ 13 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 14 ], buf_ptr[ 21 ] ), FIR_Coefs[ 14 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 15 ], buf_ptr[ 20 ] ), FIR_Coefs[ 15 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 16 ], buf_ptr[ 19 ] ), FIR_Coefs[ 16 ] ); - res_Q6 = silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 17 ], buf_ptr[ 18 ] ), FIR_Coefs[ 17 ] ); + res_Q6 = (opus_int32) silk_SMULWB( silk_ADD32( buf_ptr[ 0 ], buf_ptr[ 35 ] ), FIR_Coefs[ 0 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 1 ], buf_ptr[ 34 ] ), FIR_Coefs[ 1 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 2 ], buf_ptr[ 33 ] ), FIR_Coefs[ 2 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 3 ], buf_ptr[ 32 ] ), FIR_Coefs[ 3 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 4 ], buf_ptr[ 31 ] ), FIR_Coefs[ 4 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 5 ], buf_ptr[ 30 ] ), FIR_Coefs[ 5 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 6 ], buf_ptr[ 29 ] ), FIR_Coefs[ 6 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 7 ], buf_ptr[ 28 ] ), FIR_Coefs[ 7 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 8 ], buf_ptr[ 27 ] ), FIR_Coefs[ 8 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 9 ], buf_ptr[ 26 ] ), FIR_Coefs[ 9 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 10 ], buf_ptr[ 25 ] ), FIR_Coefs[ 10 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 11 ], buf_ptr[ 24 ] ), FIR_Coefs[ 11 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 12 ], buf_ptr[ 23 ] ), FIR_Coefs[ 12 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 13 ], buf_ptr[ 22 ] ), FIR_Coefs[ 13 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 14 ], buf_ptr[ 21 ] ), FIR_Coefs[ 14 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 15 ], buf_ptr[ 20 ] ), FIR_Coefs[ 15 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 16 ], buf_ptr[ 19 ] ), FIR_Coefs[ 16 ] ); + res_Q6 = (opus_int32) silk_SMLAWB( res_Q6, silk_ADD32( buf_ptr[ 17 ], buf_ptr[ 18 ] ), FIR_Coefs[ 17 ] ); /* Scale down, saturate and store in output array */ *out++ = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( res_Q6, 6 ) ); diff --git a/Frameworks/Opus/Opus/opus/silk/resampler_private_up2_HQ.c b/Frameworks/Opus/Opus/opus/silk/resampler_private_up2_HQ.c index c7ec8de36..26cefe645 100644 --- a/Frameworks/Opus/Opus/opus/silk/resampler_private_up2_HQ.c +++ b/Frameworks/Opus/Opus/opus/silk/resampler_private_up2_HQ.c @@ -59,19 +59,19 @@ void silk_resampler_private_up2_HQ( /* First all-pass section for even output sample */ Y = silk_SUB32( in32, S[ 0 ] ); - X = silk_SMULWB( Y, silk_resampler_up2_hq_0[ 0 ] ); + X = (opus_int32) silk_SMULWB( Y, silk_resampler_up2_hq_0[ 0 ] ); out32_1 = silk_ADD32( S[ 0 ], X ); S[ 0 ] = silk_ADD32( in32, X ); /* Second all-pass section for even output sample */ Y = silk_SUB32( out32_1, S[ 1 ] ); - X = silk_SMULWB( Y, silk_resampler_up2_hq_0[ 1 ] ); + X = (opus_int32) silk_SMULWB( Y, silk_resampler_up2_hq_0[ 1 ] ); out32_2 = silk_ADD32( S[ 1 ], X ); S[ 1 ] = silk_ADD32( out32_1, X ); /* Third all-pass section for even output sample */ Y = silk_SUB32( out32_2, S[ 2 ] ); - X = silk_SMLAWB( Y, Y, silk_resampler_up2_hq_0[ 2 ] ); + X = (opus_int32) silk_SMLAWB( Y, Y, silk_resampler_up2_hq_0[ 2 ] ); out32_1 = silk_ADD32( S[ 2 ], X ); S[ 2 ] = silk_ADD32( out32_2, X ); @@ -80,19 +80,19 @@ void silk_resampler_private_up2_HQ( /* First all-pass section for odd output sample */ Y = silk_SUB32( in32, S[ 3 ] ); - X = silk_SMULWB( Y, silk_resampler_up2_hq_1[ 0 ] ); + X = (opus_int32) silk_SMULWB( Y, silk_resampler_up2_hq_1[ 0 ] ); out32_1 = silk_ADD32( S[ 3 ], X ); S[ 3 ] = silk_ADD32( in32, X ); /* Second all-pass section for odd output sample */ Y = silk_SUB32( out32_1, S[ 4 ] ); - X = silk_SMULWB( Y, silk_resampler_up2_hq_1[ 1 ] ); + X = (opus_int32) silk_SMULWB( Y, silk_resampler_up2_hq_1[ 1 ] ); out32_2 = silk_ADD32( S[ 4 ], X ); S[ 4 ] = silk_ADD32( out32_1, X ); /* Third all-pass section for odd output sample */ Y = silk_SUB32( out32_2, S[ 5 ] ); - X = silk_SMLAWB( Y, Y, silk_resampler_up2_hq_1[ 2 ] ); + X = (opus_int32) silk_SMLAWB( Y, Y, silk_resampler_up2_hq_1[ 2 ] ); out32_1 = silk_ADD32( S[ 5 ], X ); S[ 5 ] = silk_ADD32( out32_2, X ); diff --git a/Frameworks/Opus/Opus/opus/silk/stereo_LR_to_MS.c b/Frameworks/Opus/Opus/opus/silk/stereo_LR_to_MS.c index 42906e6f6..2cfa84d56 100644 --- a/Frameworks/Opus/Opus/opus/silk/stereo_LR_to_MS.c +++ b/Frameworks/Opus/Opus/opus/silk/stereo_LR_to_MS.c @@ -96,7 +96,7 @@ void silk_stereo_LR_to_MS( smooth_coef_Q16 = is10msFrame ? SILK_FIX_CONST( STEREO_RATIO_SMOOTH_COEF / 2, 16 ) : SILK_FIX_CONST( STEREO_RATIO_SMOOTH_COEF, 16 ); - smooth_coef_Q16 = silk_SMULWB( silk_SMULBB( prev_speech_act_Q8, prev_speech_act_Q8 ), smooth_coef_Q16 ); + smooth_coef_Q16 = (opus_int32) silk_SMULWB( silk_SMULBB( prev_speech_act_Q8, prev_speech_act_Q8 ), smooth_coef_Q16 ); pred_Q13[ 0 ] = silk_stereo_find_predictor( &LP_ratio_Q14, LP_mid, LP_side, &state->mid_side_amp_Q0[ 0 ], frame_length, smooth_coef_Q16 ); pred_Q13[ 1 ] = silk_stereo_find_predictor( &HP_ratio_Q14, HP_mid, HP_side, &state->mid_side_amp_Q0[ 2 ], frame_length, smooth_coef_Q16 ); @@ -120,7 +120,7 @@ void silk_stereo_LR_to_MS( mid_side_rates_bps[ 1 ] = total_rate_bps - mid_side_rates_bps[ 0 ]; /* width = 4 * ( 2 * side_rate - min_rate ) / ( ( 1 + 3 * frac ) * min_rate ) */ width_Q14 = silk_DIV32_varQ( silk_LSHIFT( mid_side_rates_bps[ 1 ], 1 ) - min_mid_rate_bps, - silk_SMULWB( SILK_FIX_CONST( 1, 16 ) + frac_3_Q16, min_mid_rate_bps ), 14+2 ); + (opus_int32) silk_SMULWB( SILK_FIX_CONST( 1, 16 ) + frac_3_Q16, min_mid_rate_bps ), 14+2 ); width_Q14 = silk_LIMIT( width_Q14, 0, SILK_FIX_CONST( 1, 14 ) ); } else { mid_side_rates_bps[ 1 ] = total_rate_bps - mid_side_rates_bps[ 0 ]; @@ -208,8 +208,8 @@ void silk_stereo_LR_to_MS( pred1_Q13 += delta1_Q13; w_Q24 += deltaw_Q24; sum = silk_LSHIFT( silk_ADD_LSHIFT( mid[ n ] + mid[ n + 2 ], mid[ n + 1 ], 1 ), 9 ); /* Q11 */ - sum = silk_SMLAWB( silk_SMULWB( w_Q24, side[ n + 1 ] ), sum, pred0_Q13 ); /* Q8 */ - sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)mid[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ + sum = (opus_int32) silk_SMLAWB( silk_SMULWB( w_Q24, side[ n + 1 ] ), sum, pred0_Q13 ); /* Q8 */ + sum = (opus_int32) silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)mid[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ x2[ n - 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) ); } @@ -218,8 +218,8 @@ void silk_stereo_LR_to_MS( w_Q24 = silk_LSHIFT( width_Q14, 10 ); for( n = STEREO_INTERP_LEN_MS * fs_kHz; n < frame_length; n++ ) { sum = silk_LSHIFT( silk_ADD_LSHIFT( mid[ n ] + mid[ n + 2 ], mid[ n + 1 ], 1 ), 9 ); /* Q11 */ - sum = silk_SMLAWB( silk_SMULWB( w_Q24, side[ n + 1 ] ), sum, pred0_Q13 ); /* Q8 */ - sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)mid[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ + sum = (opus_int32) silk_SMLAWB( silk_SMULWB( w_Q24, side[ n + 1 ] ), sum, pred0_Q13 ); /* Q8 */ + sum = (opus_int32) silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)mid[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ x2[ n - 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) ); } state->pred_prev_Q13[ 0 ] = (opus_int16)pred_Q13[ 0 ]; diff --git a/Frameworks/Opus/Opus/opus/silk/stereo_MS_to_LR.c b/Frameworks/Opus/Opus/opus/silk/stereo_MS_to_LR.c index 62521a4f3..cfe79117c 100644 --- a/Frameworks/Opus/Opus/opus/silk/stereo_MS_to_LR.c +++ b/Frameworks/Opus/Opus/opus/silk/stereo_MS_to_LR.c @@ -60,16 +60,16 @@ void silk_stereo_MS_to_LR( pred0_Q13 += delta0_Q13; pred1_Q13 += delta1_Q13; sum = silk_LSHIFT( silk_ADD_LSHIFT( x1[ n ] + x1[ n + 2 ], x1[ n + 1 ], 1 ), 9 ); /* Q11 */ - sum = silk_SMLAWB( silk_LSHIFT( (opus_int32)x2[ n + 1 ], 8 ), sum, pred0_Q13 ); /* Q8 */ - sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)x1[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ + sum = (opus_int32) silk_SMLAWB( silk_LSHIFT( (opus_int32)x2[ n + 1 ], 8 ), sum, pred0_Q13 ); /* Q8 */ + sum = (opus_int32) silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)x1[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ x2[ n + 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) ); } pred0_Q13 = pred_Q13[ 0 ]; pred1_Q13 = pred_Q13[ 1 ]; for( n = STEREO_INTERP_LEN_MS * fs_kHz; n < frame_length; n++ ) { sum = silk_LSHIFT( silk_ADD_LSHIFT( x1[ n ] + x1[ n + 2 ], x1[ n + 1 ], 1 ), 9 ); /* Q11 */ - sum = silk_SMLAWB( silk_LSHIFT( (opus_int32)x2[ n + 1 ], 8 ), sum, pred0_Q13 ); /* Q8 */ - sum = silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)x1[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ + sum = (opus_int32) silk_SMLAWB( silk_LSHIFT( (opus_int32)x2[ n + 1 ], 8 ), sum, pred0_Q13 ); /* Q8 */ + sum = (opus_int32) silk_SMLAWB( sum, silk_LSHIFT( (opus_int32)x1[ n + 1 ], 11 ), pred1_Q13 ); /* Q8 */ x2[ n + 1 ] = (opus_int16)silk_SAT16( silk_RSHIFT_ROUND( sum, 8 ) ); } state->pred_prev_Q13[ 0 ] = pred_Q13[ 0 ]; diff --git a/Frameworks/Opus/Opus/opus/silk/stereo_find_predictor.c b/Frameworks/Opus/Opus/opus/silk/stereo_find_predictor.c index e30e90bdd..ba68acd62 100644 --- a/Frameworks/Opus/Opus/opus/silk/stereo_find_predictor.c +++ b/Frameworks/Opus/Opus/opus/silk/stereo_find_predictor.c @@ -55,7 +55,7 @@ opus_int32 silk_stereo_find_predictor( /* O Returns corr = silk_inner_prod_aligned_scale( x, y, scale, length ); pred_Q13 = silk_DIV32_varQ( corr, nrgx, 13 ); pred_Q13 = silk_LIMIT( pred_Q13, -(1 << 14), 1 << 14 ); - pred2_Q10 = silk_SMULWB( pred_Q13, pred_Q13 ); + pred2_Q10 = (opus_int32) silk_SMULWB( pred_Q13, pred_Q13 ); /* Faster update for signals with large prediction parameters */ smooth_coef_Q16 = (opus_int)silk_max_int( smooth_coef_Q16, silk_abs( pred2_Q10 ) ); @@ -63,12 +63,12 @@ opus_int32 silk_stereo_find_predictor( /* O Returns /* Smoothed mid and residual norms */ silk_assert( smooth_coef_Q16 < 32768 ); scale = silk_RSHIFT( scale, 1 ); - mid_res_amp_Q0[ 0 ] = silk_SMLAWB( mid_res_amp_Q0[ 0 ], silk_LSHIFT( silk_SQRT_APPROX( nrgx ), scale ) - mid_res_amp_Q0[ 0 ], + mid_res_amp_Q0[ 0 ] = (opus_int32) silk_SMLAWB( mid_res_amp_Q0[ 0 ], silk_LSHIFT( silk_SQRT_APPROX( nrgx ), scale ) - mid_res_amp_Q0[ 0 ], smooth_coef_Q16 ); /* Residual energy = nrgy - 2 * pred * corr + pred^2 * nrgx */ nrgy = silk_SUB_LSHIFT32( nrgy, silk_SMULWB( corr, pred_Q13 ), 3 + 1 ); nrgy = silk_ADD_LSHIFT32( nrgy, silk_SMULWB( nrgx, pred2_Q10 ), 6 ); - mid_res_amp_Q0[ 1 ] = silk_SMLAWB( mid_res_amp_Q0[ 1 ], silk_LSHIFT( silk_SQRT_APPROX( nrgy ), scale ) - mid_res_amp_Q0[ 1 ], + mid_res_amp_Q0[ 1 ] = (opus_int32) silk_SMLAWB( mid_res_amp_Q0[ 1 ], silk_LSHIFT( silk_SQRT_APPROX( nrgy ), scale ) - mid_res_amp_Q0[ 1 ], smooth_coef_Q16 ); /* Ratio of smoothed residual and mid norms */ diff --git a/Frameworks/Opus/Opus/opus/silk/x86/NSQ_del_dec_sse.c b/Frameworks/Opus/Opus/opus/silk/x86/NSQ_del_dec_sse.c index 21d4a8bc1..f5245dc17 100644 --- a/Frameworks/Opus/Opus/opus/silk/x86/NSQ_del_dec_sse.c +++ b/Frameworks/Opus/Opus/opus/silk/x86/NSQ_del_dec_sse.c @@ -395,7 +395,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( pred_lag_ptr_tmp = _mm_add_epi32( pred_lag_ptr_tmp, tmpb ); LTP_pred_Q14 += _mm_cvtsi128_si32( pred_lag_ptr_tmp ); - LTP_pred_Q14 = silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -4 ], b_Q14[ 4 ] ); + LTP_pred_Q14 = (opus_int32) silk_SMLAWB( LTP_pred_Q14, pred_lag_ptr[ -4 ], b_Q14[ 4 ] ); LTP_pred_Q14 = silk_LSHIFT( LTP_pred_Q14, 1 ); /* Q13 -> Q14 */ pred_lag_ptr++; } @@ -406,7 +406,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( /* Long-term shaping */ if( lag > 0 ) { /* Symmetric, packed FIR coefficients */ - n_LTP_Q14 = silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); + n_LTP_Q14 = (opus_int32) silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); n_LTP_Q14 = silk_SMLAWT( n_LTP_Q14, shp_lag_ptr[ -1 ], HarmShapeFIRPacked_Q14 ); n_LTP_Q14 = silk_SUB_LSHIFT32( LTP_pred_Q14, n_LTP_Q14, 2 ); /* Q12 -> Q14 */ shp_lag_ptr++; @@ -503,8 +503,8 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( tmpb = _mm_add_epi32( tmpb, tmpa ); LPC_pred_Q14 += _mm_cvtsi128_si32( tmpb ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -8 ], a_Q12[ 8 ] ); - LPC_pred_Q14 = silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -9 ], a_Q12[ 9 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -8 ], a_Q12[ 8 ] ); + LPC_pred_Q14 = (opus_int32) silk_SMLAWB( LPC_pred_Q14, psLPC_Q14[ -9 ], a_Q12[ 9 ] ); } LPC_pred_Q14 = silk_LSHIFT( LPC_pred_Q14, 4 ); /* Q10 -> Q14 */ @@ -512,31 +512,31 @@ static OPUS_INLINE void silk_noise_shape_quantizer_del_dec_sse4_1( /* Noise shape feedback */ silk_assert( ( shapingLPCOrder & 1 ) == 0 ); /* check that order is even */ /* Output of lowpass section */ - tmp2 = silk_SMLAWB( psLPC_Q14[ 0 ], psDD->sAR2_Q14[ 0 ], warping_Q16 ); + tmp2 = (opus_int32) silk_SMLAWB( psLPC_Q14[ 0 ], psDD->sAR2_Q14[ 0 ], warping_Q16 ); /* Output of allpass section */ - tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ 0 ], psDD->sAR2_Q14[ 1 ] - tmp2, warping_Q16 ); + tmp1 = (opus_int32) silk_SMLAWB( psDD->sAR2_Q14[ 0 ], psDD->sAR2_Q14[ 1 ] - tmp2, warping_Q16 ); psDD->sAR2_Q14[ 0 ] = tmp2; n_AR_Q14 = silk_RSHIFT( shapingLPCOrder, 1 ); - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] ); + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ 0 ] ); /* Loop over allpass sections */ for( j = 2; j < shapingLPCOrder; j += 2 ) { /* Output of allpass section */ - tmp2 = silk_SMLAWB( psDD->sAR2_Q14[ j - 1 ], psDD->sAR2_Q14[ j + 0 ] - tmp1, warping_Q16 ); + tmp2 = (opus_int32) silk_SMLAWB( psDD->sAR2_Q14[ j - 1 ], psDD->sAR2_Q14[ j + 0 ] - tmp1, warping_Q16 ); psDD->sAR2_Q14[ j - 1 ] = tmp1; - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] ); + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ j - 1 ] ); /* Output of allpass section */ - tmp1 = silk_SMLAWB( psDD->sAR2_Q14[ j + 0 ], psDD->sAR2_Q14[ j + 1 ] - tmp2, warping_Q16 ); + tmp1 = (opus_int32) silk_SMLAWB( psDD->sAR2_Q14[ j + 0 ], psDD->sAR2_Q14[ j + 1 ] - tmp2, warping_Q16 ); psDD->sAR2_Q14[ j + 0 ] = tmp2; - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ j ] ); + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, tmp2, AR_shp_Q13[ j ] ); } psDD->sAR2_Q14[ shapingLPCOrder - 1 ] = tmp1; - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ shapingLPCOrder - 1 ] ); + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, tmp1, AR_shp_Q13[ shapingLPCOrder - 1 ] ); n_AR_Q14 = silk_LSHIFT( n_AR_Q14, 1 ); /* Q11 -> Q12 */ - n_AR_Q14 = silk_SMLAWB( n_AR_Q14, psDD->LF_AR_Q14, Tilt_Q14 ); /* Q12 */ + n_AR_Q14 = (opus_int32) silk_SMLAWB( n_AR_Q14, psDD->LF_AR_Q14, Tilt_Q14 ); /* Q12 */ n_AR_Q14 = silk_LSHIFT( n_AR_Q14, 2 ); /* Q12 -> Q14 */ - n_LF_Q14 = silk_SMULWB( psDD->Shape_Q14[ *smpl_buf_idx ], LF_shp_Q14 ); /* Q12 */ + n_LF_Q14 = (opus_int32) silk_SMULWB( psDD->Shape_Q14[ *smpl_buf_idx ], LF_shp_Q14 ); /* Q12 */ n_LF_Q14 = silk_SMLAWT( n_LF_Q14, psDD->LF_AR_Q14, LF_shp_Q14 ); /* Q12 */ n_LF_Q14 = silk_LSHIFT( n_LF_Q14, 2 ); /* Q12 -> Q14 */ @@ -779,7 +779,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_sse4_1( } for( ; i < psEncC->subfr_length; i++ ) { - x_sc_Q10[ i ] = silk_SMULWW( x_Q3[ i ], inv_gain_Q23 ); + x_sc_Q10[ i ] = (opus_int32) silk_SMULWW( x_Q3[ i ], inv_gain_Q23 ); } /* Save inverse gain */ @@ -793,7 +793,7 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_sse4_1( } for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) { silk_assert( i < MAX_FRAME_LENGTH ); - sLTP_Q15[ i ] = silk_SMULWB( inv_gain_Q31, sLTP[ i ] ); + sLTP_Q15[ i ] = (opus_int32) silk_SMULWB( inv_gain_Q31, sLTP[ i ] ); } } @@ -824,13 +824,13 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_sse4_1( } for( ; i < NSQ->sLTP_shp_buf_idx; i++ ) { - NSQ->sLTP_shp_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] ); + NSQ->sLTP_shp_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] ); } /* Scale long-term prediction state */ if( signal_type == TYPE_VOICED && NSQ->rewhite_flag == 0 ) { for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx - decisionDelay; i++ ) { - sLTP_Q15[ i ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] ); + sLTP_Q15[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] ); } } @@ -838,18 +838,18 @@ static OPUS_INLINE void silk_nsq_del_dec_scale_states_sse4_1( psDD = &psDelDec[ k ]; /* Scale scalar states */ - psDD->LF_AR_Q14 = silk_SMULWW( gain_adj_Q16, psDD->LF_AR_Q14 ); + psDD->LF_AR_Q14 = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->LF_AR_Q14 ); /* Scale short-term prediction and shaping states */ for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) { - psDD->sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->sLPC_Q14[ i ] ); + psDD->sLPC_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->sLPC_Q14[ i ] ); } for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) { - psDD->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->sAR2_Q14[ i ] ); + psDD->sAR2_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->sAR2_Q14[ i ] ); } for( i = 0; i < DECISION_DELAY; i++ ) { - psDD->Pred_Q15[ i ] = silk_SMULWW( gain_adj_Q16, psDD->Pred_Q15[ i ] ); - psDD->Shape_Q14[ i ] = silk_SMULWW( gain_adj_Q16, psDD->Shape_Q14[ i ] ); + psDD->Pred_Q15[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->Pred_Q15[ i ] ); + psDD->Shape_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, psDD->Shape_Q14[ i ] ); } } } diff --git a/Frameworks/Opus/Opus/opus/silk/x86/NSQ_sse.c b/Frameworks/Opus/Opus/opus/silk/x86/NSQ_sse.c index 72f34fd6f..1d2965612 100644 --- a/Frameworks/Opus/Opus/opus/silk/x86/NSQ_sse.c +++ b/Frameworks/Opus/Opus/opus/silk/x86/NSQ_sse.c @@ -419,7 +419,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( LTP_pred_Q13 += _mm_cvtsi128_si32( xmm_tempa ); - LTP_pred_Q13 = silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], b_Q14[ 4 ] ); + LTP_pred_Q13 = (opus_int32) silk_SMLAWB( LTP_pred_Q13, pred_lag_ptr[ -4 ], b_Q14[ 4 ] ); pred_lag_ptr++; } } @@ -454,13 +454,13 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( n_AR_Q12 = 5 + _mm_cvtsi128_si32( xmm_hi_07 ); - n_AR_Q12 = silk_SMLAWB( n_AR_Q12, NSQ->sAR2_Q14[ 8 ], AR_shp_Q13[ 8 ] ); - n_AR_Q12 = silk_SMLAWB( n_AR_Q12, NSQ->sAR2_Q14[ 9 ], AR_shp_Q13[ 9 ] ); + n_AR_Q12 = (opus_int32) silk_SMLAWB( n_AR_Q12, NSQ->sAR2_Q14[ 8 ], AR_shp_Q13[ 8 ] ); + n_AR_Q12 = (opus_int32) silk_SMLAWB( n_AR_Q12, NSQ->sAR2_Q14[ 9 ], AR_shp_Q13[ 9 ] ); n_AR_Q12 = silk_LSHIFT32( n_AR_Q12, 1 ); /* Q11 -> Q12 */ - n_AR_Q12 = silk_SMLAWB( n_AR_Q12, sLF_AR_shp_Q14, Tilt_Q14 ); + n_AR_Q12 = (opus_int32) silk_SMLAWB( n_AR_Q12, sLF_AR_shp_Q14, Tilt_Q14 ); - n_LF_Q12 = silk_SMULWB( NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - 1 ], LF_shp_Q14 ); + n_LF_Q12 = (opus_int32) silk_SMULWB( NSQ->sLTP_shp_Q14[ NSQ->sLTP_shp_buf_idx - 1 ], LF_shp_Q14 ); n_LF_Q12 = silk_SMLAWT( n_LF_Q12, sLF_AR_shp_Q14, LF_shp_Q14 ); silk_assert( lag > 0 || signalType != TYPE_VOICED ); @@ -470,7 +470,7 @@ static OPUS_INLINE void silk_noise_shape_quantizer_10_16_sse4_1( tmp1 = silk_SUB32( tmp1, n_LF_Q12 ); /* Q12 */ if( lag > 0 ) { /* Symmetric, packed FIR coefficients */ - n_LTP_Q13 = silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); + n_LTP_Q13 = (opus_int32) silk_SMULWB( silk_ADD32( shp_lag_ptr[ 0 ], shp_lag_ptr[ -2 ] ), HarmShapeFIRPacked_Q14 ); n_LTP_Q13 = silk_SMLAWT( n_LTP_Q13, shp_lag_ptr[ -1 ], HarmShapeFIRPacked_Q14 ); n_LTP_Q13 = silk_LSHIFT( n_LTP_Q13, 1 ); shp_lag_ptr++; @@ -653,7 +653,7 @@ static OPUS_INLINE void silk_nsq_scale_states_sse4_1( } for( ; i < psEncC->subfr_length; i++ ) { - x_sc_Q10[ i ] = silk_SMULWW( x_Q3[ i ], inv_gain_Q23 ); + x_sc_Q10[ i ] = (opus_int32) silk_SMULWW( x_Q3[ i ], inv_gain_Q23 ); } /* Save inverse gain */ @@ -667,7 +667,7 @@ static OPUS_INLINE void silk_nsq_scale_states_sse4_1( } for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) { silk_assert( i < MAX_FRAME_LENGTH ); - sLTP_Q15[ i ] = silk_SMULWB( inv_gain_Q31, sLTP[ i ] ); + sLTP_Q15[ i ] = (opus_int32) silk_SMULWB( inv_gain_Q31, sLTP[ i ] ); } } @@ -697,24 +697,24 @@ static OPUS_INLINE void silk_nsq_scale_states_sse4_1( } for( ; i < NSQ->sLTP_shp_buf_idx; i++ ) { - NSQ->sLTP_shp_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] ); + NSQ->sLTP_shp_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sLTP_shp_Q14[ i ] ); } /* Scale long-term prediction state */ if( signal_type == TYPE_VOICED && NSQ->rewhite_flag == 0 ) { for( i = NSQ->sLTP_buf_idx - lag - LTP_ORDER / 2; i < NSQ->sLTP_buf_idx; i++ ) { - sLTP_Q15[ i ] = silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] ); + sLTP_Q15[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, sLTP_Q15[ i ] ); } } - NSQ->sLF_AR_shp_Q14 = silk_SMULWW( gain_adj_Q16, NSQ->sLF_AR_shp_Q14 ); + NSQ->sLF_AR_shp_Q14 = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sLF_AR_shp_Q14 ); /* Scale short-term prediction and shaping states */ for( i = 0; i < NSQ_LPC_BUF_LENGTH; i++ ) { - NSQ->sLPC_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sLPC_Q14[ i ] ); + NSQ->sLPC_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sLPC_Q14[ i ] ); } for( i = 0; i < MAX_SHAPE_LPC_ORDER; i++ ) { - NSQ->sAR2_Q14[ i ] = silk_SMULWW( gain_adj_Q16, NSQ->sAR2_Q14[ i ] ); + NSQ->sAR2_Q14[ i ] = (opus_int32) silk_SMULWW( gain_adj_Q16, NSQ->sAR2_Q14[ i ] ); } } } diff --git a/Frameworks/Opus/Opus/opus/silk/x86/VAD_sse.c b/Frameworks/Opus/Opus/opus/silk/x86/VAD_sse.c index 4e90f4410..0f4fb7a62 100644 --- a/Frameworks/Opus/Opus/opus/silk/x86/VAD_sse.c +++ b/Frameworks/Opus/Opus/opus/silk/x86/VAD_sse.c @@ -200,9 +200,9 @@ opus_int silk_VAD_GetSA_Q8_sse4_1( /* O Return value, 0 if s /* Tilt measure */ if( speech_nrg < ( (opus_int32)1 << 20 ) ) { /* Scale down SNR value for small subband speech energies */ - SNR_Q7 = silk_SMULWB( silk_LSHIFT( silk_SQRT_APPROX( speech_nrg ), 6 ), SNR_Q7 ); + SNR_Q7 = (opus_int) silk_SMULWB( silk_LSHIFT( silk_SQRT_APPROX( speech_nrg ), 6 ), SNR_Q7 ); } - input_tilt = silk_SMLAWB( input_tilt, tiltWeights[ b ], SNR_Q7 ); + input_tilt = (opus_int) silk_SMLAWB( input_tilt, tiltWeights[ b ], SNR_Q7 ); } else { NrgToNoiseRatio_Q8[ b ] = 256; } @@ -217,7 +217,7 @@ opus_int silk_VAD_GetSA_Q8_sse4_1( /* O Return value, 0 if s /*********************************/ /* Speech Probability Estimation */ /*********************************/ - SA_Q15 = silk_sigm_Q15( silk_SMULWB( VAD_SNR_FACTOR_Q16, pSNR_dB_Q7 ) - VAD_NEGATIVE_OFFSET_Q5 ); + SA_Q15 = silk_sigm_Q15( (opus_int) silk_SMULWB( VAD_SNR_FACTOR_Q16, pSNR_dB_Q7 ) - VAD_NEGATIVE_OFFSET_Q5 ); /**************************/ /* Frequency Tilt Measure */ @@ -245,7 +245,7 @@ opus_int silk_VAD_GetSA_Q8_sse4_1( /* O Return value, 0 if s /* square-root */ speech_nrg = silk_SQRT_APPROX( speech_nrg ); - SA_Q15 = silk_SMULWB( 32768 + speech_nrg, SA_Q15 ); + SA_Q15 = (opus_int) silk_SMULWB( 32768 + speech_nrg, SA_Q15 ); } /* Copy the resulting speech activity in Q8 */ @@ -255,7 +255,7 @@ opus_int silk_VAD_GetSA_Q8_sse4_1( /* O Return value, 0 if s /* Energy Level and SNR estimation */ /***********************************/ /* Smoothing coefficient */ - smooth_coef_Q16 = silk_SMULWB( VAD_SNR_SMOOTH_COEF_Q18, silk_SMULWB( (opus_int32)SA_Q15, SA_Q15 ) ); + smooth_coef_Q16 = (opus_int) silk_SMULWB( VAD_SNR_SMOOTH_COEF_Q18, silk_SMULWB( (opus_int32)SA_Q15, SA_Q15 ) ); if( psEncC->frame_length == 10 * psEncC->fs_kHz ) { smooth_coef_Q16 >>= 1; @@ -263,7 +263,7 @@ opus_int silk_VAD_GetSA_Q8_sse4_1( /* O Return value, 0 if s for( b = 0; b < VAD_N_BANDS; b++ ) { /* compute smoothed energy-to-noise ratio per band */ - psSilk_VAD->NrgRatioSmth_Q8[ b ] = silk_SMLAWB( psSilk_VAD->NrgRatioSmth_Q8[ b ], + psSilk_VAD->NrgRatioSmth_Q8[ b ] = (opus_int32) silk_SMLAWB( psSilk_VAD->NrgRatioSmth_Q8[ b ], NrgToNoiseRatio_Q8[ b ] - psSilk_VAD->NrgRatioSmth_Q8[ b ], smooth_coef_Q16 ); /* signal to noise ratio in dB per band */ diff --git a/Frameworks/Opus/Opus/opus/silk/x86/VQ_WMat_EC_sse.c b/Frameworks/Opus/Opus/opus/silk/x86/VQ_WMat_EC_sse.c index 74d6c6d0e..50b71ade4 100644 --- a/Frameworks/Opus/Opus/opus/silk/x86/VQ_WMat_EC_sse.c +++ b/Frameworks/Opus/Opus/opus/silk/x86/VQ_WMat_EC_sse.c @@ -99,33 +99,33 @@ void silk_VQ_WMat_EC_sse4_1( C_tmp5 = _mm_add_epi32( C_tmp5, _mm_shuffle_epi32( C_tmp5, _MM_SHUFFLE( 0, 0, 0, 2 ) ) ); sum2_Q16 = _mm_cvtsi128_si32( C_tmp5 ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 0 ], diff_Q14[ 0 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 0 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 0 ], diff_Q14[ 0 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 0 ] ); /* second row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 7 ], diff_Q14[ 2 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 8 ], diff_Q14[ 3 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 9 ], diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 7 ], diff_Q14[ 2 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 8 ], diff_Q14[ 3 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 9 ], diff_Q14[ 4 ] ); sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 6 ], diff_Q14[ 1 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 1 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 6 ], diff_Q14[ 1 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 1 ] ); /* third row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 13 ], diff_Q14[ 3 ] ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 14 ], diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 13 ], diff_Q14[ 3 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 14 ], diff_Q14[ 4 ] ); sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 12 ], diff_Q14[ 2 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 2 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 12 ], diff_Q14[ 2 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 2 ] ); /* fourth row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 19 ], diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 19 ], diff_Q14[ 4 ] ); sum2_Q16 = silk_LSHIFT( sum2_Q16, 1 ); - sum2_Q16 = silk_SMLAWB( sum2_Q16, W_Q18[ 18 ], diff_Q14[ 3 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 3 ] ); + sum2_Q16 = (opus_int32) silk_SMLAWB( sum2_Q16, W_Q18[ 18 ], diff_Q14[ 3 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 3 ] ); /* last row of W_Q18 */ - sum2_Q16 = silk_SMULWB( W_Q18[ 24 ], diff_Q14[ 4 ] ); - sum1_Q14 = silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 4 ] ); + sum2_Q16 = (opus_int32) silk_SMULWB( W_Q18[ 24 ], diff_Q14[ 4 ] ); + sum1_Q14 = (opus_int32) silk_SMLAWB( sum1_Q14, sum2_Q16, diff_Q14[ 4 ] ); silk_assert( sum1_Q14 >= 0 ); diff --git a/Frameworks/Opus/Opus/opus/src/opus_encoder.c b/Frameworks/Opus/Opus/opus/src/opus_encoder.c index 9dbe4bf53..7902a7eda 100644 --- a/Frameworks/Opus/Opus/opus/src/opus_encoder.c +++ b/Frameworks/Opus/Opus/opus/src/opus_encoder.c @@ -337,8 +337,8 @@ static void hp_cutoff(const opus_val16 *in, opus_int32 cutoff_Hz, opus_val16 *ou /* -r * ( 2 - Fc * Fc ); */ r_Q22 = silk_RSHIFT( r_Q28, 6 ); - A_Q28[ 0 ] = silk_SMULWW( r_Q22, silk_SMULWW( Fc_Q19, Fc_Q19 ) - SILK_FIX_CONST( 2.0, 22 ) ); - A_Q28[ 1 ] = silk_SMULWW( r_Q22, r_Q22 ); + A_Q28[ 0 ] = (opus_int32) silk_SMULWW( r_Q22, silk_SMULWW( Fc_Q19, Fc_Q19 ) - SILK_FIX_CONST( 2.0, 22 ) ); + A_Q28[ 1 ] = (opus_int32) silk_SMULWW( r_Q22, r_Q22 ); #ifdef FIXED_POINT silk_biquad_alt( in, B_Q28, A_Q28, hp_mem, out, len, channels ); diff --git a/Frameworks/Opus/Opus/opusfile/src/info.c b/Frameworks/Opus/Opus/opusfile/src/info.c index 3134927b6..da29a029c 100644 --- a/Frameworks/Opus/Opus/opusfile/src/info.c +++ b/Frameworks/Opus/Opus/opusfile/src/info.c @@ -254,8 +254,8 @@ int opus_tags_add(OpusTags *_tags,const char *_tag,const char *_value){ ncomments=_tags->comments; ret=op_tags_ensure_capacity(_tags,ncomments+1); if(OP_UNLIKELY(ret<0))return ret; - tag_len=strlen(_tag); - value_len=strlen(_value); + tag_len=(int) strlen(_tag); + value_len=(int) strlen(_value); /*+2 for '=' and '\0'.*/ _tags->comment_lengths[ncomments]=0; _tags->user_comments[ncomments]=comment= @@ -286,7 +286,7 @@ int opus_tags_add_comment(OpusTags *_tags,const char *_comment){ } int opus_tagcompare(const char *_tag_name,const char *_comment){ - return opus_tagncompare(_tag_name,strlen(_tag_name),_comment); + return opus_tagncompare(_tag_name,(int) strlen(_tag_name),_comment); } int opus_tagncompare(const char *_tag_name,int _tag_len,const char *_comment){ @@ -302,7 +302,7 @@ const char *opus_tags_query(const OpusTags *_tags,const char *_tag,int _count){ int found; int ncomments; int ci; - tag_len=strlen(_tag); + tag_len=(int) strlen(_tag); ncomments=_tags->comments; user_comments=_tags->user_comments; found=0; @@ -322,7 +322,7 @@ int opus_tags_query_count(const OpusTags *_tags,const char *_tag){ int found; int ncomments; int ci; - tag_len=strlen(_tag); + tag_len=(int) strlen(_tag); ncomments=_tags->comments; user_comments=_tags->user_comments; found=0; diff --git a/Frameworks/Opus/Opus/opusfile/src/opusfile.c b/Frameworks/Opus/Opus/opusfile/src/opusfile.c index 1441b97fd..a9f6e1f0f 100644 --- a/Frameworks/Opus/Opus/opusfile/src/opusfile.c +++ b/Frameworks/Opus/Opus/opusfile/src/opusfile.c @@ -188,7 +188,7 @@ static opus_int64 op_get_next_page(OggOpusFile *_of,ogg_page *_og, opus_int64 _boundary){ while(_boundary<=0||_of->offset<_boundary){ int more; - more=ogg_sync_pageseek(&_of->oy,_og); + more=(int)ogg_sync_pageseek(&_of->oy,_og); /*Skipped (-more) bytes.*/ if(OP_UNLIKELY(more<0))_of->offset-=more; else if(more==0){ @@ -678,8 +678,8 @@ static int op_granpos_diff(ogg_int64_t *_delta, should ever be called with these values, so make sure we aren't.*/ OP_ASSERT(_gp_a!=-1); OP_ASSERT(_gp_b!=-1); - gp_a_negative=OP_UNLIKELY(_gp_a<0); - gp_b_negative=OP_UNLIKELY(_gp_b<0); + gp_a_negative=(int) OP_UNLIKELY(_gp_a<0); + gp_b_negative=(int) OP_UNLIKELY(_gp_b<0); if(OP_UNLIKELY(gp_a_negative^gp_b_negative)){ ogg_int64_t da; ogg_int64_t db; @@ -788,7 +788,7 @@ static opus_int32 op_collect_audio_packets(OggOpusFile *_of, single page.*/ OP_ASSERT(op_count<255); _durations[op_count]=op_get_packet_duration(_of->op[op_count].packet, - _of->op[op_count].bytes); + (int) _of->op[op_count].bytes); if(OP_LIKELY(_durations[op_count]>0)){ /*With at most 255 packets on a page, this can't overflow.*/ total_duration+=_durations[op_count++]; @@ -835,7 +835,7 @@ static int op_find_initial_pcm_offset(OggOpusFile *_of, int op_count; int pi; if(_og==NULL)_og=&og; - serialno=_of->os.serialno; + serialno=(ogg_uint32_t) _of->os.serialno; op_count=0; /*We shouldn't have to initialize total_duration, but gcc is too dumb to figure out that op_count>0 implies we've been through the whole loop at @@ -896,7 +896,7 @@ static int op_find_initial_pcm_offset(OggOpusFile *_of, /*But getting a packet without a valid granule position on the page is not okay.*/ if(cur_page_gp==-1)return OP_EBADTIMESTAMP; - cur_page_eos=_of->op[op_count-1].e_o_s; + cur_page_eos=(int) _of->op[op_count-1].e_o_s; if(OP_LIKELY(!cur_page_eos)){ /*The EOS flag wasn't set. Work backwards from the provided granule position to get the starting PCM @@ -1261,7 +1261,7 @@ static int op_bisect_forward_serialno(OggOpusFile *_of, if(OP_UNLIKELY(ret<0))return ret; links[nlinks].offset=next; links[nlinks].data_offset=_of->offset; - links[nlinks].serialno=_of->os.serialno; + links[nlinks].serialno=(ogg_uint32_t) _of->os.serialno; links[nlinks].pcm_end=-1; /*This might consume a page from the next link, however the next bisection always starts with a seek.*/ @@ -1538,7 +1538,7 @@ static int op_open1(OggOpusFile *_of, _of->links[0].offset=0; _of->links[0].data_offset=_of->offset; _of->links[0].pcm_end=-1; - _of->links[0].serialno=_of->os.serialno; + _of->links[0].serialno=(ogg_uint32_t) _of->os.serialno; /*Fetch the initial PCM offset.*/ ret=op_find_initial_pcm_offset(_of,_of->links,&og); if(seekable||OP_LIKELY(ret<=0))break; @@ -1909,7 +1909,7 @@ static int op_fetch_and_process_page(OggOpusFile *_of, so no need to set _ignore_holes.*/ ret=op_find_initial_pcm_offset(_of,links,&og); if(OP_UNLIKELY(ret<0))return ret; - _of->links[0].serialno=cur_serialno=_of->os.serialno; + _of->links[0].serialno=cur_serialno=(ogg_uint32_t) _of->os.serialno; _of->cur_link++; } /*If the link was empty, keep going, because we already have the @@ -1955,7 +1955,7 @@ static int op_fetch_and_process_page(OggOpusFile *_of, int cur_page_eos; int pi; cur_page_gp=_of->op[op_count-1].granulepos; - cur_page_eos=_of->op[op_count-1].e_o_s; + cur_page_eos=(int) _of->op[op_count-1].e_o_s; prev_packet_gp=_of->prev_packet_gp; if(OP_UNLIKELY(prev_packet_gp==-1)){ opus_int32 cur_discard_count; @@ -2242,7 +2242,7 @@ static int op_pcm_seek_page(OggOpusFile *_of, generally 1 second or less), we can loop them continuously without seeking at all.*/ OP_ALWAYS_TRUE(!op_granpos_add(&prev_page_gp,_of->op[0].granulepos, - op_get_packet_duration(_of->op[0].packet,_of->op[0].bytes))); + op_get_packet_duration(_of->op[0].packet,(int) _of->op[0].bytes))); if(op_granpos_cmp(prev_page_gp,_target_gp)<=0){ /*Don't call op_decode_clear(), because it will dump our packets.*/ @@ -2619,7 +2619,7 @@ static int op_decode(OggOpusFile *_of,op_sample *_pcm, _op->packet,_op->bytes,_pcm,_nsamples,0); #else ret=opus_multistream_decode_float(_of->od, - _op->packet,_op->bytes,_pcm,_nsamples,0); + _op->packet,(opus_int32) _op->bytes,_pcm,_nsamples,0); #endif OP_ASSERT(ret<0||ret==_nsamples); } @@ -2666,7 +2666,7 @@ static int op_read_native(OggOpusFile *_of, pop=_of->op+op_pos++; _of->op_pos=op_pos; cur_discard_count=_of->cur_discard_count; - duration=op_get_packet_duration(pop->packet,pop->bytes); + duration=op_get_packet_duration(pop->packet,(int) pop->bytes); /*We don't buffer packets with an invalid TOC sequence.*/ OP_ASSERT(duration>0); trimmed_duration=duration; diff --git a/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj b/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj index a5d618edb..a87c8046a 100644 --- a/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj +++ b/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj @@ -45,6 +45,7 @@ /* Begin PBXFileReference section */ 830109F71A09BC0A0004F8D8 /* codecvt.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = codecvt.h; sourceTree = ""; }; 830109F81A09BC0A0004F8D8 /* wstring_convert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wstring_convert.h; sourceTree = ""; }; + 833F68301CDBCAB100AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 83848FB81807623F00E7332D /* SSEQPlayer.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SSEQPlayer.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 83848FBB1807623F00E7332D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 83848FBE1807623F00E7332D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -236,7 +237,7 @@ 83848FAF1807623F00E7332D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; ORGANIZATIONNAME = "Christopher Snowhill"; }; buildConfigurationList = 83848FB21807623F00E7332D /* Build configuration list for PBXProject "SSEQPlayer" */; @@ -245,6 +246,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 83848FAE1807623F00E7332D; productRefGroup = 83848FB91807623F00E7332D /* Products */; @@ -295,6 +297,7 @@ isa = PBXVariantGroup; children = ( 83848FC51807623F00E7332D /* en */, + 833F68301CDBCAB100AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -318,6 +321,7 @@ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; COPY_PHASE_STRIP = NO; + ENABLE_TESTABILITY = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_OBJC_EXCEPTIONS = YES; @@ -380,6 +384,7 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "SSEQPlayer/SSEQPlayer-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.sseqplayer; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -396,6 +401,7 @@ FRAMEWORK_VERSION = A; INFOPLIST_FILE = "SSEQPlayer/SSEQPlayer-Info.plist"; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = net.kode54.sseqplayer; PRODUCT_NAME = "$(TARGET_NAME)"; SDKROOT = macosx; SKIP_INSTALL = YES; diff --git a/Frameworks/SSEQPlayer/SSEQPlayer/SSEQPlayer-Info.plist b/Frameworks/SSEQPlayer/SSEQPlayer/SSEQPlayer-Info.plist index 5e228b992..d621f5f87 100644 --- a/Frameworks/SSEQPlayer/SSEQPlayer/SSEQPlayer-Info.plist +++ b/Frameworks/SSEQPlayer/SSEQPlayer/SSEQPlayer-Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - net.kode54.sseqplayer + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/SSEQPlayer/SSEQPlayer/es.lproj/InfoPlist.strings b/Frameworks/SSEQPlayer/SSEQPlayer/es.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/SSEQPlayer/SSEQPlayer/es.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/Shorten/Info.plist b/Frameworks/Shorten/Info.plist index 04d758a11..5c18bd9f9 100644 --- a/Frameworks/Shorten/Info.plist +++ b/Frameworks/Shorten/Info.plist @@ -6,14 +6,14 @@ English CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} CFBundleIconFile CFBundleIdentifier - org.cogx.lib.shorten + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleSignature diff --git a/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj b/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj index 57503ba62..ee3911ebb 100644 --- a/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj +++ b/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj @@ -36,6 +36,7 @@ 59FDCD690A2922E1006C1800 /* shn_reader.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = shn_reader.cpp; path = Files/shorten/src/shn_reader.cpp; sourceTree = ""; }; 59FDCD6A0A2922E1006C1800 /* sulawalaw.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = sulawalaw.c; path = Files/shorten/src/sulawalaw.c; sourceTree = ""; }; 59FDCD6B0A2922E1006C1800 /* vario.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = vario.cpp; path = Files/shorten/src/vario.cpp; sourceTree = ""; }; + 833F683E1CDBCAB300AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* Shorten.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Shorten.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ @@ -172,7 +173,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "Shorten" */; compatibilityVersion = "Xcode 3.2"; @@ -180,6 +181,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* Shorten */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -224,6 +226,7 @@ isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, + 833F683E1CDBCAB300AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -248,6 +251,7 @@ GCC_VERSION = ""; INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.shorten; PRODUCT_NAME = Shorten; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -271,6 +275,7 @@ INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; OTHER_CFLAGS = "-DHAVE_CONFIG_H"; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.shorten; PRODUCT_NAME = Shorten; SDKROOT = macosx; SHARED_PRECOMPS_DIR = "$(CACHE_ROOT)/SharedPrecompiledHeaders"; @@ -283,6 +288,7 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/Frameworks/Shorten/es.lproj/InfoPlist.strings b/Frameworks/Shorten/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..7080cf949924e8817cb2121399f078b287079883 GIT binary patch literal 204 zcmW-ZOAf&R6h+Utt7r@xK@3d9$bMd*s%ZBv=Kme5Fyy^_xDn;J8+CjLwb{$gz->i_@% literal 0 HcmV?d00001 diff --git a/Frameworks/Sparkle b/Frameworks/Sparkle index 77f62a0de..d3bbc9140 160000 --- a/Frameworks/Sparkle +++ b/Frameworks/Sparkle @@ -1 +1 @@ -Subproject commit 77f62a0de0c614216ec8bb0461db76f9389ba0d2 +Subproject commit d3bbc9140c9e23a89d077126b2cfb2d14efe1076 diff --git a/Frameworks/Syntrax-c/Syntrax-c/file.c b/Frameworks/Syntrax-c/Syntrax-c/file.c index 016e8404b..b09547889 100644 --- a/Frameworks/Syntrax-c/Syntrax-c/file.c +++ b/Frameworks/Syntrax-c/Syntrax-c/file.c @@ -259,12 +259,12 @@ static long File_readInstrument(Instrument *instr, const uint8_t *buffer, size_t Song* File_loadSongMem(const uint8_t *buffer, size_t size) { - int i, j, k; + int i, j/*, k*/; int songVer; - Subsong *subs; + /*Subsong *subs; Order *orderCol; Order *order; - Row *row; + Row *row;*/ Instrument *instr; Song *synSong; long sizeRead; diff --git a/Frameworks/Syntrax-c/Syntrax-c/resampler.c b/Frameworks/Syntrax-c/Syntrax-c/resampler.c index d14995229..777fe7caa 100644 --- a/Frameworks/Syntrax-c/Syntrax-c/resampler.c +++ b/Frameworks/Syntrax-c/Syntrax-c/resampler.c @@ -315,9 +315,9 @@ static int resampler_wrapper( resampler *r, sample_t out [], int* out_size, sample_t const in [], int in_size ) { sample_t* out_ = out; - int result = resampler_inner_loop( r, &out_, out + *out_size, in, in_size ) - in; + int result = (int)(resampler_inner_loop( r, &out_, out + *out_size, in, in_size ) - in); - *out_size = out_ - out; + *out_size = (int)(out_ - out); return result; } diff --git a/Frameworks/Syntrax-c/Syntrax-c/syntrax.c b/Frameworks/Syntrax-c/Syntrax-c/syntrax.c index 5ca0e6322..e03dd51b3 100644 --- a/Frameworks/Syntrax-c/Syntrax-c/syntrax.c +++ b/Frameworks/Syntrax-c/Syntrax-c/syntrax.c @@ -134,11 +134,11 @@ void playerDestroy(Player *p) Player * playerCreate(int SAMPLEFREQUENCY) { - int i, j; + int i/*, j*/; Player* p; - srand(time(NULL)); + srand((unsigned int)time(NULL)); p = (Player *) calloc(1, sizeof(Player)); if (!p) return NULL; @@ -241,7 +241,7 @@ static void instrEffect(Player *p, int chanNum) int _local38; int _local39; int _local40; - int _local43; + /*int _local43;*/ int butt, ron, pat, buf2, buf1; TuneChannel *tc = &p->tuneChannels[chanNum]; @@ -1666,7 +1666,7 @@ static void ABH(Player *p) _local4 = 0; } _local2 = _local3[_local4].patLen; - if ((((tc->LJHG == _local2)) || ((tc->EQMIWERPIF == -1)))){ + if ((((tc->LJHG == _local2)) || ((tc->EQMIWERPIF == 0xFF)))){ tc->LJHG = 0; tc->EQMIWERPIF++; p->curSubsong.mutedChans[i] = p->mutedChans[i]; @@ -1744,10 +1744,10 @@ void mixChunk(Player *p, int16_t *outBuff, uint playbackBufferSize) { int i, j; uint sampleNum; - int amp, smp, pos; + int amp, smp/*, pos*/; int32_t audioMainR, audioMainL; int32_t audioDelayR, audioDelayL; - uint otherDelayTime; + uint otherDelayTime = 1; Voice *v; TuneChannel *tc; int insNum; @@ -1850,6 +1850,8 @@ void mixChunk(Player *p, int16_t *outBuff, uint playbackBufferSize) { //amp = word_6632B964; //otherDelayTime = word_6632BB24; + amp = 0; + otherDelayTime = 1; } else { @@ -2201,6 +2203,7 @@ static void AAUCAPQW(Player *p) } } +#if 0 static void IMXFLSSMB(Player *p, int _arg1) { p->PQV = 1; @@ -2210,6 +2213,7 @@ static void IMXFLSSMB(Player *p, int _arg1) p->sePmSong = SE_PM_PATTERN; p->WDTECTE = p->subsongs[0].tempo - p->subsongs[0].groove; } +#endif void initSubsong(Player *p, int num) { diff --git a/Frameworks/TagLib/Info.plist b/Frameworks/TagLib/Info.plist index e66f9c65e..5c18bd9f9 100644 --- a/Frameworks/TagLib/Info.plist +++ b/Frameworks/TagLib/Info.plist @@ -9,7 +9,7 @@ CFBundleIconFile CFBundleIdentifier - org.cogx.lib.taglib + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj b/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj index 6f5a6a8b3..6193f43d2 100644 --- a/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj +++ b/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj @@ -352,6 +352,7 @@ 32AE5A5814E70ED600420CA0 /* wavpackproperties.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wavpackproperties.h; sourceTree = ""; }; 32AE5A5914E70ED600420CA0 /* taglib_config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = taglib_config.h; path = taglib/taglib_config.h; sourceTree = ""; }; 4872B8871A675CCB00674347 /* libiconv.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libiconv.dylib; path = usr/lib/libiconv.dylib; sourceTree = SDKROOT; }; + 833F683D1CDBCAB300AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 83790D201809E8CA0073CF51 /* opusfile.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = opusfile.cpp; sourceTree = ""; }; 83790D211809E8CA0073CF51 /* opusfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = opusfile.h; sourceTree = ""; }; 83790D221809E8CA0073CF51 /* opusproperties.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = opusproperties.cpp; sourceTree = ""; }; @@ -896,7 +897,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "TagLib" */; compatibilityVersion = "Xcode 3.2"; @@ -904,6 +905,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* TagLib */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -1025,6 +1027,7 @@ isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, + 833F683D1CDBCAB300AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -1050,6 +1053,7 @@ ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.taglib; PRODUCT_NAME = TagLib; SDKROOT = macosx; WRAPPER_EXTENSION = framework; @@ -1073,6 +1077,7 @@ ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.taglib; PRODUCT_NAME = TagLib; SDKROOT = macosx; WRAPPER_EXTENSION = framework; @@ -1084,6 +1089,7 @@ buildSettings = { COPY_PHASE_STRIP = NO; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/Frameworks/TagLib/es.lproj/InfoPlist.strings b/Frameworks/TagLib/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..7080cf949924e8817cb2121399f078b287079883 GIT binary patch literal 204 zcmW-ZOAf&R6h+Utt7r@xK@3d9$bMd*s%ZBv=Kme5Fyy^_xDn;J8+CjLwb{$gz->i_@% literal 0 HcmV?d00001 diff --git a/Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2framefactory.cpp b/Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2framefactory.cpp index 356d60d4c..3c829d9bd 100644 --- a/Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2framefactory.cpp +++ b/Frameworks/TagLib/taglib/taglib/mpeg/id3v2/id3v2framefactory.cpp @@ -100,7 +100,7 @@ Frame *FrameFactory::createFrame(const ByteVector &origData, Header *tagHeader) // A quick sanity check -- make sure that the frameID is 4 uppercase Latin1 // characters. Also make sure that there is data in the frame. - if(!frameID.size() == (version < 3 ? 3 : 4) || + if(!(frameID.size() == (version < 3 ? 3 : 4)) || header->frameSize() <= uint(header->dataLengthIndicator() ? 4 : 0) || header->frameSize() > data.size()) { diff --git a/Frameworks/Vorbis/macosx/Info.plist b/Frameworks/Vorbis/macosx/Info.plist index 63e1b09c9..c7eec1206 100644 --- a/Frameworks/Vorbis/macosx/Info.plist +++ b/Frameworks/Vorbis/macosx/Info.plist @@ -1,5 +1,5 @@ - + CFBundleDevelopmentRegion @@ -11,7 +11,7 @@ CFBundleIconFile CFBundleIdentifier - org.xiph.vorbis + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundlePackageType @@ -22,9 +22,9 @@ ???? CFBundleVersion 1.2.3 - NSHumanReadableCopyright - Vorbis framework 1.2.3, Copyright © 1994-2009 Xiph.Org Foundation CSResourcesFileMapped + NSHumanReadableCopyright + Vorbis framework 1.2.3, Copyright © 1994-2009 Xiph.Org Foundation diff --git a/Frameworks/Vorbis/macosx/Vorbis.xcodeproj/project.pbxproj b/Frameworks/Vorbis/macosx/Vorbis.xcodeproj/project.pbxproj index 562e74420..6f3ada267 100644 --- a/Frameworks/Vorbis/macosx/Vorbis.xcodeproj/project.pbxproj +++ b/Frameworks/Vorbis/macosx/Vorbis.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 45; + objectVersion = 46; objects = { /* Begin PBXBuildFile section */ @@ -143,6 +143,7 @@ 738836130B190488005C7A69 /* libvorbisenc.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libvorbisenc.a; sourceTree = BUILT_PRODUCTS_DIR; }; 738836220B1905E5005C7A69 /* libvorbisfile.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libvorbisfile.a; sourceTree = BUILT_PRODUCTS_DIR; }; 830F884D19C910B300420FB0 /* Ogg.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Ogg.xcodeproj; path = ../../Ogg/macosx/Ogg.xcodeproj; sourceTree = ""; }; + 833F683B1CDBCAB300AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; F58520B90191D12B01A802FE /* codec.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = codec.h; sourceTree = ""; }; F58520BA0191D12B01A802FE /* vorbisenc.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vorbisenc.h; sourceTree = ""; }; F58520BB0191D12B01A802FE /* vorbisfile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = vorbisfile.h; sourceTree = ""; }; @@ -574,13 +575,15 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { + LastUpgradeCheck = 0730; }; buildConfigurationList = 730F23F3091827B200AB638C /* Build configuration list for PBXProject "Vorbis" */; - compatibilityVersion = "Xcode 2.4"; + compatibilityVersion = "Xcode 3.2"; developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* vorbis */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -727,6 +730,7 @@ isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, + 833F683B1CDBCAB300AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -737,7 +741,7 @@ 730F23ED091827B100AB638C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -755,6 +759,7 @@ LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.7; OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = org.xiph.vorbis; PRODUCT_NAME = Vorbis; SDKROOT = macosx; SECTORDER_FLAGS = ""; @@ -771,8 +776,8 @@ 730F23EE091827B100AB638C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = "$(ARCHS_STANDARD)"; CODE_SIGN_IDENTITY = "Developer ID Application"; + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -788,6 +793,7 @@ LIBRARY_SEARCH_PATHS = ""; MACOSX_DEPLOYMENT_TARGET = 10.7; OTHER_LDFLAGS = ""; + PRODUCT_BUNDLE_IDENTIFIER = org.xiph.vorbis; PRODUCT_NAME = Vorbis; SDKROOT = macosx; SECTORDER_FLAGS = ""; @@ -804,8 +810,10 @@ 730F23F4091827B200AB638C /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_TESTABILITY = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__; + ONLY_ACTIVE_ARCH = YES; SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk"; }; name = Debug; @@ -813,10 +821,6 @@ 730F23F5091827B200AB638C /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - ppc, - i386, - ); GCC_OPTIMIZATION_LEVEL = 3; GCC_PREPROCESSOR_DEFINITIONS = __MACOSX__; OTHER_CFLAGS = ( @@ -830,6 +834,7 @@ 738835E60B18F88E005C7A69 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -849,6 +854,7 @@ 738835E70B18F88E005C7A69 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; @@ -866,6 +872,7 @@ 7388361B0B1904D6005C7A69 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -886,6 +893,7 @@ 7388361C0B1904D6005C7A69 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; @@ -904,6 +912,7 @@ 738836260B19065D005C7A69 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = NO; GCC_DYNAMIC_NO_PIC = NO; GCC_ENABLE_FIX_AND_CONTINUE = YES; @@ -923,6 +932,7 @@ 738836270B19065D005C7A69 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + COMBINE_HIDPI_IMAGES = YES; COPY_PHASE_STRIP = YES; GCC_ENABLE_FIX_AND_CONTINUE = NO; GCC_GENERATE_DEBUGGING_SYMBOLS = NO; diff --git a/Frameworks/Vorbis/macosx/VorbisNoDot.xcodeproj/project.pbxproj b/Frameworks/Vorbis/macosx/VorbisNoDot.xcodeproj/project.pbxproj index 65263dcc8..72a089f3b 100644 --- a/Frameworks/Vorbis/macosx/VorbisNoDot.xcodeproj/project.pbxproj +++ b/Frameworks/Vorbis/macosx/VorbisNoDot.xcodeproj/project.pbxproj @@ -581,6 +581,7 @@ hasScannedForEncodings = 0; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* vorbis */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; diff --git a/Frameworks/Vorbis/macosx/es.lproj/InfoPlist.strings b/Frameworks/Vorbis/macosx/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..cfe1b22a882c2fbdf1a83e1f56d3003b12e59d29 GIT binary patch literal 142 zcmW-Z!3u&<5Jk`0uXwn0VIL4~3IZWoy027-Qo~n4e!O~+Vdl=g9PYfZBO`ET;Lep7 z4<;IFv!6N=O$K^3sI9luwf;HpjgNdxpVI%0%Ir*>BPR}grE9r{i~XG%DBP6Fj**-F IQMV^q0h_28>Hq)$ literal 0 HcmV?d00001 diff --git a/Frameworks/WavPack/Files/extra1.c b/Frameworks/WavPack/Files/extra1.c index 4936fb637..23d89711e 100644 --- a/Frameworks/WavPack/Files/extra1.c +++ b/Frameworks/WavPack/Files/extra1.c @@ -571,7 +571,7 @@ void execute_mono (WavpackContext *wpc, int32_t *samples, int no_history, int do } wpds = &wps->decorr_specs [c]; - nterms = (int) strlen (wpds->terms); + nterms = (int) strlen ((const char *)wpds->terms); while (1) { memcpy (temp_buffer [0], noisy_buffer ? noisy_buffer : samples, buf_size); diff --git a/Frameworks/WavPack/Files/extra2.c b/Frameworks/WavPack/Files/extra2.c index 17fcf0198..56a8adf70 100644 --- a/Frameworks/WavPack/Files/extra2.c +++ b/Frameworks/WavPack/Files/extra2.c @@ -1216,7 +1216,7 @@ void execute_stereo (WavpackContext *wpc, int32_t *samples, int no_history, int } wpds = &wps->decorr_specs [c]; - nterms = (int) strlen (wpds->terms); + nterms = (int) strlen ((const char *)wpds->terms); while (1) { if (force_js || (wpds->joint_stereo && !force_ts)) { diff --git a/Frameworks/WavPack/Files/md5.c b/Frameworks/WavPack/Files/md5.c index 170024098..31433f216 100644 --- a/Frameworks/WavPack/Files/md5.c +++ b/Frameworks/WavPack/Files/md5.c @@ -157,7 +157,7 @@ void MD5Final(digest, ctx) MD5Transform(ctx->buf, (uint32 *) ctx->in); byteReverse((unsigned char *) ctx->buf, 4); memcpy(digest, ctx->buf, 16); - memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ + memset(ctx, 0, sizeof(*ctx)); /* In case it's sensitive */ } diff --git a/Frameworks/WavPack/Files/pack.c b/Frameworks/WavPack/Files/pack.c index eb4c418cc..d1330ac75 100644 --- a/Frameworks/WavPack/Files/pack.c +++ b/Frameworks/WavPack/Files/pack.c @@ -1103,7 +1103,7 @@ void pack_init (WavpackContext *wpc) if (wpc->config.flags & CONFIG_AUTO_SHAPING) { if (wpc->config.flags & CONFIG_OPTIMIZE_WVC) - wps->dc.shaping_acc [0] = wps->dc.shaping_acc [1] = -512L << 16; + wps->dc.shaping_acc [0] = wps->dc.shaping_acc [1] = -512L * 65536; else if (wpc->config.sample_rate >= 64000) wps->dc.shaping_acc [0] = wps->dc.shaping_acc [1] = 1024L << 16; else diff --git a/Frameworks/WavPack/Files/unpack3.c b/Frameworks/WavPack/Files/unpack3.c index d877a799e..917cc1159 100644 --- a/Frameworks/WavPack/Files/unpack3.c +++ b/Frameworks/WavPack/Files/unpack3.c @@ -505,6 +505,7 @@ static int unpack_size (WavpackStream3 *wps) if (flags & (HIGH_FLAG | NEW_HIGH_FLAG)) for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++) + { if (dpp->term > 0) { byte_sum += sizeof (dpp->samples_A [0]) * dpp->term; byte_sum += sizeof (dpp->weight_A); @@ -518,6 +519,7 @@ static int unpack_size (WavpackStream3 *wps) byte_sum += sizeof (dpp->samples_A [0]) + sizeof (dpp->samples_B [0]); byte_sum += sizeof (dpp->weight_A) + sizeof (dpp->weight_B); } + } return byte_sum; } @@ -573,6 +575,7 @@ static void *unpack_save (WavpackStream3 *wps, void *destin) if (flags & (HIGH_FLAG | NEW_HIGH_FLAG)) for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++) + { if (dpp->term > 0) { int count = dpp->term; int index = wps->dc.m; @@ -602,6 +605,7 @@ static void *unpack_save (WavpackStream3 *wps, void *destin) SAVE (destin, dpp->samples_A [0]); SAVE (destin, dpp->samples_B [0]); } + } return destin; } @@ -685,6 +689,7 @@ static void *unpack_restore (WavpackStream3 *wps, void *source, int keep_resourc if (flags & (HIGH_FLAG | NEW_HIGH_FLAG)) for (tcount = wps->num_terms, dpp = wps->decorr_passes; tcount--; dpp++) + { if (dpp->term > 0) { int count = dpp->term; int index = wps->dc.m; @@ -714,6 +719,7 @@ static void *unpack_restore (WavpackStream3 *wps, void *source, int keep_resourc RESTORE (dpp->samples_A [0], source); RESTORE (dpp->samples_B [0], source); } + } return source; } diff --git a/Frameworks/WavPack/Files/wavpack.c b/Frameworks/WavPack/Files/wavpack.c index 95a9728b4..c0135538c 100644 --- a/Frameworks/WavPack/Files/wavpack.c +++ b/Frameworks/WavPack/Files/wavpack.c @@ -2269,7 +2269,7 @@ static int repack_file (char *infilename, char *outfilename, char *out2filename, int use_tempfiles = (out2filename != NULL), input_mode; unsigned char md5_verify [16], md5_display [16]; char *outfilename_temp, *out2filename_temp; - uint32_t total_samples = 0, bcount; + uint32_t total_samples = 0/*, bcount*/; WavpackConfig loc_config = *config; WavpackContext *infile, *outfile; write_id wv_file, wvc_file; @@ -2825,7 +2825,7 @@ static unsigned char *format_samples (int bps, unsigned char *dst, int32_t *src, static int repack_audio (WavpackContext *outfile, WavpackContext *infile, unsigned char *md5_digest_source) { int bps = WavpackGetBytesPerSample (infile), num_channels = WavpackGetNumChannels (infile); - uint32_t input_samples = INPUT_SAMPLES, samples_read = 0; + uint32_t input_samples = INPUT_SAMPLES/*, samples_read = 0*/; unsigned char *format_buffer; int32_t *sample_buffer; double progress = -1.0; diff --git a/Frameworks/WavPack/Info.plist b/Frameworks/WavPack/Info.plist index 1f15cad28..5c18bd9f9 100644 --- a/Frameworks/WavPack/Info.plist +++ b/Frameworks/WavPack/Info.plist @@ -6,14 +6,14 @@ English CFBundleExecutable ${EXECUTABLE_NAME} - CFBundleName - ${PRODUCT_NAME} CFBundleIconFile CFBundleIdentifier - org.cogx.lib.wavpack + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 + CFBundleName + ${PRODUCT_NAME} CFBundlePackageType FMWK CFBundleSignature diff --git a/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj b/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj index 611247ea8..f2d8cc56d 100644 --- a/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj +++ b/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj @@ -33,6 +33,7 @@ /* Begin PBXFileReference section */ 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 833F683A1CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 83DD1DCD17FA038A00249519 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = Files/utils.h; sourceTree = ""; }; 83DD1DCE17FA038A00249519 /* wavpack_local.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wavpack_local.h; path = Files/wavpack_local.h; sourceTree = ""; }; 83DD1DCF17FA038A00249519 /* wavpack_version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = wavpack_version.h; path = Files/wavpack_version.h; sourceTree = ""; }; @@ -203,7 +204,7 @@ 0867D690FE84028FC02AAC07 /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0500; + LastUpgradeCheck = 0730; }; buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "WavPack" */; compatibilityVersion = "Xcode 3.2"; @@ -211,6 +212,7 @@ hasScannedForEncodings = 1; knownRegions = ( en, + es, ); mainGroup = 0867D691FE84028FC02AAC07 /* WavPack */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -262,6 +264,7 @@ isa = PBXVariantGroup; children = ( 089C1667FE841158C02AAC07 /* English */, + 833F683A1CDBCAB200AFB9F0 /* es */, ); name = InfoPlist.strings; sourceTree = ""; @@ -300,6 +303,7 @@ ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.wavpack; PRODUCT_NAME = WavPack; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -334,6 +338,7 @@ ); INFOPLIST_FILE = Info.plist; INSTALL_PATH = "@loader_path/../Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = org.cogx.lib.wavpack; PRODUCT_NAME = WavPack; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -344,6 +349,7 @@ 1DEB91B208733DA50010E9CD /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + ENABLE_TESTABILITY = YES; GCC_PREPROCESSOR_DEFINITIONS = "DEBUG=1"; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; diff --git a/Frameworks/WavPack/es.lproj/InfoPlist.strings b/Frameworks/WavPack/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..7080cf949924e8817cb2121399f078b287079883 GIT binary patch literal 204 zcmW-ZOAf&R6h+Utt7r@xK@3d9$bMd*s%ZBv=Kme5Fyy^_xDn;J8+CjLwb{$gz->i_@% literal 0 HcmV?d00001 diff --git a/Frameworks/libsidplay/libsidplay/Info.plist b/Frameworks/libsidplay/libsidplay/Info.plist index 420769acc..26976de2c 100644 --- a/Frameworks/libsidplay/libsidplay/Info.plist +++ b/Frameworks/libsidplay/libsidplay/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - org.cogx.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/00/00780e63e578668987cfca992355f403cdf78f4b.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/00/00780e63e578668987cfca992355f403cdf78f4b.svn-base new file mode 100644 index 000000000..9c37eab98 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/00/00780e63e578668987cfca992355f403cdf78f4b.svn-base @@ -0,0 +1,138 @@ + /* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2012-2015 Leandro Nini + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "SidTune.h" + +#include "sidtune/SidTuneBase.h" + +#include "sidcxx11.h" + +using namespace libsidplayfp; + +const char MSG_NO_ERRORS[] = "No errors"; + +// Default sidtune file name extensions. This selection can be overriden +// by specifying a custom list in the constructor. +const char* defaultFileNameExt[] = +{ + // Preferred default file extension for single-file sidtunes + // or sidtune description files in SIDPLAY INFOFILE format. + ".sid", ".SID", + // File extensions used (and created) by various C64 emulators and + // related utilities. These extensions are recommended to be used as + // a replacement for ".dat" in conjunction with two-file sidtunes. + ".c64", ".prg", ".p00", ".C64", ".PRG", ".P00", + // Stereo Sidplayer (.mus/.MUS ought not be included because + // these must be loaded first; it sometimes contains the first + // credit lines of a MUS/STR pair). + ".str", ".STR", ".mus", ".MUS", + // End. + 0 +}; + +const char** SidTune::fileNameExtensions = defaultFileNameExt; + +SidTune::SidTune(const char* fileName, const char **fileNameExt, bool separatorIsSlash) +{ + setFileNameExtensions(fileNameExt); + load(fileName, separatorIsSlash); +} + +SidTune::SidTune(const uint_least8_t* oneFileFormatSidtune, uint_least32_t sidtuneLength) +{ + read(oneFileFormatSidtune, sidtuneLength); +} + +SidTune::~SidTune() +{ + // Needed to delete auto_ptr with complete type +} + +void SidTune::setFileNameExtensions(const char **fileNameExt) +{ + fileNameExtensions = ((fileNameExt != nullptr) ? fileNameExt : defaultFileNameExt); +} + +void SidTune::load(const char* fileName, bool separatorIsSlash) +{ + try + { + tune.reset(SidTuneBase::load(fileName, fileNameExtensions, separatorIsSlash)); + m_status = true; + m_statusString = MSG_NO_ERRORS; + } + catch (loadError const &e) + { + m_status = false; + m_statusString = e.message(); + } +} + +void SidTune::read(const uint_least8_t* sourceBuffer, uint_least32_t bufferLen) +{ + try + { + tune.reset(SidTuneBase::read(sourceBuffer, bufferLen)); + m_status = true; + m_statusString = MSG_NO_ERRORS; + } + catch (loadError const &e) + { + m_status = false; + m_statusString = e.message(); + } +} + +unsigned int SidTune::selectSong(unsigned int songNum) +{ + return tune.get() != nullptr ? tune->selectSong(songNum) : 0; +} + +const SidTuneInfo* SidTune::getInfo() const +{ + return tune.get() != nullptr ? tune->getInfo() : nullptr; +} + +const SidTuneInfo* SidTune::getInfo(unsigned int songNum) +{ + return tune.get() != nullptr ? tune->getInfo(songNum) : nullptr; +} + +bool SidTune::getStatus() const { return m_status; } + +const char* SidTune::statusString() const { return m_statusString; } + +bool SidTune::placeSidTuneInC64mem(sidmemory& mem) +{ + if (tune.get() == nullptr) + return false; + + tune->placeSidTuneInC64mem(mem); + return true; +} + +const char* SidTune::createMD5(char *md5) +{ + return tune.get() != nullptr ? tune->createMD5(md5) : nullptr; +} +const uint_least8_t* SidTune::c64Data() const +{ + return tune.get() != nullptr ? tune->c64Data() : nullptr; +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/00/007b09222a2384d5aaf34b9b9d81cabeb621be69.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/00/007b09222a2384d5aaf34b9b9d81cabeb621be69.svn-base new file mode 100644 index 000000000..5d39d9b0c --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/00/007b09222a2384d5aaf34b9b9d81cabeb621be69.svn-base @@ -0,0 +1,76 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "resid.h" + +#include +#include + +#include "resid-emu.h" + +ReSIDBuilder::~ReSIDBuilder() +{ // Remove all SID emulations + remove(); +} + +// Create a new sid emulation. +unsigned int ReSIDBuilder::create(unsigned int sids) +{ + m_status = true; + + // Check available devices + unsigned int count = availDevices(); + + if (count && (count < sids)) + sids = count; + + for (count = 0; count < sids; count++) + { + try + { + sidobjs.insert(new libsidplayfp::ReSID(this)); + } + // Memory alloc failed? + catch (std::bad_alloc const &) + { + m_errorBuffer.assign(name()).append(" ERROR: Unable to create ReSID object"); + m_status = false; + break; + } + } + return count; +} + +const char *ReSIDBuilder::credits() const +{ + return libsidplayfp::ReSID::getCredits(); +} + +void ReSIDBuilder::filter(bool enable) +{ + std::for_each(sidobjs.begin(), sidobjs.end(), applyParameter(&libsidplayfp::ReSID::filter, enable)); +} + +void ReSIDBuilder::bias(double dac_bias) +{ + std::for_each(sidobjs.begin(), sidobjs.end(), applyParameter(&libsidplayfp::ReSID::bias, dac_bias)); +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/02/021b17a70f01008a0833e04556385fedd3382ec7.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/02/021b17a70f01008a0833e04556385fedd3382ec7.svn-base new file mode 100644 index 000000000..3f7074001 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/02/021b17a70f01008a0833e04556385fedd3382ec7.svn-base @@ -0,0 +1,106 @@ +# Test for std c++11 compiler support +# +# trimmed down verision of AX_CXX_COMPILE_STDCXX_11 +# from the GNU Autoconf Archive +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014 Alexey Sokolov +# Copyright (c) 2014, 2015 Google Inc. +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + struct Base { + virtual void f() {} + }; + struct Child : public Base { + virtual void f() override {} + }; + + typedef check> right_angle_brackets; + + int a; + decltype(a) b; + + typedef check check_type; + check_type c; + check_type&& cr = static_cast(c); + + auto d = a; + auto l = [](){}; + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this + namespace test_template_alias_sfinae { + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test() { + func(0); + } + } +]]) + +AC_DEFUN([SID_CXX_COMPILE_STDCXX_11], [dnl + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++11 features by default, + ax_cv_cxx_compile_cxx11, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [ax_cv_cxx_compile_cxx11=yes], + [ax_cv_cxx_compile_cxx11=no])]) + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + if test x$ac_success = xno; then + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_-std=c++11]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with -std=c++11, + $cachevar, + [ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -std=c++11" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXXFLAGS="$ac_save_CXXFLAGS"]) + if eval test x\$$cachevar = xyes; then + CXXFLAGS="$CXXFLAGS -std=c++11" + ac_success=yes + break + fi + fi + + AC_LANG_POP([C++]) + + if test x$ac_success = xno; then + HAVE_CXX11=0 + AC_MSG_NOTICE([No compiler with C++11 support was found]) + else + HAVE_CXX11=1 + AC_DEFINE(HAVE_CXX11,1, + [define if the compiler supports basic C++11 syntax]) + fi + + AC_SUBST(HAVE_CXX11) +]) diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/02/027636b2b2db3d6c2ced399be35ac75cfae42d16.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/02/027636b2b2db3d6c2ced399be35ac75cfae42d16.svn-base new file mode 100644 index 000000000..e4ba1e9b5 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/02/027636b2b2db3d6c2ced399be35ac75cfae42d16.svn-base @@ -0,0 +1,64 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright (C) 2011-2014 Leandro Nini + * Copyright (C) 2009 Antti S. Lankila + * Copyright (C) 2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "EventScheduler.h" + + +namespace libsidplayfp +{ + +void EventScheduler::reset() +{ + firstEvent = nullptr; + currentTime = 0; +} + +void EventScheduler::cancel(Event &event) +{ + Event **scan = &firstEvent; + + while (*scan != nullptr) + { + if (&event == *scan) + { + *scan = (*scan)->next; + break; + } + scan = &((*scan)->next); + } +} + +bool EventScheduler::isPending(Event &event) const +{ + Event *scan = firstEvent; + while (scan != nullptr) + { + if (&event == scan) + { + return true; + } + scan = scan->next; + } + return false; +} + +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/04/044d939d8b27688cb1c9becd1e582719f2f9a610.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/04/044d939d8b27688cb1c9becd1e582719f2f9a610.svn-base new file mode 100644 index 000000000..bc28ac7f3 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/04/044d939d8b27688cb1c9becd1e582719f2f9a610.svn-base @@ -0,0 +1,297 @@ +=encoding utf8 + + +=head1 NAME + +sidplayfp.ini - Configuration file for L. + + +=head1 DESCRIPTION + +This page describes the options available for the configuration file of +Sidplayfp. It is composed by a number of sections, each one composed +by a section name, enclosed by square brackets, followed by a list of += lines. + +B supports the following sections: + +B<[SIDPlayfp]> - Generic configuration + +B<[Console]> - Console appearance configuration + +B<[Audio]> - Audio output configuration + +B<[Emulation]> - Emulation engine parameters + +All options and values are described in detail below. + +For any of the following parameter, if it's specified more than one +time the last entry encountered will be used. + +B: if any of these options is specified outside its section, it will +be I. + +=head2 SIDPlayfp + +=over + +=item B=I<< >> + +Configuration version + +=item B=I<< >> + +Path for the Songlength DB. Should point to the F +file under the HVSC collection path. +On *NIX systems if this value is not set, L will try +F<$PREFIX/share/sidplayfp/Songlengths.txt>. + +=item B=I + +Default play time if Songlength Database is not found. + +=item B=I + +Default recording time when writing wave files if Songlength Database is not found. + +=item B=I<< >> + +Full path for the Kernal Rom file. This is the most important rom and should always be provided, although many tunes will still work without. +By default the program will look for a F file under the following locations: + +=over + +=item * $XDG_DATA_HOME/sidplayfp/ + +on *NIX systems where XDG_DATA_HOME is defined. + +=item * $HOME/.local/share/sidplayfp/ + +on *NIX systems where XDG_DATA_HOME is not defined. + +=item * $PREFIX/share/sidplayfp + +on *NIX systems when not found in the above directories. + +=item * %CSIDL_APPDATA%\\sidplayfp\\ + +on Windows systems where CSIDL_APPDATA is defined. + +=item * %USERPROFILE%\\Application Data\\sidplayfp\\ + +on Windows systems where CSIDL_APPDATA is not defined. + +=back + +=item B=I<< >> + +Full path for the Basic Rom file. This is mostly useful for playing BASIC tunes. +By default the program will look for a F file under the same locations as above. + +=item B=I<< >> + +Full path for the Character generator Rom file. Almost useless for playback of tunes, but included for completeness. +By default the program will look for a F file under the same locations as above. + +=back + + +=head2 Console + +=over + +=item B=I + +Use ANSI escape sequences to provide colored output. + +=item B=I<< >> + +Character for the top left corner. + +=item B=I<< >> + +Character for the top right corner. + +=item B=I<< >> + +Character for the bottom left corner. + +=item B=I<< >> + +Character for the bottom right corner. + +=item B=I<< >> + +Character for vertical lines. + +=item B=I<< >> + +Character for horizontal lines. + +=item B=I<< >> + +Character for left junctions. + +=item B=I<< >> + +Character for right junctions. + +=back + + +=head2 Audio + +=over + +=item B=I<< >> + +Playback frequency expressed in Hertz. Default is 48000. + +=item B=I<< >> + +Number of channels, 1 for mono and 2 for stereo playback Default is 1. + +=item B=I<< <16|32> >> + +Number of bits ber sample, used only for wav output. Using +values other than the ones specified will produce invalid +output. + +=back + + +=head2 Emulation + +=over + +=item B=I<< >> + +Set the SID emulation engine. Default is RESIDFP. + +=item B=I<< >> + +Default c64 model to use if not specified by tune, PAL for +european PAL-B model, NTSC for american/japanese NTSC-M models, +OLD_NTSC for NTSC-M models with old video chip and DREAN +for argentinian PAL-N model. Default is PAL. + +=item B=I + +Force the configured c64 model even if the tune specifies one. + +=item B=I<< >> + +Default SID chip model, old MOS 6581 or newer MOS 8580. + +=item B=I + +Force the configured SID chip model even if the tune specifies one. + +=item B=I + +Enable/disable the emulation of the SID filter. + +=item B=I<< >> + +Controls the filter bias in the ReSID emulation. The bias is +given in millivolts, and a maximum reasonable control range is +approximately -500 to 500, the default value is 0. + +=item B=I<< >> + +Controls the filter curve for the 6581 model in the ReSIDfp +emulation. Ranges from 0.0 (light) to 1.0 (dark), the default +value is 0.5. + +=item B=I<< >> + +Controls the filter curve for the 8580 model in the ReSIDfp +emulation. Value is expressed in Hertz and the default is 12500. + +=back + + +=head1 SEE ALSO + +L + + +=head1 AUTHORS + +=over + +=item Leandro Nini + +Current maintainer. + +=item Simon White + +Wrote the original Sidplay2. + +=item Dag Lem + +Wrote the reSID emulation engine. + +=item Antti S. Lankila + +Wrote the reSIDfp emulation engine as a fork of reSID 0.16. + +=item The Vice team + +Large part of the emulation is based on the VICE's code. + +=item André Fachat + +Wrote the original reloc65 utility. + +=item Michael Schwendt + +Wrote the original SidTune library and MD5 class (based on work by L. Peter Deutsch). + +=item Mikko Kilponen + +Wrote the originla man page. + +=back + + +=head1 RESOURCES + +=over + +=item SourceForge project: L + +=item Sidplay2 homepage: L + +=item High Voltage Sid Collection (HVSC): L + +=back + + +=head1 COPYING + +=over + +=item Copyright (C) 2000-2004 Simon White + +=item Copyright (C) 2007-2010 Antti Lankila + +=item Copyright (C) 2009-2015 VICE Project + +=item Copyright (C) 2010-2016 Leandro Nini + +=back + +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 2 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, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/05/05513efc4115bfc9efe8a29eb96bbd4a1098cd50.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/05/05513efc4115bfc9efe8a29eb96bbd4a1098cd50.svn-base new file mode 100644 index 000000000..ba484e3cb --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/05/05513efc4115bfc9efe8a29eb96bbd4a1098cd50.svn-base @@ -0,0 +1,75 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef EVENT_H +#define EVENT_H + +#include + + +namespace libsidplayfp +{ + +typedef int_fast64_t event_clock_t; + + +/** + * An Event object that can be inserted in the Event Scheduler. + */ +class Event +{ + friend class EventScheduler; + +private: + /// The next event in sequence. + Event *next; + + /// The clock this event fires. + event_clock_t triggerTime; + + /// Describe event for humans. + const char * const m_name; + +public: + /** + * Events are used for delayed execution. Name is + * not used by code, but is useful for debugging. + * + * @param name Descriptive string of the event. + */ + Event(const char * const name) : + m_name(name) {} + + /** + * Event code to be executed. Events are allowed to safely + * reschedule themselves with the EventScheduler during + * invocations. + */ + virtual void event() = 0; + +protected: + ~Event() {} +}; + +} + +#endif // EVENT_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/05/05c531327690d705031fcdfb0d18ddbcbdb40b64.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/05/05c531327690d705031fcdfb0d18ddbcbdb40b64.svn-base new file mode 100644 index 000000000..d28f441b1 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/05/05c531327690d705031fcdfb0d18ddbcbdb40b64.svn-base @@ -0,0 +1,60 @@ +/* + * This file is part of sidplayfp, a console SID player. + * + * Copyright 2000-2005 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef AUDIO_ALSA_H +#define AUDIO_ALSA_H + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef HAVE_ALSA + +#ifndef AudioDriver +# define AudioDriver Audio_ALSA +#endif + +#include +#include "../AudioBase.h" + + +class Audio_ALSA: public AudioBase +{ +private: // ------------------------------------------------------- private + snd_pcm_t *_audioHandle; + int _alsa_to_frames_divisor; + +private: + void outOfOrder(); + static void checkResult(int err); + +public: // --------------------------------------------------------- public + Audio_ALSA(); + ~Audio_ALSA(); + + bool open (AudioConfig &cfg) override; + void close () override; + void reset () override {} + bool write () override; + void pause () override {} +}; + +#endif // HAVE_ALSA +#endif // AUDIO_ALSA_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/06/0684266083ff41b79816567bbd61c38fe228d11d.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/06/0684266083ff41b79816567bbd61c38fe228d11d.svn-base new file mode 100644 index 000000000..8f5773ba3 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/06/0684266083ff41b79816567bbd61c38fe228d11d.svn-base @@ -0,0 +1,68 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright (C) 2015 Leandro Nini + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "UnitTest++/UnitTest++.h" +#include "UnitTest++/TestReporter.h" + +#include "../src/sidplayfp/SidTune.h" +#include "../src/sidplayfp/SidTuneInfo.h" + +#include +#include + +#define BUFFERSIZE 22 + +#define LOADADDRESS_HI 1 +#define LOADADDRESS_LO 0 + +using namespace UnitTest; + +uint8_t const bufferMUS[BUFFERSIZE] = +{ + 0x52, 0x53, // load address + 0x04, 0x00, // length of the data for Voice 1 + 0x04, 0x00, // length of the data for Voice 2 + 0x04, 0x00, // length of the data for Voice 3 + 0x00, 0x00, 0x01, 0x4F, // data for Voice 1 + 0x00, 0x00, 0x01, 0x4F, // data for Voice 2 + 0x00, 0x01, 0x01, 0x4F, // data for Voice 3 + 0x00, 0x00, // text description +}; + +SUITE(MUS) +{ + +struct TestFixture +{ + // Test setup + TestFixture() { memcpy(data, bufferMUS, BUFFERSIZE); } + + uint8_t data[BUFFERSIZE]; +}; + +TEST_FIXTURE(TestFixture, TestPlayerAddress) +{ + SidTune tune(data, BUFFERSIZE); + + CHECK_EQUAL(0xec60, tune.getInfo()->initAddr()); + CHECK_EQUAL(0xec80, tune.getInfo()->playAddr()); +} + +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/07/07c734b913f53df5682b06a4922dd2c65b34049e.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/07/07c734b913f53df5682b06a4922dd2c65b34049e.svn-base new file mode 100644 index 000000000..bde75f408 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/07/07c734b913f53df5682b06a4922dd2c65b34049e.svn-base @@ -0,0 +1,136 @@ +// --------------------------------------------------------------------------- +// This file is part of reSID, a MOS6581 SID emulator engine. +// Copyright (C) 2010 Dag Lem +// +// 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 2 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, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// --------------------------------------------------------------------------- + +#define RESID_DAC_CC + +#ifdef _M_ARM +#undef _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +#define _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE 1 +#endif + +#include "dac.h" +#include + +#ifdef __IBMC__ +#include +#define INFINITY _INF +#endif + +#ifndef INFINITY +union MSVC_EVIL_FLOAT_HACK +{ + unsigned char Bytes[4]; + float Value; +}; +static union MSVC_EVIL_FLOAT_HACK INFINITY_HACK = {{0x00, 0x00, 0x80, 0x7F}}; +#define INFINITY (INFINITY_HACK.Value) +#endif + +namespace reSID +{ + +// ---------------------------------------------------------------------------- +// Calculation of lookup tables for SID DACs. +// ---------------------------------------------------------------------------- + +// The SID DACs are built up as follows: +// +// n n-1 2 1 0 VGND +// | | | | | | Termination +// 2R 2R 2R 2R 2R 2R only for +// | | | | | | MOS 8580 +// Vo --R---R--...--R---R-- --- +// +// +// All MOS 6581 DACs are missing a termination resistor at bit 0. This causes +// pronounced errors for the lower 4 - 5 bits (e.g. the output for bit 0 is +// actually equal to the output for bit 1), resulting in DAC discontinuities +// for the lower bits. +// In addition to this, the 6581 DACs exhibit further severe discontinuities +// for higher bits, which may be explained by a less than perfect match between +// the R and 2R resistors, or by output impedance in the NMOS transistors +// providing the bit voltages. A good approximation of the actual DAC output is +// achieved for 2R/R ~ 2.20. +// +// The MOS 8580 DACs, on the other hand, do not exhibit any discontinuities. +// These DACs include the correct termination resistor, and also seem to have +// very accurately matched R and 2R resistors (2R/R = 2.00). + +void build_dac_table(unsigned short* dac, int bits, double _2R_div_R, bool term) +{ + // FIXME: No variable length arrays in ISO C++, hardcoding to max 12 bits. + // double vbit[bits]; + double vbit[12]; + + // Calculate voltage contribution by each individual bit in the R-2R ladder. + for (int set_bit = 0; set_bit < bits; set_bit++) { + int bit; + + double Vn = 1.0; // Normalized bit voltage. + double R = 1.0; // Normalized R + double _2R = _2R_div_R*R; // 2R + double Rn = term ? // Rn = 2R for correct termination, + _2R : INFINITY; // INFINITY for missing termination. + + // Calculate DAC "tail" resistance by repeated parallel substitution. + for (bit = 0; bit < set_bit; bit++) { + if (Rn == INFINITY) { + Rn = R + _2R; + } + else { + Rn = R + _2R*Rn/(_2R + Rn); // R + 2R || Rn + } + } + + // Source transformation for bit voltage. + if (Rn == INFINITY) { + Rn = _2R; + } + else { + Rn = _2R*Rn/(_2R + Rn); // 2R || Rn + Vn = Vn*Rn/_2R; + } + + // Calculate DAC output voltage by repeated source transformation from + // the "tail". + for (++bit; bit < bits; bit++) { + Rn += R; + double I = Vn/Rn; + Rn = _2R*Rn/(_2R + Rn); // 2R || Rn + Vn = Rn*I; + } + + vbit[set_bit] = Vn; + } + + // Calculate the voltage for any combination of bits by superpositioning. + for (int i = 0; i < (1 << bits); i++) { + int x = i; + double Vo = 0; + for (int j = 0; j < bits; j++) { + Vo += (x & 0x1)*vbit[j]; + x >>= 1; + } + + // Scale maximum output to 2^bits - 1. + dac[i] = (unsigned short)(((1 << bits) - 1)*Vo + 0.5); + } +} + +} // namespace reSID diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/08/08089003459bc7de683aec7d1ea8c653f7c47f1a.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/08/08089003459bc7de683aec7d1ea8c653f7c47f1a.svn-base new file mode 100644 index 000000000..05279fd7c --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/08/08089003459bc7de683aec7d1ea8c653f7c47f1a.svn-base @@ -0,0 +1,151 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef FILTERMODELCONFIG_H +#define FILTERMODELCONFIG_H + +#include + +#include "Dac.h" +#include "Spline.h" + +#include "sidcxx11.h" + +namespace reSIDfp +{ + +class Integrator; + +/** + * Calculate parameters for 6581 filter emulation. + */ +class FilterModelConfig +{ +private: + static const unsigned int DAC_BITS = 11; + +private: + static std::unique_ptr instance; + // This allows access to the private constructor +#ifdef HAVE_CXX11 + friend std::unique_ptr::deleter_type; +#else + friend class std::auto_ptr; +#endif + + const double voice_voltage_range; + const double voice_DC_voltage; + + /// Capacitor value. + const double C; + + /// Transistor parameters. + //@{ + const double Vdd; + const double Vth; ///< Threshold voltage + const double Ut; ///< Thermal voltage: Ut = k*T/q = 8.61734315e-5*T ~ 26mV + const double k; ///< Gate coupling coefficient: K = Cox/(Cox+Cdep) ~ 0.7 + const double uCox; ///< u*Cox + const double WL_vcr; ///< W/L for VCR + const double WL_snake; ///< W/L for "snake" + const double kVddt; ///< k * (Vdd - Vth) + //@} + + /// DAC parameters. + //@{ + const double dac_zero; + const double dac_scale; + //@} + + // Derived stuff + const double vmin, vmax; + const double denorm, norm; + + /// Fixed point scaling for 16 bit op-amp output. + const double N16; + + /// Lookup tables for gain and summer op-amps in output stage / filter. + //@{ + unsigned short* mixer[8]; + unsigned short* summer[5]; + unsigned short* gain[16]; + //@} + + /// DAC lookup table + Dac dac; + + /// VCR - 6581 only. + //@{ + unsigned short vcr_kVg[1 << 16]; + unsigned short vcr_n_Ids_term[1 << 16]; + //@} + + /// Reverse op-amp transfer function. + unsigned short opamp_rev[1 << 16]; + +private: + double getDacZero(double adjustment) const { return dac_zero - (adjustment - 0.5) * 2.; } + + FilterModelConfig(); + ~FilterModelConfig(); + +public: + static FilterModelConfig* getInstance(); + + /** + * The digital range of one voice is 20 bits; create a scaling term + * for multiplication which fits in 11 bits. + */ + int getVoiceScaleS14() const { return static_cast((norm * ((1 << 14) - 1)) * voice_voltage_range); } + + /** + * The "zero" output level of the voices. + */ + int getVoiceDC() const { return static_cast(N16 * (voice_DC_voltage - vmin)); } + + unsigned short** getGain() { return gain; } + + unsigned short** getSummer() { return summer; } + + unsigned short** getMixer() { return mixer; } + + /** + * Construct an 11 bit cutoff frequency DAC output voltage table. + * Ownership is transferred to the requester which becomes responsible + * of freeing the object when done. + * + * @param adjustment + * @return the DAC table + */ + unsigned short* getDAC(double adjustment) const; + + /** + * Construct an integrator solver. + * + * @return the integrator + */ + std::unique_ptr buildIntegrator(); +}; + +} // namespace reSIDfp + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/09/09305c22e1879951b6055076272f35c2f54f15f5.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/09/09305c22e1879951b6055076272f35c2f54f15f5.svn-base new file mode 100644 index 000000000..c90dd800e --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/09/09305c22e1879951b6055076272f35c2f54f15f5.svn-base @@ -0,0 +1,123 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "Dac.h" + +namespace reSIDfp +{ + +Dac::Dac(unsigned int bits) : + dac(new double[bits]), + dacLength(bits) +{} + +Dac::~Dac() +{ + delete [] dac; +} + +double Dac::getOutput(unsigned int input) const +{ + double dacValue = 0.; + + for (unsigned int i = 0; i < dacLength; i++) + { + if ((input & (1 << i)) != 0) + { + dacValue += dac[i]; + } + } + + return dacValue; +} + +void Dac::kinkedDac(ChipModel chipModel) +{ + const double R_INFINITY = 1e6; + + // Non-linearity parameter, 8580 DACs are perfectly linear + const double _2R_div_R = chipModel == MOS6581 ? 2.20 : 2.00; + + // 6581 DACs are not terminated by a 2R resistor + const bool term = chipModel == MOS8580; + + // Calculate voltage contribution by each individual bit in the R-2R ladder. + for (unsigned int set_bit = 0; set_bit < dacLength; set_bit++) + { + double Vn = 1.; // Normalized bit voltage. + double R = 1.; // Normalized R + const double _2R = _2R_div_R * R; // 2R + double Rn = term ? // Rn = 2R for correct termination, + _2R : R_INFINITY; // INFINITY for missing termination. + + unsigned int bit; + + // Calculate DAC "tail" resistance by repeated parallel substitution. + for (bit = 0; bit < set_bit; bit++) + { + Rn = (Rn == R_INFINITY) ? + R + _2R : + R + _2R * Rn / (_2R + Rn); // R + 2R || Rn + } + + // Source transformation for bit voltage. + if (Rn == R_INFINITY) + { + Rn = _2R; + } + else + { + Rn = _2R * Rn / (_2R + Rn); // 2R || Rn + Vn = Vn * Rn / _2R; + } + + // Calculate DAC output voltage by repeated source transformation from + // the "tail". + + for (++bit; bit < dacLength; bit++) + { + Rn += R; + const double I = Vn / Rn; + Rn = _2R * Rn / (_2R + Rn); // 2R || Rn + Vn = Rn * I; + } + + dac[set_bit] = Vn; + } + + // Normalize to integerish behavior + double Vsum = 0.; + + for (unsigned int i = 0; i < dacLength; i++) + { + Vsum += dac[i]; + } + + Vsum /= 1 << dacLength; + + for (unsigned int i = 0; i < dacLength; i++) + { + dac[i] /= Vsum; + } +} + +} // namespace reSIDfp diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/09/093634c1b278d991dd4aa9974269b5487dd3accb.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/09/093634c1b278d991dd4aa9974269b5487dd3accb.svn-base new file mode 100644 index 000000000..da9334d61 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/09/093634c1b278d991dd4aa9974269b5487dd3accb.svn-base @@ -0,0 +1,121 @@ +/* + * Copyright (C) 2010-2015 Leandro Nini + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "iniParser.h" + +#include "sidcxx11.h" + +#include + +namespace libsidplayfp +{ + +class parseError {}; + +std::string iniParser::parseSection(const std::string &buffer) +{ + const size_t pos = buffer.find(']'); + + if (pos == std::string::npos) + { + throw parseError(); + } + + return buffer.substr(1, pos-1); +} + +iniParser::keys_t::value_type iniParser::parseKey(const std::string &buffer) +{ + const size_t pos = buffer.find('='); + + if (pos == std::string::npos) + { + throw parseError(); + } + + const std::string key = buffer.substr(0, buffer.find_last_not_of(' ', pos-1) + 1); + const std::string value = buffer.substr(pos + 1); + return make_pair(key, value); +} + +bool iniParser::open(const char *fName) +{ + std::ifstream iniFile(fName); + + if (iniFile.fail()) + { + return false; + } + + sections_t::iterator mIt; + + while (iniFile.good()) + { + std::string buffer; + getline(iniFile, buffer); + + if (buffer.empty()) + continue; + + switch (buffer.at(0)) + { + case ';': + case '#': + // skip comments + break; + case '[': + try + { + const std::string section = parseSection(buffer); + const keys_t keys; + std::pair it = sections.insert(make_pair(section, keys)); + mIt = it.first; + } + catch (parseError const &) {}; + break; + default: + try + { + (*mIt).second.insert(parseKey(buffer)); + } + catch (parseError const &) {}; + break; + } + } + + return true; +} + +void iniParser::close() +{ + sections.clear(); +} + +bool iniParser::setSection(const char *section) +{ + curSection = sections.find(std::string(section)); + return (curSection != sections.end()); +} + +const char *iniParser::getValue(const char *key) +{ + keys_t::const_iterator keyIt = (*curSection).second.find(std::string(key)); + return (keyIt != (*curSection).second.end()) ? keyIt->second.c_str() : nullptr; +} + +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/0a/0a7d1c086abdc5b8bf7f56d00ed4207754f6d751.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/0a/0a7d1c086abdc5b8bf7f56d00ed4207754f6d751.svn-base new file mode 100644 index 000000000..a57f7191b --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/0a/0a7d1c086abdc5b8bf7f56d00ed4207754f6d751.svn-base @@ -0,0 +1,206 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "mixer.h" + +#include +#include + +#include "sidemu.h" + + +namespace libsidplayfp +{ + +void clockChip(sidemu *s) { s->clock(); } + +class bufferPos +{ +public: + bufferPos(int i) : pos(i) {} + void operator()(sidemu *s) { s->bufferpos(pos); } + +private: + int pos; +}; + +class bufferMove +{ +public: + bufferMove(int p, int s) : pos(p), samples(s) {} + void operator()(short *dest) + { + const short* src = dest + pos; + for (int j = 0; j < samples; j++) + { + dest[j] = src[j]; + } + } + +private: + int pos; + int samples; +}; + +void Mixer::clockChips() +{ + std::for_each(m_chips.begin(), m_chips.end(), clockChip); +} + +void Mixer::resetBufs() +{ + std::for_each(m_chips.begin(), m_chips.end(), bufferPos(0)); +} + +void Mixer::doMix() +{ + short *buf = m_sampleBuffer + m_sampleIndex; + + // extract buffer info now that the SID is updated. + // clock() may update bufferpos. + // NB: if more than one chip exists, their bufferpos is identical to first chip's. + const int sampleCount = m_chips.front()->bufferpos(); + + int i = 0; + while (i < sampleCount) + { + // Handle whatever output the sid has generated so far + if (m_sampleIndex >= m_sampleCount) + { + break; + } + // Are there enough samples to generate the next one? + if (i + m_fastForwardFactor >= sampleCount) + { + break; + } + + // This is a crude boxcar low-pass filter to + // reduce aliasing during fast forward. + for (size_t k = 0; k < m_buffers.size(); k++) + { + int_least32_t sample = 0; + const short *buffer = m_buffers[k] + i; + for (int j = 0; j < m_fastForwardFactor; j++) + { + sample += buffer[j]; + } + + m_iSamples[k] = sample / m_fastForwardFactor; + } + + // increment i to mark we ate some samples, finish the boxcar thing. + i += m_fastForwardFactor; + + const int dither = triangularDithering(); + + const unsigned int channels = m_stereo ? 2 : 1; + for (unsigned int ch = 0; ch < channels; ch++) + { + const int_least32_t tmp = ((this->*(m_mix[ch]))() * m_volume[ch] + dither) / VOLUME_MAX; + assert(tmp >= -32768 && tmp <= 32767); + *buf++ = static_cast(tmp); + m_sampleIndex++; + } + } + + // move the unhandled data to start of buffer, if any. + const int samplesLeft = sampleCount - i; + std::for_each(m_buffers.begin(), m_buffers.end(), bufferMove(i, samplesLeft)); + std::for_each(m_chips.begin(), m_chips.end(), bufferPos(samplesLeft)); +} + +void Mixer::begin(short *buffer, uint_least32_t count) +{ + m_sampleIndex = 0; + m_sampleCount = count; + m_sampleBuffer = buffer; +} + +void Mixer::updateParams() +{ + switch (m_buffers.size()) + { + case 1: + m_mix[0] = m_stereo ? &Mixer::stereo_OneChip : &Mixer::mono<1>; + if (m_stereo) m_mix[1] = &Mixer::stereo_OneChip; + break; + case 2: + m_mix[0] = m_stereo ? &Mixer::stereo_ch1_TwoChips : &Mixer::mono<2>; + if (m_stereo) m_mix[1] = &Mixer::stereo_ch2_TwoChips; + break; + case 3: + m_mix[0] = m_stereo ? &Mixer::stereo_ch1_ThreeChips : &Mixer::mono<3>; + if (m_stereo) m_mix[1] = &Mixer::stereo_ch2_ThreeChips; + break; + } +} + +void Mixer::clearSids() +{ + m_chips.clear(); + m_buffers.clear(); +} + +void Mixer::addSid(sidemu *chip) +{ + if (chip != nullptr) + { + m_chips.push_back(chip); + m_buffers.push_back(chip->buffer()); + + m_iSamples.resize(m_buffers.size()); + + if (m_mix.size() > 0) + updateParams(); + } +} + +void Mixer::setStereo(bool stereo) +{ + if (m_stereo != stereo) + { + m_stereo = stereo; + + m_mix.resize(m_stereo ? 2 : 1); + + updateParams(); + } +} + +bool Mixer::setFastForward(int ff) +{ + if (ff < 1 || ff > 32) + return false; + + m_fastForwardFactor = ff; + return true; +} + +void Mixer::setVolume(int_least32_t left, int_least32_t right) +{ + m_volume.clear(); + m_volume.push_back(left); + m_volume.push_back(right); +} + +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/11/110eac2789bc5b31505cb8da3e80be5fde61e080.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/11/110eac2789bc5b31505cb8da3e80be5fde61e080.svn-base new file mode 100644 index 000000000..dd919519f --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/11/110eac2789bc5b31505cb8da3e80be5fde61e080.svn-base @@ -0,0 +1,166 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef SIDTUNEINFOIMPL_H +#define SIDTUNEINFOIMPL_H + +#include +#include +#include + +#include "sidplayfp/SidTuneInfo.h" + +#include "sidcxx11.h" + +namespace libsidplayfp +{ + +/** + * The implementation of the SidTuneInfo interface. + */ +class SidTuneInfoImpl final : public SidTuneInfo +{ +public: + const char* m_formatString; + + unsigned int m_songs; + unsigned int m_startSong; + unsigned int m_currentSong; + + int m_songSpeed; + + clock_t m_clockSpeed; + + compatibility_t m_compatibility; + + uint_least32_t m_dataFileLen; + + uint_least32_t m_c64dataLen; + + uint_least16_t m_loadAddr; + uint_least16_t m_initAddr; + uint_least16_t m_playAddr; + + uint_least8_t m_relocStartPage; + + uint_least8_t m_relocPages; + + std::string m_path; + + std::string m_dataFileName; + + std::string m_infoFileName; + + std::vector m_sidModels; + + std::vector m_sidChipAddresses; + + std::vector m_infoString; + + std::vector m_commentString; + + bool m_fixLoad; + +private: // prevent copying + SidTuneInfoImpl(const SidTuneInfoImpl&); + SidTuneInfoImpl& operator=(SidTuneInfoImpl&); + +public: + SidTuneInfoImpl() : + m_formatString("N/A"), + m_songs(0), + m_startSong(0), + m_currentSong(0), + m_songSpeed(SPEED_VBI), + m_clockSpeed(CLOCK_UNKNOWN), + m_compatibility(COMPATIBILITY_C64), + m_dataFileLen(0), + m_c64dataLen(0), + m_loadAddr(0), + m_initAddr(0), + m_playAddr(0), + m_relocStartPage(0), + m_relocPages(0), + m_fixLoad(false) + { + m_sidModels.push_back(SIDMODEL_UNKNOWN); + m_sidChipAddresses.push_back(0xd400); + } + + uint_least16_t getLoadAddr() const override { return m_loadAddr; } + + uint_least16_t getInitAddr() const override { return m_initAddr; } + + uint_least16_t getPlayAddr() const override { return m_playAddr; } + + unsigned int getSongs() const override { return m_songs; } + + unsigned int getStartSong() const override { return m_startSong; } + + unsigned int getCurrentSong() const override { return m_currentSong; } + + uint_least16_t getSidChipBase(unsigned int i) const override + { + return i < m_sidChipAddresses.size() ? m_sidChipAddresses[i] : 0; + } + + int getSidChips() const override { return m_sidChipAddresses.size(); } + + int getSongSpeed() const override { return m_songSpeed; } + + uint_least8_t getRelocStartPage() const override { return m_relocStartPage; } + + uint_least8_t getRelocPages() const override { return m_relocPages; } + + model_t getSidModel(unsigned int i) const override + { + return i < m_sidModels.size() ? m_sidModels[i] : SIDMODEL_UNKNOWN; + } + + compatibility_t getCompatibility() const override { return m_compatibility; } + + unsigned int getNumberOfInfoStrings() const override { return m_infoString.size(); } + const char* getInfoString(unsigned int i) const override { return i + * Copyright 2007-2010 Antti Lankila + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "mos6510debug.h" + +#ifdef DEBUG + +#include +#include + +#include "mos6510.h" +#include "sidendian.h" +#include "opcodes.h" + +namespace libsidplayfp +{ + +void MOS6510Debug::DumpState (event_clock_t time, MOS6510 &cpu) +{ + fprintf(cpu.m_fdbg, " PC I A X Y SP DR PR NV-BDIZC Instruction (%d)\n", static_cast(time)); + fprintf(cpu.m_fdbg, "%04x ", cpu.instrStartPC); + fprintf(cpu.m_fdbg, cpu.irqAssertedOnPin ? "t " : "f "); + fprintf(cpu.m_fdbg, "%02x ", cpu.Register_Accumulator); + fprintf(cpu.m_fdbg, "%02x ", cpu.Register_X); + fprintf(cpu.m_fdbg, "%02x ", cpu.Register_Y); + fprintf(cpu.m_fdbg, "01%02x ", endian_16lo8(cpu.Register_StackPointer)); + fprintf(cpu.m_fdbg, "%02x ", cpu.cpuRead (0)); + fprintf(cpu.m_fdbg, "%02x ", cpu.cpuRead (1)); + + fprintf(cpu.m_fdbg, cpu.flags.getN() ? "1" : "0"); + fprintf(cpu.m_fdbg, cpu.flags.getV() ? "1" : "0"); + fprintf(cpu.m_fdbg, "1"); + fprintf(cpu.m_fdbg, cpu.flags.getB() ? "1" : "0"); + fprintf(cpu.m_fdbg, cpu.flags.getD() ? "1" : "0"); + fprintf(cpu.m_fdbg, cpu.flags.getI() ? "1" : "0"); + fprintf(cpu.m_fdbg, cpu.flags.getZ() ? "1" : "0"); + fprintf(cpu.m_fdbg, cpu.flags.getC() ? "1" : "0"); + + const int opcode = cpu.cpuRead(cpu.instrStartPC); + + fprintf(cpu.m_fdbg, " %02x ", opcode); + + switch(opcode) + { + // Accumulator or Implied cpu.Cycle_EffectiveAddressing + case ASLn: case LSRn: case ROLn: case RORn: + fprintf(cpu.m_fdbg, " "); + break; + // Zero Page Addressing Mode Handler + case ADCz: case ANDz: case ASLz: case BITz: case CMPz: case CPXz: + case CPYz: case DCPz: case DECz: case EORz: case INCz: case ISBz: + case LAXz: case LDAz: case LDXz: case LDYz: case LSRz: case NOPz_: + case ORAz: case ROLz: case RORz: case SAXz: case SBCz: case SREz: + case STAz: case STXz: case STYz: case SLOz: case RLAz: case RRAz: + // ASOz AXSz DCMz INSz LSEz - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x ", endian_16lo8(cpu.instrOperand)); + break; + // Zero Page with X Offset Addressing Mode Handler + case ADCzx: case ANDzx: case ASLzx: case CMPzx: case DCPzx: case DECzx: + case EORzx: case INCzx: case ISBzx: case LDAzx: case LDYzx: case LSRzx: + case NOPzx_: case ORAzx: case RLAzx: case ROLzx: case RORzx: case RRAzx: + case SBCzx: case SLOzx: case SREzx: case STAzx: case STYzx: + // ASOzx DCMzx INSzx LSEzx - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x ", endian_16lo8(cpu.instrOperand)); + break; + // Zero Page with Y Offset Addressing Mode Handler + case LDXzy: case STXzy: case SAXzy: case LAXzy: + // AXSzx - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x ", endian_16lo8(cpu.instrOperand)); + break; + // Absolute Addressing Mode Handler + case ADCa: case ANDa: case ASLa: case BITa: case CMPa: case CPXa: + case CPYa: case DCPa: case DECa: case EORa: case INCa: case ISBa: + case JMPw: case JSRw: case LAXa: case LDAa: case LDXa: case LDYa: + case LSRa: case NOPa: case ORAa: case ROLa: case RORa: case SAXa: + case SBCa: case SLOa: case SREa: case STAa: case STXa: case STYa: + case RLAa: case RRAa: + // ASOa AXSa DCMa INSa LSEa - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x %02x ", endian_16lo8(cpu.instrOperand), endian_16hi8 (cpu.instrOperand)); + break; + // Absolute With X Offset Addresing Mode Handler + case ADCax: case ANDax: case ASLax: case CMPax: case DCPax: case DECax: + case EORax: case INCax: case ISBax: case LDAax: case LDYax: case LSRax: + case NOPax_: case ORAax: case RLAax: case ROLax: case RORax: case RRAax: + case SBCax: case SHYax: case SLOax: case SREax: case STAax: + // ASOax DCMax INSax LSEax SAYax - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x %02x ", endian_16lo8(cpu.instrOperand), endian_16hi8 (cpu.instrOperand)); + break; + // Absolute With Y Offset Addresing Mode Handler + case ADCay: case ANDay: case CMPay: case DCPay: case EORay: case ISBay: + case LASay: case LAXay: case LDAay: case LDXay: case ORAay: case RLAay: + case RRAay: case SBCay: case SHAay: case SHSay: case SHXay: case SLOay: + case SREay: case STAay: + // ASOay AXAay DCMay INSax LSEay TASay XASay - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x %02x ", endian_16lo8(cpu.instrOperand), endian_16hi8 (cpu.instrOperand)); + break; + // Immediate and Relative Addressing Mode Handler + case ADCb: case ANDb: case ANCb_: case ANEb: case ASRb: case ARRb: + case BCCr: case BCSr: case BEQr: case BMIr: case BNEr: case BPLr: + case BVCr: case BVSr: + case CMPb: case CPXb: case CPYb: case EORb: case LDAb: case LDXb: + case LDYb: case LXAb: case NOPb_: case ORAb: case SBCb_: case SBXb: + // OALb ALRb XAAb - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x ", endian_16lo8(cpu.Cycle_Data)); + break; + // Indirect Addressing Mode Handler + case JMPi: + fprintf(cpu.m_fdbg, "%02x %02x ", endian_16lo8(cpu.instrOperand), endian_16hi8 (cpu.instrOperand)); + break; + // Indexed with X Preinc Addressing Mode Handler + case ADCix: case ANDix: case CMPix: case DCPix: case EORix: case ISBix: + case LAXix: case LDAix: case ORAix: case SAXix: case SBCix: case SLOix: + case SREix: case STAix: case RLAix: case RRAix: + // ASOix AXSix DCMix INSix LSEix - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x ", endian_16lo8(cpu.instrOperand)); + break; + // Indexed with Y Postinc Addressing Mode Handler + case ADCiy: case ANDiy: case CMPiy: case DCPiy: case EORiy: case ISBiy: + case LAXiy: case LDAiy: case ORAiy: case RLAiy: case RRAiy: case SBCiy: + case SHAiy: case SLOiy: case SREiy: case STAiy: + // AXAiy ASOiy LSEiy DCMiy INSiy - Optional Opcode Names + fprintf(cpu.m_fdbg, "%02x ", endian_16lo8(cpu.instrOperand)); + break; + default: + fprintf(cpu.m_fdbg, " "); + break; + } + + switch(opcode) + { + case ADCb: case ADCz: case ADCzx: case ADCa: case ADCax: case ADCay: + case ADCix: case ADCiy: + fprintf(cpu.m_fdbg, " ADC"); break; + case ANCb_: + fprintf(cpu.m_fdbg, "*ANC"); break; + case ANDb: case ANDz: case ANDzx: case ANDa: case ANDax: case ANDay: + case ANDix: case ANDiy: + fprintf(cpu.m_fdbg, " AND"); break; + case ANEb: // Also known as XAA + fprintf(cpu.m_fdbg, "*ANE"); break; + case ARRb: + fprintf(cpu.m_fdbg, "*ARR"); break; + case ASLn: case ASLz: case ASLzx: case ASLa: case ASLax: + fprintf(cpu.m_fdbg, " ASL"); break; + case ASRb: // Also known as ALR + fprintf(cpu.m_fdbg, "*ASR"); break; + case BCCr: + fprintf(cpu.m_fdbg, " BCC"); break; + case BCSr: + fprintf(cpu.m_fdbg, " BCS"); break; + case BEQr: + fprintf(cpu.m_fdbg, " BEQ"); break; + case BITz: case BITa: + fprintf(cpu.m_fdbg, " BIT"); break; + case BMIr: + fprintf(cpu.m_fdbg, " BMI"); break; + case BNEr: + fprintf(cpu.m_fdbg, " BNE"); break; + case BPLr: + fprintf(cpu.m_fdbg, " BPL"); break; + case BRKn: + fprintf(cpu.m_fdbg, " BRK"); break; + case BVCr: + fprintf(cpu.m_fdbg, " BVC"); break; + case BVSr: + fprintf(cpu.m_fdbg, " BVS"); break; + case CLCn: + fprintf(cpu.m_fdbg, " CLC"); break; + case CLDn: + fprintf(cpu.m_fdbg, " CLD"); break; + case CLIn: + fprintf(cpu.m_fdbg, " CLI"); break; + case CLVn: + fprintf(cpu.m_fdbg, " CLV"); break; + case CMPb: case CMPz: case CMPzx: case CMPa: case CMPax: case CMPay: + case CMPix: case CMPiy: + fprintf(cpu.m_fdbg, " CMP"); break; + case CPXb: case CPXz: case CPXa: + fprintf(cpu.m_fdbg, " CPX"); break; + case CPYb: case CPYz: case CPYa: + fprintf(cpu.m_fdbg, " CPY"); break; + case DCPz: case DCPzx: case DCPa: case DCPax: case DCPay: case DCPix: + case DCPiy: // Also known as DCM + fprintf(cpu.m_fdbg, "*DCP"); break; + case DECz: case DECzx: case DECa: case DECax: + fprintf(cpu.m_fdbg, " DEC"); break; + case DEXn: + fprintf(cpu.m_fdbg, " DEX"); break; + case DEYn: + fprintf(cpu.m_fdbg, " DEY"); break; + case EORb: case EORz: case EORzx: case EORa: case EORax: case EORay: + case EORix: case EORiy: + fprintf(cpu.m_fdbg, " EOR"); break; + case INCz: case INCzx: case INCa: case INCax: + fprintf(cpu.m_fdbg, " INC"); break; + case INXn: + fprintf(cpu.m_fdbg, " INX"); break; + case INYn: + fprintf(cpu.m_fdbg, " INY"); break; + case ISBz: case ISBzx: case ISBa: case ISBax: case ISBay: case ISBix: + case ISBiy: // Also known as INS + fprintf(cpu.m_fdbg, "*ISB"); break; + case JMPw: case JMPi: + fprintf(cpu.m_fdbg, " JMP"); break; + case JSRw: + fprintf(cpu.m_fdbg, " JSR"); break; + case LASay: + fprintf(cpu.m_fdbg, "*LAS"); break; + case LAXz: case LAXzy: case LAXa: case LAXay: case LAXix: case LAXiy: + fprintf(cpu.m_fdbg, "*LAX"); break; + case LDAb: case LDAz: case LDAzx: case LDAa: case LDAax: case LDAay: + case LDAix: case LDAiy: + fprintf(cpu.m_fdbg, " LDA"); break; + case LDXb: case LDXz: case LDXzy: case LDXa: case LDXay: + fprintf(cpu.m_fdbg, " LDX"); break; + case LDYb: case LDYz: case LDYzx: case LDYa: case LDYax: + fprintf(cpu.m_fdbg, " LDY"); break; + case LSRz: case LSRzx: case LSRa: case LSRax: case LSRn: + fprintf(cpu.m_fdbg, " LSR"); break; + case NOPn_: case NOPb_: case NOPz_: case NOPzx_: case NOPa: case NOPax_: + if(opcode != NOPn) fprintf(cpu.m_fdbg, "*"); + else fprintf(cpu.m_fdbg, " "); + fprintf(cpu.m_fdbg, "NOP"); break; + case LXAb: // Also known as OAL + fprintf(cpu.m_fdbg, "*LXA"); break; + case ORAb: case ORAz: case ORAzx: case ORAa: case ORAax: case ORAay: + case ORAix: case ORAiy: + fprintf(cpu.m_fdbg, " ORA"); break; + case PHAn: + fprintf(cpu.m_fdbg, " PHA"); break; + case PHPn: + fprintf(cpu.m_fdbg, " PHP"); break; + case PLAn: + fprintf(cpu.m_fdbg, " PLA"); break; + case PLPn: + fprintf(cpu.m_fdbg, " PLP"); break; + case RLAz: case RLAzx: case RLAix: case RLAa: case RLAax: case RLAay: + case RLAiy: + fprintf(cpu.m_fdbg, "*RLA"); break; + case ROLz: case ROLzx: case ROLa: case ROLax: case ROLn: + fprintf(cpu.m_fdbg, " ROL"); break; + case RORz: case RORzx: case RORa: case RORax: case RORn: + fprintf(cpu.m_fdbg, " ROR"); break; + case RRAa: case RRAax: case RRAay: case RRAz: case RRAzx: case RRAix: + case RRAiy: + fprintf(cpu.m_fdbg, "*RRA"); break; + case RTIn: + fprintf(cpu.m_fdbg, " RTI"); break; + case RTSn: + fprintf(cpu.m_fdbg, " RTS"); break; + case SAXz: case SAXzy: case SAXa: case SAXix: // Also known as AXS + fprintf(cpu.m_fdbg, "*SAX"); break; + case SBCb_: + if(opcode != SBCb) fprintf(cpu.m_fdbg, "*"); + else fprintf(cpu.m_fdbg, " "); + fprintf(cpu.m_fdbg, "SBC"); break; + case SBCz: case SBCzx: case SBCa: case SBCax: case SBCay: case SBCix: + case SBCiy: + fprintf(cpu.m_fdbg, " SBC"); break; + case SBXb: + fprintf(cpu.m_fdbg, "*SBX"); break; + case SECn: + fprintf(cpu.m_fdbg, " SEC"); break; + case SEDn: + fprintf(cpu.m_fdbg, " SED"); break; + case SEIn: + fprintf(cpu.m_fdbg, " SEI"); break; + case SHAay: case SHAiy: // Also known as AXA + fprintf(cpu.m_fdbg, "*SHA"); break; + case SHSay: // Also known as TAS + fprintf(cpu.m_fdbg, "*SHS"); break; + case SHXay: // Also known as XAS + fprintf(cpu.m_fdbg, "*SHX"); break; + case SHYax: // Also known as SAY + fprintf(cpu.m_fdbg, "*SHY"); break; + case SLOz: case SLOzx: case SLOa: case SLOax: case SLOay: case SLOix: + case SLOiy: // Also known as ASO + fprintf(cpu.m_fdbg, "*SLO"); break; + case SREz: case SREzx: case SREa: case SREax: case SREay: case SREix: + case SREiy: // Also known as LSE + fprintf(cpu.m_fdbg, "*SRE"); break; + case STAz: case STAzx: case STAa: case STAax: case STAay: case STAix: + case STAiy: + fprintf(cpu.m_fdbg, " STA"); break; + case STXz: case STXzy: case STXa: + fprintf(cpu.m_fdbg, " STX"); break; + case STYz: case STYzx: case STYa: + fprintf(cpu.m_fdbg, " STY"); break; + case TAXn: + fprintf(cpu.m_fdbg, " TAX"); break; + case TAYn: + fprintf(cpu.m_fdbg, " TAY"); break; + case TSXn: + fprintf(cpu.m_fdbg, " TSX"); break; + case TXAn: + fprintf(cpu.m_fdbg, " TXA"); break; + case TXSn: + fprintf(cpu.m_fdbg, " TXS"); break; + case TYAn: + fprintf(cpu.m_fdbg, " TYA"); break; + default: + fprintf(cpu.m_fdbg, "*HLT"); break; + } + + switch(opcode) + { + // Accumulator or Implied cpu.Cycle_EffectiveAddressing + case ASLn: case LSRn: case ROLn: case RORn: + fprintf(cpu.m_fdbg, "n A"); + break; + + // Zero Page Addressing Mode Handler + case ADCz: case ANDz: case ASLz: case BITz: case CMPz: case CPXz: + case CPYz: case DCPz: case DECz: case EORz: case INCz: case ISBz: + case LAXz: case LDAz: case LDXz: case LDYz: case LSRz: case ORAz: + + case ROLz: case RORz: case SBCz: case SREz: case SLOz: case RLAz: + case RRAz: + // ASOz AXSz DCMz INSz LSEz - Optional Opcode Names + fprintf(cpu.m_fdbg, "z %02x {%02x}", endian_16lo8(cpu.instrOperand), cpu.Cycle_Data); + break; + case SAXz: case STAz: case STXz: case STYz: +#ifdef DEBUG + case NOPz_: +#endif + fprintf(cpu.m_fdbg, "z %02x", endian_16lo8(cpu.instrOperand)); + break; + + // Zero Page with X Offset Addressing Mode Handler + case ADCzx: case ANDzx: case ASLzx: case CMPzx: case DCPzx: case DECzx: + case EORzx: case INCzx: case ISBzx: case LDAzx: case LDYzx: case LSRzx: + case ORAzx: case RLAzx: case ROLzx: case RORzx: case RRAzx: case SBCzx: + case SLOzx: case SREzx: + // ASOzx DCMzx INSzx LSEzx - Optional Opcode Names + fprintf(cpu.m_fdbg, "zx %02x,X", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]{%02x}", cpu.Cycle_EffectiveAddress, cpu.Cycle_Data); + break; + case STAzx: case STYzx: +#ifdef DEBUG + case NOPzx_: +#endif + fprintf(cpu.m_fdbg, "zx %02x,X", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]", cpu.Cycle_EffectiveAddress); + break; + + // Zero Page with Y Offset Addressing Mode Handler + case LAXzy: case LDXzy: + // AXSzx - Optional Opcode Names + fprintf(cpu.m_fdbg, "zy %02x,Y", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]{%02x}", cpu.Cycle_EffectiveAddress, cpu.Cycle_Data); + break; + case STXzy: case SAXzy: + fprintf(cpu.m_fdbg, "zy %02x,Y", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]", cpu.Cycle_EffectiveAddress); + break; + + // Absolute Addressing Mode Handler + case ADCa: case ANDa: case ASLa: case BITa: case CMPa: case CPXa: + case CPYa: case DCPa: case DECa: case EORa: case INCa: case ISBa: + case LAXa: case LDAa: case LDXa: case LDYa: case LSRa: case ORAa: + case ROLa: case RORa: case SBCa: case SLOa: case SREa: case RLAa: + case RRAa: + // ASOa AXSa DCMa INSa LSEa - Optional Opcode Names + fprintf(cpu.m_fdbg, "a %04x {%02x}", cpu.instrOperand, cpu.Cycle_Data); + break; + case SAXa: case STAa: case STXa: case STYa: +#ifdef DEBUG + case NOPa: +#endif + fprintf(cpu.m_fdbg, "a %04x", cpu.instrOperand); + break; + case JMPw: case JSRw: + fprintf(cpu.m_fdbg, "w %04x", cpu.instrOperand); + break; + + // Absolute With X Offset Addresing Mode Handler + case ADCax: case ANDax: case ASLax: case CMPax: case DCPax: case DECax: + case EORax: case INCax: case ISBax: case LDAax: case LDYax: case LSRax: + case ORAax: case RLAax: case ROLax: case RORax: case RRAax: case SBCax: + case SLOax: case SREax: + // ASOax DCMax INSax LSEax SAYax - Optional Opcode Names + fprintf(cpu.m_fdbg, "ax %04x,X", cpu.instrOperand); + fprintf(cpu.m_fdbg, " [%04x]{%02x}", cpu.Cycle_EffectiveAddress, cpu.Cycle_Data); + break; + case SHYax: case STAax: +#ifdef DEBUG + case NOPax_: +#endif + fprintf(cpu.m_fdbg, "ax %04x,X", cpu.instrOperand); + fprintf(cpu.m_fdbg, " [%04x]", cpu.Cycle_EffectiveAddress); + break; + + // Absolute With Y Offset Addresing Mode Handler + case ADCay: case ANDay: case CMPay: case DCPay: case EORay: case ISBay: + case LASay: case LAXay: case LDAay: case LDXay: case ORAay: case RLAay: + case RRAay: case SBCay: case SHSay: case SLOay: case SREay: + // ASOay AXAay DCMay INSax LSEay TASay XASay - Optional Opcode Names + fprintf(cpu.m_fdbg, "ay %04x,Y", cpu.instrOperand); + fprintf(cpu.m_fdbg, " [%04x]{%02x}", cpu.Cycle_EffectiveAddress, cpu.Cycle_Data); + break; + case SHAay: case SHXay: case STAay: + fprintf(cpu.m_fdbg, "ay %04x,Y", cpu.instrOperand); + fprintf(cpu.m_fdbg, " [%04x]", cpu.Cycle_EffectiveAddress); + break; + + // Immediate Addressing Mode Handler + case ADCb: case ANDb: case ANCb_: case ANEb: case ASRb: case ARRb: + case CMPb: case CPXb: case CPYb: case EORb: case LDAb: case LDXb: + case LDYb: case LXAb: case ORAb: case SBCb_: case SBXb: + // OALb ALRb XAAb - Optional Opcode Names +#ifdef DEBUG + case NOPb_: +#endif + fprintf(cpu.m_fdbg, "b #%02x", endian_16lo8(cpu.instrOperand)); + break; + + // Relative Addressing Mode Handler + case BCCr: case BCSr: case BEQr: case BMIr: case BNEr: case BPLr: + case BVCr: case BVSr: + fprintf(cpu.m_fdbg, "r #%02x", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]", cpu.Cycle_EffectiveAddress); + break; + + // Indirect Addressing Mode Handler + case JMPi: + fprintf(cpu.m_fdbg, "i (%04x)", cpu.instrOperand); + fprintf(cpu.m_fdbg, " [%04x]", cpu.Cycle_EffectiveAddress); + break; + + // Indexed with X Preinc Addressing Mode Handler + case ADCix: case ANDix: case CMPix: case DCPix: case EORix: case ISBix: + case LAXix: case LDAix: case ORAix: case SBCix: case SLOix: case SREix: + case RLAix: case RRAix: + // ASOix AXSix DCMix INSix LSEix - Optional Opcode Names + fprintf(cpu.m_fdbg, "ix (%02x,X)", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]{%02x}", cpu.Cycle_EffectiveAddress, cpu.Cycle_Data); + break; + case SAXix: case STAix: + fprintf(cpu.m_fdbg, "ix (%02x,X)", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]", cpu.Cycle_EffectiveAddress); + break; + + // Indexed with Y Postinc Addressing Mode Handler + case ADCiy: case ANDiy: case CMPiy: case DCPiy: case EORiy: case ISBiy: + case LAXiy: case LDAiy: case ORAiy: case RLAiy: case RRAiy: case SBCiy: + case SLOiy: case SREiy: + // AXAiy ASOiy LSEiy DCMiy INSiy - Optional Opcode Names + fprintf(cpu.m_fdbg, "iy (%02x),Y", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]{%02x}", cpu.Cycle_EffectiveAddress, cpu.Cycle_Data); + break; + case SHAiy: case STAiy: + fprintf(cpu.m_fdbg, "iy (%02x),Y", endian_16lo8(cpu.instrOperand)); + fprintf(cpu.m_fdbg, " [%04x]", cpu.Cycle_EffectiveAddress); + break; + + default: + break; + } + + fprintf(cpu.m_fdbg, "\n\n"); + fflush(cpu.m_fdbg); +} + +} + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/13/1364d18de2178fea35bc6c943e786d055e613016.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/13/1364d18de2178fea35bc6c943e786d055e613016.svn-base new file mode 100644 index 000000000..c1798e91a --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/13/1364d18de2178fea35bc6c943e786d055e613016.svn-base @@ -0,0 +1,167 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2001-2002 by Jarno Paananen + * Copyright 2000-2002 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef HARDSID_EMU_H +#define HARDSID_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 + +class sidbuilder; + +#ifdef _WIN32 + +#include + +#define HSID_VERSION_MIN (WORD) 0x0200 +#define HSID_VERSION_204 (WORD) 0x0204 +#define HSID_VERSION_207 (WORD) 0x0207 + +//************************************************************************** +// Version 2 Interface +typedef void (CALLBACK* HsidDLL2_Delay_t) (BYTE deviceID, WORD cycles); +typedef BYTE (CALLBACK* HsidDLL2_Devices_t) (); +typedef void (CALLBACK* HsidDLL2_Filter_t) (BYTE deviceID, BOOL filter); +typedef void (CALLBACK* HsidDLL2_Flush_t) (BYTE deviceID); +typedef void (CALLBACK* HsidDLL2_Mute_t) (BYTE deviceID, BYTE channel, BOOL mute); +typedef void (CALLBACK* HsidDLL2_MuteAll_t) (BYTE deviceID, BOOL mute); +typedef void (CALLBACK* HsidDLL2_Reset_t) (BYTE deviceID); +typedef BYTE (CALLBACK* HsidDLL2_Read_t) (BYTE deviceID, WORD cycles, BYTE SID_reg); +typedef void (CALLBACK* HsidDLL2_Sync_t) (BYTE deviceID); +typedef void (CALLBACK* HsidDLL2_Write_t) (BYTE deviceID, WORD cycles, BYTE SID_reg, BYTE data); +typedef WORD (CALLBACK* HsidDLL2_Version_t) (); + +// Version 2.04 Extensions +typedef BOOL (CALLBACK* HsidDLL2_Lock_t) (BYTE deviceID); +typedef void (CALLBACK* HsidDLL2_Unlock_t) (BYTE deviceID); +typedef void (CALLBACK* HsidDLL2_Reset2_t) (BYTE deviceID, BYTE volume); + +// Version 2.07 Extensions +typedef void (CALLBACK* HsidDLL2_Mute2_t) (BYTE deviceID, BYTE channel, BOOL mute, BOOL manual); + +namespace libsidplayfp +{ + +struct HsidDLL2 +{ + HINSTANCE Instance; + HsidDLL2_Delay_t Delay; + HsidDLL2_Devices_t Devices; + HsidDLL2_Filter_t Filter; + HsidDLL2_Flush_t Flush; + HsidDLL2_Lock_t Lock; + HsidDLL2_Unlock_t Unlock; + HsidDLL2_Mute_t Mute; + HsidDLL2_Mute2_t Mute2; + HsidDLL2_MuteAll_t MuteAll; + HsidDLL2_Reset_t Reset; + HsidDLL2_Reset2_t Reset2; + HsidDLL2_Read_t Read; + HsidDLL2_Sync_t Sync; + HsidDLL2_Write_t Write; + WORD Version; +}; + +} + +#endif // _WIN32 + +namespace libsidplayfp +{ + +#define HARDSID_VOICES 3 +// Approx 60ms +#define HARDSID_DELAY_CYCLES 60000 + +/*************************************************************************** + * HardSID SID Specialisation + ***************************************************************************/ +class HardSID final : public sidemu, private Event +{ +private: + friend class HardSIDBuilder; + + // HardSID specific data +#ifndef _WIN32 + static bool m_sidFree[16]; + int m_handle; +#endif + + static const unsigned int voices; + static unsigned int sid; + + // Must stay in this order + bool muted[HARDSID_VOICES]; + unsigned int m_instance; + +private: + event_clock_t delay(); + +public: + static const char* getCredits(); + +public: + HardSID(sidbuilder *builder); + ~HardSID(); + + 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) override {} + + void voice(unsigned int num, bool mute) override; + + // HardSID specific + void flush(); + void filter(bool enable); + + // Must lock the SID before using the standard functions. + bool lock(EventScheduler *env) override; + void unlock() override; + +private: + // Fixed interval timer delay to prevent sidplay2 + // shoot to 100% CPU usage when song no longer + // writes to SID. + void event() override; +}; + +} + +#endif // HARDSID_EMU_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/14/144da8856a3c4a932444c44479c34a3d020245b8.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/14/144da8856a3c4a932444c44479c34a3d020245b8.svn-base new file mode 100644 index 000000000..a4a3a60bb --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/14/144da8856a3c4a932444c44479c34a3d020245b8.svn-base @@ -0,0 +1,336 @@ +// +// 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 + +#ifdef HAVE_DLFCN_H + #include + #define TEXT(x) x +#elif defined (_WIN32) + #include +#else + #error dl not supported +#endif + +#ifdef HAVE_FTD2XX + #include + #ifndef XSFW_SUPPORT + #define XSFW_SUPPORT + #endif +#else + #warning libftd2xx support disabled. +#endif + +#ifdef HAVE_FTDI + #include + #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 * ftdi, const unsigned char * 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 * ftdi, unsigned char * 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 +#ifdef _WIN64 +# define LIBFTD2XX "ftd2xx64" +#else +# define LIBFTD2XX "ftd2xx" +#endif +#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"); + +setupfail: + return rval; +} + +/** + * Release dlopen'd library. + */ +void xSfw_dlclose() +{ + if (dlhandle != NULL) { + _xSfw_dlclose(dlhandle); + dlhandle = NULL; + } +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/15/15f3aea3badbebbe5d2a80c529142cf0f53e2e5c.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/15/15f3aea3badbebbe5d2a80c529142cf0f53e2e5c.svn-base new file mode 100644 index 000000000..aae19a7e6 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/15/15f3aea3badbebbe5d2a80c529142cf0f53e2e5c.svn-base @@ -0,0 +1,408 @@ + 0x01, 0x00, 0x6f, 0x36, 0x35, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x9e, 0x0c, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x61, 0xf1, 0x60, 0x01, + 0x02, 0x04, 0x00, 0x07, 0x0e, 0x02, 0x02, 0xfe, + 0x02, 0x02, 0xfe, 0xfe, 0x00, 0x01, 0x00, 0xff, + 0x00, 0x02, 0x04, 0x05, 0x07, 0x09, 0x0b, 0x1e, + 0x18, 0x8b, 0x7e, 0xfa, 0x06, 0xac, 0xf3, 0xe6, + 0x8f, 0xf8, 0x2e, 0x86, 0x8e, 0x96, 0x9f, 0xa8, + 0xb3, 0xbd, 0xc8, 0xd4, 0xe1, 0xee, 0xfd, 0x8c, + 0x78, 0x64, 0x50, 0x3c, 0x28, 0x14, 0x00, 0x00, + 0x02, 0x03, 0x05, 0x07, 0x08, 0x0a, 0x0c, 0x0d, + 0x0f, 0x11, 0x12, 0x00, 0xe0, 0x00, 0x05, 0x0a, + 0x0f, 0xf9, 0x00, 0xf5, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x50, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x70, 0x00, 0x00, 0x80, 0x00, 0x00, 0x90, + 0x00, 0x00, 0xa0, 0x00, 0xa9, 0x00, 0x8d, 0x00, + 0xf0, 0xa2, 0x95, 0xa0, 0x42, 0xad, 0xa6, 0x02, + 0xf0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, 0x91, 0x63, 0xc8, + 0x91, 0x63, 0xa9, 0x40, 0x9d, 0x1a, 0xf0, 0x91, + 0x63, 0xa9, 0x20, 0x9d, 0x1d, 0xf0, 0xc8, 0x91, + 0x63, 0xa9, 0xf5, 0x9d, 0x20, 0xf0, 0xc8, 0x91, + 0x63, 0xca, 0x10, 0xa4, 0x8a, 0xa2, 0x17, 0x9d, + 0x3e, 0xf1, 0xca, 0x10, 0xfa, 0xa5, 0x61, 0x18, + 0x69, 0x06, 0x85, 0x63, 0xa9, 0x00, 0xaa, 0xa8, + 0x65, 0x62, 0x85, 0x64, 0x9d, 0xab, 0xf0, 0x9d, + 0xb4, 0xf0, 0xa5, 0x63, 0x9d, 0xa8, 0xf0, 0x9d, + 0xb1, 0xf0, 0x18, 0x71, 0x61, 0x85, 0x63, 0xa5, + 0x64, 0xc8, 0x71, 0x61, 0xc8, 0xe8, 0xe0, 0x03, + 0xd0, 0xe0, 0xa6, 0x63, 0xa8, 0x60, 0xa9, 0x00, + 0x8d, 0x04, 0xd5, 0x8d, 0x0b, 0xd5, 0x8d, 0x12, + 0xd5, 0x8d, 0x01, 0xd5, 0x8d, 0x08, 0xd5, 0x8d, + 0x0f, 0xd5, 0xa9, 0x08, 0x8d, 0x17, 0xd5, 0xad, + 0x5b, 0xf1, 0x8d, 0x04, 0xdc, 0xad, 0x5c, 0xf1, + 0x8d, 0x05, 0xdc, 0x60, 0xea, 0xea, 0xea, 0xea, + 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, + 0xea, 0xea, 0x60, 0xa9, 0x08, 0x8d, 0x00, 0xf0, + 0x6c, 0x5d, 0xf1, 0xea, 0xea, 0xea, 0xad, 0x00, + 0xf0, 0x30, 0xf0, 0x09, 0x80, 0xa8, 0x29, 0x07, + 0xf0, 0xee, 0xd8, 0x8c, 0x00, 0xf0, 0xea, 0xa5, + 0xfb, 0x8d, 0x56, 0xf1, 0xa5, 0xfc, 0x8d, 0x57, + 0xf1, 0xa5,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, 0xbd, 0x2a, + 0xf0, 0x4c, 0x70, 0xf8, 0xa8, 0xbd, 0x05, 0xf0, + 0x29, 0xa0, 0xc9, 0x80, 0xf0, 0x30, 0x85, 0xff, + 0x18, 0xad, 0x27, 0xf0, 0xd0, 0x01, 0x38, 0x88, + 0x88, 0xf0, 0x06, 0x6a, 0xb0, 0x4e, 0x88, 0xd0, + 0xfa, 0xa4, 0xff, 0x85, 0xff, 0xf0, 0x26, 0x46, + 0xff, 0xb0, 0x41, 0xf0, 0x42, 0x65, 0xff, 0xb0, + 0x3e, 0xc8, 0x10, 0x19, 0x46, 0xff, 0xb0, 0x34, + 0x65, 0xff, 0x90, 0x11, 0xb0, 0x31, 0xad, 0x28, + 0xf0, 0xf0, 0x29, 0x88, 0x88, 0xf0, 0x06, 0x4a, + 0xb0, 0x22, 0x88, 0xd0, 0xfa, 0x9d, 0x30, 0xf0, + 0xbd, 0x1a, 0xf0, 0x29, 0xf6, 0x9d, 0x1a, 0xf0, + 0x38, 0xbd, 0x02, 0xf0, 0x29, 0x07, 0xd0, 0x03, + 0x7e, 0x36, 0xf0, 0xbd, 0x1a, 0xf0, 0x69, 0x00, + 0x9d, 0x1a, 0xf0, 0x60, 0xa9, 0x10, 0x2c, 0xa9, + 0x18, 0x8d, 0x00, 0xf0, 0x60, 0x98, 0x48, 0xa5, + 0xff, 0x4a, 0x90, 0x03, 0x4c, 0x42, 0xfa, 0x4a, + 0x4a, 0xb0, 0x1e, 0x4a, 0xb0, 0x0e, 0x9d, 0x9c, + 0xf0, 0x9d, 0x17, 0xf0, 0x68, 0x9d, 0x99, 0xf0, + 0x9d, 0x14, 0xf0, 0x60, 0x4a, 0x90, 0x02, 0x09, + 0xf8, 0x9d, 0x8a, 0xf0, 0x68, 0x9d, 0x87, 0xf0, + 0x60, 0x4a, 0xb0, 0x03, 0x4c, 0x4a, 0xf9, 0x4a, + 0xb0, 0x61, 0x4a, 0xb0, 0x0f, 0xd0, 0x08, 0x68, + 0x9d, 0xa5,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 0xf0, 0x29, + 0xf0, 0x4d, 0x25, 0xf0, 0x8d, 0x25, 0xf0, 0x60, + 0x4d, 0x26, 0xf0, 0x29, 0x0f, 0x4d, 0x26, 0xf0, + 0x8d, 0x26, 0xf0, 0x60, 0x4a, 0xb0, 0x0b, 0x4a, + 0xb0, 0x04, 0x8d, 0xca, 0xf0, 0x60, 0x8d, 0xcb, + 0xf0, 0x60, 0x4a, 0x90, 0x03, 0x4c, 0xa5, 0xfb, + 0x4a, 0xa8, 0xf0, 0x21, 0x88, 0xf0, 0x34, 0x88, + 0xf0, 0x42, 0x88, 0xf0, 0x4a, 0x88, 0xf0, 0x52, + 0x88, 0xf0, 0x5c, 0x88, 0xf0, 0x66, 0x88, 0xf0, + 0x73, 0x29, 0x07, 0x09, 0x10, 0xb0, 0x03, 0x4c, + 0xb7, 0xfa, 0x4c, 0x7f, 0xfa, 0xac, 0x26, 0xf0, + 0xb0, 0x07, 0xc8, 0x98, 0x29, 0x0f, 0xd0, 0x07, + 0x60, 0x98, 0x29, 0x0f, 0xf0, 0x04, 0x88, 0x8c, + 0x26, 0xf0, 0x60, 0xbd, 0x62, 0xf1, 0x49, 0xff, + 0x2d, 0x25, 0xf0, 0x90, 0x03, 0x1d, 0x62, 0xf1, + 0x8d, 0x25, 0xf0, 0x60, 0xbd, 0x1a, 0xf0, 0x29, + 0xfb, 0x90, 0x55, 0x09, 0x04, 0xb0, 0x51, 0xbd, + 0x1a, 0xf0, 0x29, 0xfd, 0x90, 0x4a, 0x09, 0x02, + 0xb0, 0x46, 0xad, 0x25, 0xf0, 0x29, 0xf7, 0x90, + 0x02, 0x09, 0x08, 0x8d, 0x25, 0xf0, 0x60, 0xad, + 0x26, 0xf0, 0x29, 0x7f, 0x90, 0x02, 0x09, 0x80, + 0x8d, 0x26, 0xf0, 0x60, 0x98, 0x8d, 0xbd, 0xf0, + 0x8d, 0xdf, 0xf0, 0xc8, 0x8c, 0xe0, 0xf0, 0x2a, + 0x8d, 0xc9, 0xf0,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x30, 0xf0, 0x60, 0xad, 0x00, + 0xf0, 0x29, 0x07, 0x8d, 0x81, 0xfc, 0xd0, 0x03, + 0x20, 0xe9, 0xf2, 0x60, 0x00, 0xa2, 0x51, 0xa0, + 0xfc, 0x8e, 0x5d, 0xf1, 0x8c, 0x5e, 0xf1, 0x20, + 0xcf, 0xf1, 0xa2, 0x00, 0xa0, 0x09, 0x20, 0x00, + 0xf2, 0xa9, 0x07, 0x8d, 0x00, 0xf0, 0x8d, 0x81, + 0xfc, 0x60, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x29, + 0xff, 0xf0, 0xf6, 0x4c, 0x29, 0xf3, 0xa9, 0x07, + 0x8d, 0x00, 0xf0, 0x60, 0x00, 0x20, 0x60, 0xec, + 0x4c, 0x60, 0xfc, 0x20, 0x80, 0xec, 0x4c, 0x80, + 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/17/1732df5e13112abb67ae3839d967f01d294cc153.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/17/1732df5e13112abb67ae3839d967f01d294cc153.svn-base new file mode 100644 index 000000000..31fcb1f05 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/17/1732df5e13112abb67ae3839d967f01d294cc153.svn-base @@ -0,0 +1,91 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 1998, 2002 by LaLa + * Copyright 2012-2015 Leandro Nini + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +// +// STIL - Common defines +// + +#ifndef STILDEFS_H +#define STILDEFS_H + +/* DLL building support on win32 hosts */ +#ifndef STIL_EXTERN +# ifdef DLL_EXPORT /* defined by libtool (if required) */ +# define STIL_EXTERN __declspec(dllexport) +# endif +# ifdef STIL_DLL_IMPORT /* define if linking with this dll */ +# define STIL_EXTERN __declspec(dllimport) +# endif +# ifndef STIL_EXTERN /* static linking or !_WIN32 */ +# if defined(__GNUC__) && (__GNUC__ >= 4) +# define STIL_EXTERN __attribute__ ((visibility("default"))) +# else +# define STIL_EXTERN +# endif +# endif +#endif + +/* Deprecated attributes */ +#if defined(_MSCVER) +# define STIL_DEPRECATED __declspec(deprecated) +#elif defined(__GNUC__) +# define STIL_DEPRECATED __attribute__ ((deprecated)) +#else +# define STIL_DEPRECATED +#endif + +#if defined(__linux__) || defined(__FreeBSD__) || defined(solaris2) || defined(sun) || defined(sparc) || defined(sgi) +# define UNIX +#endif + +#if defined(__MACOS__) +# define MAC +#endif + +#if defined(__amigaos__) +# define AMIGA +#endif + +// +// Here you should define: +// - what the pathname separator is on your system (attempted to be defined +// automatically), +// - what function compares strings case-insensitively, +// - what function compares portions of strings case-insensitively. +// + +#ifdef UNIX +# define SLASH '/' +#elif defined MAC +# define SLASH ':' +#elif defined AMIGA +# define SLASH '/' +#else // WinDoze +# define SLASH '\\' +#endif + +// Default HVSC path to STIL. +const char DEFAULT_PATH_TO_STIL[]="/DOCUMENTS/STIL.txt"; + +// Default HVSC path to BUGlist. +const char DEFAULT_PATH_TO_BUGLIST[]="/DOCUMENTS/BUGlist.txt"; + +#endif // STILDEFS_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/17/174043ce762a9d510e7ec3bd644bc7f5d1832e4e.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/17/174043ce762a9d510e7ec3bd644bc7f5d1832e4e.svn-base new file mode 100644 index 000000000..905f98c11 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/17/174043ce762a9d510e7ec3bd644bc7f5d1832e4e.svn-base @@ -0,0 +1,117 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +//--------------------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------------------- +// Redirection to private version of sidplayer (This method is called Cheshire Cat) +// [ms: which is J. Carolan's name for a degenerate 'bridge'] +// This interface can be directly replaced with a libsidplay1 or C interface wrapper. +//--------------------------------------------------------------------------------------------- +//--------------------------------------------------------------------------------------------- + +#include "sidplayfp.h" + +#include "player.h" + +sidplayfp::sidplayfp() : + sidplayer(*(new libsidplayfp::Player)) {} + +sidplayfp::~sidplayfp() +{ + delete &sidplayer; +} + +bool sidplayfp::config(const SidConfig &cfg) +{ + return sidplayer.config(cfg); +} + +const SidConfig &sidplayfp::config() const +{ + return sidplayer.config(); +} + +void sidplayfp::stop() +{ + sidplayer.stop(); +} + +uint_least32_t sidplayfp::play(short *buffer, uint_least32_t count) +{ + return sidplayer.play(buffer, count); +} + +bool sidplayfp::load(SidTune *tune) +{ + return sidplayer.load(tune); +} + +const SidInfo &sidplayfp::info() const +{ + return sidplayer.info(); +} + +uint_least32_t sidplayfp::time() const +{ + return sidplayer.time(); +} + +const char *sidplayfp::error() const +{ + return sidplayer.error(); +} + +bool sidplayfp::fastForward(unsigned int percent) +{ + return sidplayer.fastForward(percent); +} + +void sidplayfp::mute(unsigned int sidNum, unsigned int voice, bool enable) +{ + sidplayer.mute(sidNum, voice, enable); +} + +void sidplayfp::debug(bool enable, FILE *out) +{ + sidplayer.debug(enable, out); +} + +bool sidplayfp::isPlaying() const +{ + return sidplayer.isPlaying(); +} + +void sidplayfp::setRoms(const uint8_t* kernal, const uint8_t* basic, const uint8_t* character) +{ + sidplayer.setRoms(kernal, basic, character); +} + +EventContext *sidplayfp::getEventContext() +{ + return 0; +} + +uint_least16_t sidplayfp::getCia1TimerA() const +{ + return sidplayer.getCia1TimerA(); +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/18/1896aa8d9724301719bdbc680f0e10cfde23c0c8.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/18/1896aa8d9724301719bdbc680f0e10cfde23c0c8.svn-base new file mode 100644 index 000000000..6480a05ea --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/18/1896aa8d9724301719bdbc680f0e10cfde23c0c8.svn-base @@ -0,0 +1,47 @@ +Libsidplayfp (and its console frontend sidplayfp) is a fork of sidplay2, +a C64 music player library which integrates the reSID SID chip emulation +into a cycle-based emulator environment, born with the aim to improve +the quality of emulating the 6581, 8580 chips and the surrounding C64 +system in order to play SID music better. + +Copyright (c) 2000 Simon White +Copyright (c) 2007-2010 Antti Lankila +Copyright (c) 2010-2016 Leandro Nini + +This version of the freely available libsidplayfp emulator engine source code +contains the following contributed or derived work. In the order they first +supplied contributions or code was derived from their work: + + Dag Lem - reSID library + Michael Schwendt - initial implementation of SidTune library, + SidTune Wrapper, MD5 (based on work by L. Peter Deutsch) + Simon White - Majority of LIBSIDPLAY2 Code + Antti Lankila - SID distortion simulation (reSID-fp), + emulation improvements + Leandro Nini - build system rewrite, code refactoring, + backporting from jsidplay2 + LaLa - stilview + André Fachat - reloc65 + Jarno Paananen - HardSID UNIX builder + Thibaut VARENE - exSID driver and builder + +VIC II, CIA and cpu-port emulation is based on VICE code. + +Credit where credit is due, so if I missed anyone please let me know. + +----------------------------------------------------------------------------- + + 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 2 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, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/19440ad203a6dcf295620b3d4fde112b4b286fbb.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/19440ad203a6dcf295620b3d4fde112b4b286fbb.svn-base new file mode 100644 index 000000000..1d4145afb --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/19440ad203a6dcf295620b3d4fde112b4b286fbb.svn-base @@ -0,0 +1,50 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2014 Leandro Nini + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef MD5_INTERNAL_H +#define MD5_INTERNAL_H + +#include "iMd5.h" + +#include "MD5/MD5.h" + +#include "sidcxx11.h" + +namespace libsidplayfp +{ + +class md5Internal final : public iMd5 +{ +private: + MD5 hd; + +public: + void append(const void* data, int nbytes) override { hd.append(data, nbytes); } + + void finish() override { hd.finish(); } + + const unsigned char* getDigest() override { return hd.getDigest(); } + + void reset() override { hd.reset(); } +}; + +} + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/1993aafe2e32cd6e3e8cb01497524fc0741399cb.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/1993aafe2e32cd6e3e8cb01497524fc0741399cb.svn-base new file mode 100644 index 000000000..9d94091ea --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/1993aafe2e32cd6e3e8cb01497524fc0741399cb.svn-base @@ -0,0 +1,48 @@ +/* + * This file is part of sidplayfp, a console SID player. + * + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef AUDIODRV_H +#define AUDIODRV_H + +#include "IAudio.h" + +#include + +#include "AudioBase.h" + +class audioDrv : public IAudio +{ +private: + std::unique_ptr audio; + +public: + virtual ~audioDrv() {} + + bool open(AudioConfig &cfg); + void reset() { audio->reset(); } + bool write() { return audio->write(); } + void close() { audio->close(); } + void pause() { audio->pause(); } + short *buffer() const { return audio->buffer(); } + void getConfig(AudioConfig &cfg) const { audio->getConfig(cfg); } + const char *getErrorString() const { return audio->getErrorString(); } +}; + +#endif // AUDIODRV_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/19b899bae36861f21f6eb9cd17fda625355173e7.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/19b899bae36861f21f6eb9cd17fda625355173e7.svn-base new file mode 100644 index 000000000..1047dd763 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/19/19b899bae36861f21f6eb9cd17fda625355173e7.svn-base @@ -0,0 +1,166 @@ +#!/usr/bin/perl + +#use strict; + +use Fcntl; +use Digest::MD5; + +my $file_name = $ARGV[0]; + +sysopen my $bin, $file_name, O_RDONLY | O_BINARY or die "can't open file: $!"; + +sysread $bin, my $header, 4; +print "File Format: " . $header . "\n"; + +my $rsid = $header == 'RSID'; + +sysread $bin, my $version, 2; +print "Format Version: " . unpack("n", $version) . "\n"; + +# This is the offset from the start of the file to the C64 binary data area. +# Because of the fixed size of the header, this is either 0x0076 for version 1 +# and 0x007C for version 2 and 3. +sysread $bin, my $dataOffset, 2; +printf "Data offset: \$%04x\n", unpack("n", $dataOffset); + +# The C64 memory location where to put the C64 data. 0 means the data are in +# original C64 binary file format, i.e. the first two bytes of the data contain +# the little-endian load address (low byte, high byte). This must always be true +# for RSID files. Furthermore, the actual load address must NOT be less than +# $07E8 in RSID files. +sysread $bin, my $loadAddress, 2; +if (unpack("n", $loadAddress) > 0) { + if ($rsid) { + printf "Broken RSID tune, laod address must be 0 but was: \$%04x\n", $loadAddress + } + else { + printf "Load Address: \$%04x\n", unpack("n", $loadAddress); + } +} + +sysread $bin, my $initAddress, 2; +printf "Init Address: \$%04x\n", unpack("n", $initAddress); + +sysread $bin, my $playAddress, 2; +printf "Play Address: \$%04x\n", unpack("n", $playAddress); + +sysread $bin, my $songs, 2; +printf "Number of tunes: %d\n", unpack("n", $songs); + +sysread $bin, my $startSong, 2; +printf "Default tune: %d\n", unpack("n", $startSong); + +sysread $bin, my $speed, 4; +printf "Speed: \$%08x\n", unpack("N", $speed); + +sysread $bin, my $name, 32; +printf "Title: %s\n", $name; + +sysread $bin, my $author, 32; +printf "Author: %s\n", $author; + +sysread $bin, my $released, 32; +printf "Released: %s\n", $released; + +if (unpack("n", $version) > 1) { + sysread $bin, my $binflags, 2; + my $flags = unpack("n", $binflags); + + printf "MUS: %s\n", ($flags & 0x01)?"true":"false"; + if ($header == "PSID") { + printf "PlaySID Specific: %s\n", ($flags & 0x02)?"true":"false"; + } else { + printf "BASIC: %s\n", ($flags & 0x02)?"true":"false"; + } + + my %clock = ( + 0b00 => "Unknown", + 0b01 => "PAL", + 0b10 => "NTSC", + 0b11 => "PAL and NTSC" + ); + printf "Clock: %s\n", $clock {($flags & 0x0C) >> 2}; + + my %model = ( + 0b00 => "Unknown", + 0b01 => "6581", + 0b10 => "8580", + 0b11 => "6581 and 8580" + ); + printf "SID Model: %s\n", $model {($flags & 0x30) >> 4}; + + if (unpack("n", $version) > 2) { + printf "2nd SID Model: %s\n", $model {($flags & 0xC0) >> 6}; + if (unpack("n", $version) > 3) { + printf "3rd SID Model: %s\n", $model {($flags & 0x300) >> 8}; + } + } + + sysread $bin, my $startPage, 1; + printf "Start Page: \$%02x\n", unpack("C", $startPage); + + sysread $bin, my $pageLength, 1; + printf "Page Length: \$%02x\n", unpack("C", $pageLength); + + sysread $bin, my $secondSIDAddress, 1; + sysread $bin, my $thirdSIDAddress, 1; + if (unpack("n", $version) > 2) { + printf "2nd SID Address: \$D%02x0\n", unpack("C", $secondSIDAddress); + if (unpack("n", $version) > 3) { + printf "3rd SID Address: \$D%02x0\n", unpack("C", $thirdSIDAddress); + } + } +} + +if (unpack("n", $loadAddress) == 0) { + sysread $bin, my $realLoadAddr, 2; + if ($rsid && unpack("v", $realLoadAddr) < 0x07E8) { + printf "Broken RSID tune, laod address must be at least \$07E8 but was: \$%04x\n", $realLoadAddr + } + else { + printf "Load Address: \$%04x\n", unpack("v", $realLoadAddr); + } +} + +# Calculate md5 sum + +my $ctx = Digest::MD5->new; + +# Include C64 data +my $offset = unpack("n", $dataOffset); +if (unpack("n", $loadAddress) == 0) { + $offset += 2; +} +sysseek $bin, $offset, SEEK_SET; +do { + my $datalen = sysread $bin, my $buffer, 65536; + $ctx->add($buffer); +} while ($datalen > 0); + +# Include INIT and PLAY address +$ctx->add(pack("v", unpack("n", $initAddress))); +$ctx->add(pack("v", unpack("n", $playAddress))); + +# # Include number of songs +$ctx->add(pack("v", unpack("n", $songs))); + +# Include song speed for each song +my $mask = 1; +for (my $i = 1; $i <= unpack("n", $songs); $i++, $mask <<= 1) { + if (unpack("N", $speed) & $mask) { + $ctx->add(pack("c", 1)); + } else { + $ctx->add(pack("c", 0)); + } +} + +# Include clock speed flags +if (($flags & 0x0C) >> 2 == 0b10) { + $ctx->add(ack("c", 2)); +} + +print $ctx->hexdigest; +print "\n"; + + +close $bin; diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1a/1a7956f46b32b08b8ca5e953474ebe1522ed9fca.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1a/1a7956f46b32b08b8ca5e953474ebe1522ed9fca.svn-base new file mode 100644 index 000000000..d60507f71 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1a/1a7956f46b32b08b8ca5e953474ebe1522ed9fca.svn-base @@ -0,0 +1,336 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2009-2014 VICE Project + * Copyright 2007-2010 Antti Lankila + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "mos6526.h" + +#include + +#include "sidendian.h" + +namespace libsidplayfp +{ + +enum +{ + PRA = 0, + PRB = 1, + DDRA = 2, + DDRB = 3, + TAL = 4, + TAH = 5, + TBL = 6, + TBH = 7, + TOD_TEN = 8, + TOD_SEC = 9, + TOD_MIN = 10, + TOD_HR = 11, + SDR = 12, + ICR = 13, + IDR = 13, + CRA = 14, + CRB = 15 +}; + +void TimerA::underFlow() +{ + parent.underflowA(); +} + +void TimerA::serialPort() +{ + parent.handleSerialPort(); +} + +void TimerB::underFlow() +{ + parent.underflowB(); +} + +void InterruptSource6526A::trigger(uint8_t interruptMask) +{ + InterruptSource::trigger(interruptMask); + + if (interruptMasked() && interruptTriggered()) + { + triggerInterrupt(); + parent.interrupt(true); + } +} + +uint8_t InterruptSource6526A::clear() +{ + if (!interruptTriggered()) + { + parent.interrupt(false); + } + + return InterruptSource::clear(); +} + +void InterruptSource6526::trigger(uint8_t interruptMask) +{ + InterruptSource::trigger(interruptMask); + + if (interruptMasked() && interruptTriggered()) + { + schedule(); + } +} + +uint8_t InterruptSource6526::clear() +{ + if (scheduled) + { + eventScheduler.cancel(*this); + scheduled = false; + } + + if (!interruptTriggered()) + { + parent.interrupt(false); + } + + return InterruptSource::clear(); +} + +void InterruptSource6526::event() +{ + triggerInterrupt(); + parent.interrupt(true); + + scheduled = false; +} + +void InterruptSource6526::reset() +{ + InterruptSource::reset(); + + scheduled = false; +} + +const char *MOS6526::credits() +{ + return + "MOS6526/6526A (CIA) Emulation:\n" + "\tCopyright (C) 2001-2004 Simon White\n" + "\tCopyright (C) 2007-2010 Antti S. Lankila\n" + "\tCopyright (C) 2009-2014 VICE Project\n" + "\tCopyright (C) 2011-2015 Leandro Nini\n"; +} + +MOS6526::MOS6526(EventScheduler &scheduler) : + eventScheduler(scheduler), + pra(regs[PRA]), + prb(regs[PRB]), + ddra(regs[DDRA]), + ddrb(regs[DDRB]), + timerA(scheduler, *this), + timerB(scheduler, *this), + interruptSource(new InterruptSource6526(scheduler, *this)), + tod(scheduler, *this, regs), + serialPort(interruptSource.get()), + bTickEvent("CIA B counts A", *this, &MOS6526::bTick) +{ + reset(); +} + +void MOS6526::handleSerialPort() +{ + if (regs[CRA] & 0x40) + { + serialPort.handle(regs[SDR]); + } +} + +void MOS6526::reset() +{ + memset(regs, 0, sizeof(regs)); + + serialPort.reset(); + + // Reset timers + timerA.reset(); + timerB.reset(); + + // Reset interruptSource + interruptSource->reset(); + + // Reset tod + tod.reset(); + + triggerScheduled = false; + + eventScheduler.cancel(bTickEvent); +} + +uint8_t MOS6526::read(uint_least8_t addr) +{ + addr &= 0x0f; + + timerA.syncWithCpu(); + timerA.wakeUpAfterSyncWithCpu(); + timerB.syncWithCpu(); + timerB.wakeUpAfterSyncWithCpu(); + + switch (addr) + { + case PRA: // Simulate a serial port + return (regs[PRA] | ~regs[DDRA]); + case PRB: + { + uint8_t data = regs[PRB] | ~regs[DDRB]; + // Timers can appear on the port + if (regs[CRA] & 0x02) + { + data &= 0xbf; + if (timerA.getPb(regs[CRA])) + data |= 0x40; + } + if (regs[CRB] & 0x02) + { + data &= 0x7f; + if (timerB.getPb(regs[CRB])) + data |= 0x80; + } + return data; + } + case TAL: + return endian_16lo8(timerA.getTimer()); + case TAH: + return endian_16hi8(timerA.getTimer()); + case TBL: + return endian_16lo8(timerB.getTimer()); + case TBH: + return endian_16hi8(timerB.getTimer()); + case TOD_TEN: + case TOD_SEC: + case TOD_MIN: + case TOD_HR: + return tod.read(addr - TOD_TEN); + case IDR: + return interruptSource->clear(); + case CRA: + return (regs[CRA] & 0xee) | (timerA.getState() & 1); + case CRB: + return (regs[CRB] & 0xee) | (timerB.getState() & 1); + default: + return regs[addr]; + } +} + +void MOS6526::write(uint_least8_t addr, uint8_t data) +{ + addr &= 0x0f; + + timerA.syncWithCpu(); + timerB.syncWithCpu(); + + const uint8_t oldData = regs[addr]; + regs[addr] = data; + + switch (addr) + { + case PRA: + case DDRA: + portA(); + break; + case PRB: + case DDRB: + portB(); + break; + case TAL: + timerA.latchLo(data); + break; + case TAH: + timerA.latchHi(data); + break; + case TBL: + timerB.latchLo(data); + break; + case TBH: + timerB.latchHi(data); + break; + case TOD_TEN: + case TOD_SEC: + case TOD_MIN: + case TOD_HR: + tod.write(addr - TOD_TEN, data); + break; + case SDR: + if (regs[CRA] & 0x40) + serialPort.setBuffered(); + break; + case ICR: + interruptSource->set(data); + break; + case CRA: + if ((data & 1) && !(oldData & 1)) + { + // Reset the underflow flipflop for the data port + timerA.setPbToggle(true); + } + timerA.setControlRegister(data); + break; + case CRB: + if ((data & 1) && !(oldData & 1)) + { + // Reset the underflow flipflop for the data port + timerB.setPbToggle(true); + } + timerB.setControlRegister(data | (data & 0x40) >> 1); + break; + } + + timerA.wakeUpAfterSyncWithCpu(); + timerB.wakeUpAfterSyncWithCpu(); +} + +void MOS6526::bTick() +{ + timerB.cascade(); +} + +void MOS6526::underflowA() +{ + interruptSource->trigger(InterruptSource::INTERRUPT_UNDERFLOW_A); + + if ((regs[CRB] & 0x41) == 0x41) + { + if (timerB.started()) + { + eventScheduler.schedule(bTickEvent, 0, EVENT_CLOCK_PHI2); + } + } +} + +void MOS6526::underflowB() +{ + interruptSource->trigger(InterruptSource::INTERRUPT_UNDERFLOW_B); +} + +void MOS6526::todInterrupt() +{ + interruptSource->trigger(InterruptSource::INTERRUPT_ALARM); +} + +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1b/1b2bfc9560ab5ac178f9de4cb5e2f2a68ff2417b.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1b/1b2bfc9560ab5ac178f9de4cb5e2f2a68ff2417b.svn-base new file mode 100644 index 000000000..cbd8525c7 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1b/1b2bfc9560ab5ac178f9de4cb5e2f2a68ff2417b.svn-base @@ -0,0 +1,527 @@ +// +// 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.2 + */ + +#include "exSID.h" +#include "exSID_defs.h" +#include "exSID_ftdiwrap.h" +#include +#include +#include + +#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; + +/** + * 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) +{ + ftdi_status = xSfw_read_data(ftdi, buff, size); +#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 +} + +/** + * Single byte output routine. + * 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 + */ +static void _xSoutb(uint8_t byte, int flush) +{ + static unsigned char bufchar[XS_BUFFSZ]; + static int i = 0; + + bufchar[i++] = (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 (!(i % (XS_RSBCLK/(XS_SIDCLK%XS_RSBCLK)))) + clkdrift--; +#endif + if (likely((i < XS_BUFFSZ) && !flush)) + return; + + _xSwrite(bufchar, i); + i = 0; +} + +/** + * 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; + + if (ftdi) { + xserror("Device already open!\n"); + return -1; + } + + if (xSfw_dlopen()) { + xserror("dl error\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 "exSIDUSB" is open + xsdbg("Device opened\n"); + + 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); + + 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, 0); // this will take more than XS_CYCCHR + _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 +} + +/** + * 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:
+ * Write looks like this in firmware: + * > ...|_/_|... + * ...end of data byte read | cycle during which write is enacted / next cycle | etc...
+ * 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...
+ * 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); +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1c5711ee7bac61bfd049bcb18f8b78fec22bdf40.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1c5711ee7bac61bfd049bcb18f8b78fec22bdf40.svn-base new file mode 100644 index 000000000..f795ea4d0 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1c5711ee7bac61bfd049bcb18f8b78fec22bdf40.svn-base @@ -0,0 +1,44 @@ + +ACLOCAL_AMFLAGS = -I m4 + +AUTOMAKE_OPTIONS = foreign subdir-objects + +if MINGW32 + W32_CPPFLAGS = -DWIN32_LEAN_AND_MEAN + W32_LDFLAGS = -no-undefined +endif + +AM_CPPFLAGS = \ +$(FTDI_CFLAGS) \ +${W32_CPPFLAGS} \ +@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 + +libexsid_la_HEADERS = \ +exSID.h + +libexsid_ladir = $(includedir) + +libexsid_la_LDFLAGS = -version-info $(LIBEXSIDVERSION) $(W32_LDFLAGS) + +#========================================================= + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libexsid.pc + +#========================================================= +# docs +if HAVE_DOXYGEN +doc: + $(DOXYGEN) Doxyfile + +clean-local: + rm -fr $(builddir)/docs/html +endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1ca4da6b79799e776829c461eb5a16164a1913cf.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1ca4da6b79799e776829c461eb5a16164a1913cf.svn-base new file mode 100644 index 000000000..06b24a5cb --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1ca4da6b79799e776829c461eb5a16164a1913cf.svn-base @@ -0,0 +1,275 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "SincResampler.h" + +#include +#include +#include +#include +#include +#include + +#include "siddefs-fp.h" + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef HAVE_MMINTRIN_H +# include +#endif + +namespace reSIDfp +{ + +typedef std::map fir_cache_t; + +/// Cache for the expensive FIR table computation results. +fir_cache_t FIR_CACHE; + +/// Maximum error acceptable in I0 is 1e-6, or ~96 dB. +const double I0E = 1e-6; + +const int BITS = 16; + +/** + * Compute the 0th order modified Bessel function of the first kind. + * This function is originally from resample-1.5/filterkit.c by J. O. Smith. + * It is used to build the Kaiser window for resampling. + * + * @param x evaluate I0 at x + * @return value of I0 at x. + */ +double I0(double x) +{ + double sum = 1.; + double u = 1.; + double n = 1.; + const double halfx = x / 2.; + + do + { + const double temp = halfx / n; + u *= temp * temp; + sum += u; + n += 1.; + } + while (u >= I0E * sum); + + return sum; +} + +/** + * Calculate convolution with sample and sinc. + * + * @param a sample buffer input + * @param b sinc buffer + * @param bLength length of the sinc buffer + * @return convolved result + */ +int convolve(const short* a, const short* b, int bLength) +{ +#ifdef HAVE_MMINTRIN_H + __m64 acc = _mm_setzero_si64(); + + const int n = bLength / 4; + + for (int i = 0; i < n; i++) + { + const __m64 tmp = _mm_madd_pi16(*(__m64*)a, *(__m64*)b); + acc = _mm_add_pi16(acc, tmp); + a += 4; + b += 4; + } + + int out = _mm_cvtsi64_si32(acc) + _mm_cvtsi64_si32(_mm_srli_si64(acc, 32)); + _mm_empty(); + + bLength &= 3; +#else + int out = 0; +#endif + + for (int i = 0; i < bLength; i++) + { + out += *a++ * *b++; + } + + return (out + (1 << 14)) >> 15; +} + +int SincResampler::fir(int subcycle) +{ + // Find the first of the nearest fir tables close to the phase + int firTableFirst = (subcycle * firRES >> 10); + const int firTableOffset = (subcycle * firRES) & 0x3ff; + + // Find firN most recent samples, plus one extra in case the FIR wraps. + int sampleStart = sampleIndex - firN + RINGSIZE - 1; + + const int v1 = convolve(sample + sampleStart, (*firTable)[firTableFirst], firN); + + // Use next FIR table, wrap around to first FIR table using + // previous sample. + if (unlikely(++firTableFirst == firRES)) + { + firTableFirst = 0; + ++sampleStart; + } + + const int v2 = convolve(sample + sampleStart, (*firTable)[firTableFirst], firN); + + // Linear interpolation between the sinc tables yields good + // approximation for the exact value. + return v1 + (firTableOffset * (v2 - v1) >> 10); +} + +SincResampler::SincResampler(double clockFrequency, double samplingFrequency, double highestAccurateFrequency) : + sampleIndex(0), + cyclesPerSample(static_cast(clockFrequency / samplingFrequency * 1024.)), + sampleOffset(0), + outputValue(0) +{ + // 16 bits -> -96dB stopband attenuation. + const double A = -20. * log10(1.0 / (1 << BITS)); + // A fraction of the bandwidth is allocated to the transition band, which we double + // because we design the filter to transition halfway at nyquist. + const double dw = (1. - 2.*highestAccurateFrequency / samplingFrequency) * M_PI * 2.; + + // For calculation of beta and N see the reference for the kaiserord + // function in the MATLAB Signal Processing Toolbox: + // http://www.mathworks.com/help/signal/ref/kaiserord.html + const double beta = 0.1102 * (A - 8.7); + const double I0beta = I0(beta); + const double cyclesPerSampleD = clockFrequency / samplingFrequency; + + { + // The filter order will maximally be 124 with the current constraints. + // N >= (96.33 - 7.95)/(2 * pi * 2.285 * (maxfreq - passbandfreq) >= 123 + // The filter order is equal to the number of zero crossings, i.e. + // it should be an even number (sinc is symmetric with respect to x = 0). + int N = static_cast((A - 7.95) / (2.285 * dw) + 0.5); + N += N & 1; + + // The filter length is equal to the filter order + 1. + // The filter length must be an odd number (sinc is symmetric with respect to + // x = 0). + firN = static_cast(N * cyclesPerSampleD) + 1; + firN |= 1; + + // Check whether the sample ring buffer would overflow. + assert(firN < RINGSIZE); + + // Error is bounded by err < 1.234 / L^2, so L = sqrt(1.234 / (2^-16)) = sqrt(1.234 * 2^16). + firRES = static_cast(ceil(sqrt(1.234 * (1 << BITS)) / cyclesPerSampleD)); + + // firN*firRES represent the total resolution of the sinc sampling. JOS + // recommends a length of 2^BITS, but we don't quite use that good a filter. + // The filter test program indicates that the filter performs well, though. + } + + // Create the map key + std::ostringstream o; + o << firN << "," << firRES << "," << cyclesPerSampleD; + const std::string firKey = o.str(); + fir_cache_t::iterator lb = FIR_CACHE.lower_bound(firKey); + + // The FIR computation is expensive and we set sampling parameters often, but + // from a very small set of choices. Thus, caching is used to speed initialization. + if (lb != FIR_CACHE.end() && !(FIR_CACHE.key_comp()(firKey, lb->first))) + { + firTable = &(lb->second); + } + else + { + // Allocate memory for FIR tables. + matrix_t tempTable(firRES, firN); + firTable = &(FIR_CACHE.insert(lb, fir_cache_t::value_type(firKey, tempTable))->second); + + // The cutoff frequency is midway through the transition band, in effect the same as nyquist. + const double wc = M_PI; + + // Calculate the sinc tables. + const double scale = 32768.0 * wc / cyclesPerSampleD / M_PI; + + for (int i = 0; i < firRES; i++) + { + const double jPhase = (double) i / firRES + firN / 2; + + for (int j = 0; j < firN; j++) + { + const double x = j - jPhase; + + const double xt = x / (firN / 2); + const double kaiserXt = fabs(xt) < 1. ? I0(beta * sqrt(1. - xt * xt)) / I0beta : 0.; + + const double wt = wc * x / cyclesPerSampleD; + const double sincWt = fabs(wt) >= 1e-8 ? sin(wt) / wt : 1.; + + (*firTable)[i][j] = static_cast(scale * sincWt * kaiserXt); + } + } + } +} + +template +inline O clip(I input) +{ + if (input < std::numeric_limits::min()) input = std::numeric_limits::min(); + if (input > std::numeric_limits::max()) input = std::numeric_limits::max(); + return static_cast(input); +} + +bool SincResampler::input(int input) +{ + bool ready = false; + + /* + * Clip the input as it may overflow the 16 bit range. + * + * Approximate measured input ranges: + * 6581: ]-20000,+20000[ + * 8580: ]-33000,+33000[ + */ + sample[sampleIndex] = sample[sampleIndex + RINGSIZE] = clip(input); + sampleIndex = (sampleIndex + 1) & (RINGSIZE - 1); + + if (sampleOffset < 1024) + { + outputValue = fir(sampleOffset); + ready = true; + sampleOffset += cyclesPerSample; + } + + sampleOffset -= 1024; + + return ready; +} + +void SincResampler::reset() +{ + memset(sample, 0, sizeof(sample)); + sampleOffset = 0; +} + +} // namespace reSIDfp diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1cd0f82433e14815a8b9baec415df4c33f128475.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1cd0f82433e14815a8b9baec415df4c33f128475.svn-base new file mode 100644 index 000000000..654ddb10f --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1cd0f82433e14815a8b9baec415df4c33f128475.svn-base @@ -0,0 +1,102 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef VOICE_H +#define VOICE_H + +#include + +#include "siddefs-fp.h" +#include "WaveformGenerator.h" +#include "EnvelopeGenerator.h" + +#include "sidcxx11.h" + +namespace reSIDfp +{ + +/** + * Representation of SID voice block. + */ +class Voice +{ +private: + std::unique_ptr const waveformGenerator; + + std::unique_ptr const envelopeGenerator; + +public: + /** + * Amplitude modulated waveform output. + * + * The waveform DAC generates a voltage between 5 and 12 V corresponding + * to oscillator state 0 .. 4095. + * + * The envelope DAC generates a voltage between waveform gen output and + * the 5V level, corresponding to envelope state 0 .. 255. + * + * Ideal range [-2048*255, 2047*255]. + * + * @param ringModulator Ring-modulator for waveform + * @return waveformgenerator output + */ + RESID_INLINE + int output(const WaveformGenerator* ringModulator) const + { + return static_cast(waveformGenerator->output(ringModulator) * envelopeGenerator->output()); + } + + /** + * Constructor. + */ + Voice() : + waveformGenerator(new WaveformGenerator()), + envelopeGenerator(new EnvelopeGenerator()) {} + + WaveformGenerator* wave() const { return waveformGenerator.get(); } + + EnvelopeGenerator* envelope() const { return envelopeGenerator.get(); } + + /** + * Write control register. + * + * @param control Control register value. + */ + void writeCONTROL_REG(unsigned char control) + { + waveformGenerator->writeCONTROL_REG(control); + envelopeGenerator->writeCONTROL_REG(control); + } + + /** + * SID reset. + */ + void reset() + { + waveformGenerator->reset(); + envelopeGenerator->reset(); + } +}; + +} // namespace reSIDfp + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1cd907a4f2396b13a80684b01d63cc2649192d65.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1cd907a4f2396b13a80684b01d63cc2649192d65.svn-base new file mode 100644 index 000000000..07763a5f8 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1c/1cd907a4f2396b13a80684b01d63cc2649192d65.svn-base @@ -0,0 +1,407 @@ + 0x01, 0x00, 0x6f, 0x36, 0x35, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x91, 0x0c, 0x00, 0x04, 0x00, 0x00, + 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x61, 0xe1, 0x60, 0x01, + 0x02, 0x04, 0x00, 0x07, 0x0e, 0x02, 0x02, 0xfe, + 0x02, 0x02, 0xfe, 0xfe, 0x00, 0x01, 0x00, 0xff, + 0x00, 0x02, 0x04, 0x05, 0x07, 0x09, 0x0b, 0x1e, + 0x18, 0x8b, 0x7e, 0xfa, 0x06, 0xac, 0xf3, 0xe6, + 0x8f, 0xf8, 0x2e, 0x86, 0x8e, 0x96, 0x9f, 0xa8, + 0xb3, 0xbd, 0xc8, 0xd4, 0xe1, 0xee, 0xfd, 0x8c, + 0x78, 0x64, 0x50, 0x3c, 0x28, 0x14, 0x00, 0x00, + 0x02, 0x03, 0x05, 0x07, 0x08, 0x0a, 0x0c, 0x0d, + 0x0f, 0x11, 0x12, 0x00, 0xe0, 0x00, 0x05, 0x0a, + 0x0f, 0xf9, 0x00, 0xf5, 0x00, 0x00, 0x00, 0x10, + 0x00, 0x00, 0x20, 0x00, 0x00, 0x30, 0x00, 0x00, + 0x40, 0x00, 0x00, 0x50, 0x00, 0x00, 0x60, 0x00, + 0x00, 0x70, 0x00, 0x00, 0x80, 0x00, 0x00, 0x90, + 0x00, 0x00, 0xa0, 0x00, 0xa9, 0x00, 0x8d, 0x00, + 0xe0, 0xa2, 0x95, 0xa0, 0x42, 0xad, 0xa6, 0x02, + 0xf0, 0x04, 0xa2, 0x25, 0xa0, 0x40, 0x8e, 0x5b, + 0xe1, 0x8c, 0x5c, 0xe1, 0xea, 0xea, 0xea, 0xea, + 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, + 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, + 0xea, 0xea, 0xea, 0xea, 0x60, 0xa9, 0x00, 0x8d, + 0x00, 0xe0, 0x86, 0x61, 0x84, 0x62, 0xa0, 0xbc, + 0x99, 0x00, 0xe0, 0x88, 0xd0, 0xfa, 0xa0, 0x72, + 0x99, 0xbc, 0xe0, 0x88, 0xd0, 0xfa, 0x8d, 0x15, + 0xd4, 0x8d, 0x16, 0xd4, 0xa9, 0x08, 0x8d, 0x25, + 0xe0, 0x8d, 0x17, 0xd4, 0x8d, 0x26, 0xe0, 0x8d, + 0x18, 0xd4, 0xa9, 0x90, 0x8d, 0x27, 0xe0, 0xa9, + 0x60, 0x8d, 0x28, 0xe0, 0xa9, 0x0c, 0x8d, 0x29, + 0xe0, 0xad, 0x5b, 0xe1, 0x8d, 0x2d, 0xe0, 0xad, + 0x5c, 0xe1, 0x8d, 0x2e, 0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0x8d, + 0x0f, 0xd4, 0xa9, 0x08, 0x8d, 0x17, 0xd4, 0xad, + 0x5b, 0xe1, 0x8d, 0x04, 0xdc, 0xad, 0x5c, 0xe1, + 0x8d, 0x05, 0xdc, 0x60, 0xea, 0xea, 0xea, 0xea, + 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, 0xea, + 0xea, 0xea, 0x60, 0xa9, 0x08, 0x8d, 0x00, 0xe0, + 0x6c, 0x5d, 0xe1, 0xea, 0xea, 0xea, 0xad, 0x00, + 0xe0, 0x30, 0xf0, 0x09, 0x80, 0xa8, 0x29, 0x07, + 0xf0, 0xee, 0xd8, 0x8c, 0x00, 0xe0, 0xea, 0xa5, + 0xfb, 0x8d, 0x56, 0xe1, 0xa5, 0xfc, 0x8d, 0x57, + 0xe1, 0xa5, 0xfd, 0x8d, 0x58, 0xe1, 0xa5, 0xfe, + 0x8d, 0x59, 0xe1, 0xa5, 0xff, 0x8d, 0x5a, 0xe1, + 0xad, 0x23, 0xe0, 0x18, 0x6d, 0xd9, 0xe0, 0x48, + 0x29, 0x07, 0xa8, 0xad, 0xdc, 0xe0, 0x69, 0x00, + 0x85, 0xff, 0x68, 0x46, 0xff, 0x6a, 0x46, 0xff, + 0x6a, 0x46, 0xff, 0x6a, 0x18, 0x6d, 0x24, 0xe0, + 0x8c, 0x15, 0xd4, 0x8d, 0x16, 0xd4, 0xad, 0x25, + 0xe0, 0x8d, 0x17, 0xd4, 0xad, 0x26, 0xe0, 0x8d, + 0x18, 0xd4, 0xa9, 0xd4, 0x85, 0xfc, 0xa2, 0x00, + 0xad, 0x00, 0xe0, 0x3d, 0x62, 0xe1, 0xf0, 0x51, + 0xbd, 0x65, 0xe1, 0x85, 0xfb, 0xbd, 0x0e, 0xe0, + 0x18, 0x7d, 0x51, 0xe0, 0xa8, 0xbd, 0x11, 0xe0, + 0x7d, 0x54, 0xe0, 0x48, 0x98, 0x18, 0x7d, 0xcd, + 0xe0, 0xa0, 0x00, 0x91, 0x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0, 0xbd, 0x05, 0xe0, 0x4a, + 0x4a, 0x29, 0x07, 0xd0, 0x30, 0xbd, 0x05, 0xe0, + 0x30, 0x14, 0xad, 0x27, 0xe0, 0x29, 0x3c, 0xd0, + 0x1e, 0xad, 0x27, 0xe0, 0x0a, 0x2a, 0x2a, 0xd0, + 0x02, 0xa9, 0x04, 0x4c, 0x70, 0xe8, 0xad, 0x28, + 0xe0, 0xf0, 0x0c, 0x29, 0x3f, 0xd0, 0x08, 0xad, + 0x28, 0xe0, 0x0a, 0x2a, 0x2a, 0xd0, 0x66, 0xa9, + 0x10, 0x8d, 0x00, 0xe0, 0x60, 0xc9, 0x01, 0xd0, + 0x13, 0xbd, 0x05, 0xe0, 0x29, 0x20, 0xd0, 0x06, + 0xad, 0x29, 0xe0, 0x4c, 0x70, 0xe8, 0xbd, 0x2a, + 0xe0, 0x4c, 0x70, 0xe8, 0xa8, 0xbd, 0x05, 0xe0, + 0x29, 0xa0, 0xc9, 0x80, 0xf0, 0x30, 0x85, 0xff, + 0x18, 0xad, 0x27, 0xe0, 0xd0, 0x01, 0x38, 0x88, + 0x88, 0xf0, 0x06, 0x6a, 0xb0, 0x4e, 0x88, 0xd0, + 0xfa, 0xa4, 0xff, 0x85, 0xff, 0xf0, 0x26, 0x46, + 0xff, 0xb0, 0x41, 0xf0, 0x42, 0x65, 0xff, 0xb0, + 0x3e, 0xc8, 0x10, 0x19, 0x46, 0xff, 0xb0, 0x34, + 0x65, 0xff, 0x90, 0x11, 0xb0, 0x31, 0xad, 0x28, + 0xe0, 0xf0, 0x29, 0x88, 0x88, 0xf0, 0x06, 0x4a, + 0xb0, 0x22, 0x88, 0xd0, 0xfa, 0x9d, 0x30, 0xe0, + 0xbd, 0x1a, 0xe0, 0x29, 0xf6, 0x9d, 0x1a, 0xe0, + 0x38, 0xbd, 0x02, 0xe0, 0x29, 0x07, 0xd0, 0x03, + 0x7e, 0x36, 0xe0, 0xbd, 0x1a, 0xe0, 0x69, 0x00, + 0x9d, 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xdd, 0xae, 0xe0, 0xd0, 0x0b, + 0xbd, 0xb1, 0xe0, 0x85, 0xfd, 0xbd, 0xb4, 0xe0, + 0x85, 0xfe, 0x60, 0xa9, 0x38, 0x8d, 0x00, 0xe0, + 0x60, 0xbd, 0xba, 0xe0, 0xdd, 0xa8, 0xe1, 0xf0, + 0x18, 0xde, 0xba, 0xe0, 0xa8, 0x88, 0xb9, 0xf0, + 0xe0, 0xf0, 0x0d, 0x85, 0xfe, 0xb9, 0xe1, 0xe0, + 0x85, 0xfd, 0xb9, 0x2f, 0xe1, 0x9d, 0x33, 0xe0, + 0x60, 0xa9, 0x20, 0x8d, 0x00, 0xe0, 0x60, 0xad, + 0x00, 0xe0, 0x5d, 0x62, 0xe1, 0x8d, 0x00, 0xe0, + 0xa9, 0x01, 0x9d, 0x30, 0xe0, 0x60, 0xad, 0x00, + 0xe0, 0x29, 0x07, 0x8d, 0x81, 0xec, 0xd0, 0x03, + 0x20, 0xe9, 0xe2, 0x60, 0x00, 0xa2, 0x51, 0xa0, + 0xec, 0x8e, 0x5d, 0xe1, 0x8c, 0x5e, 0xe1, 0x20, + 0xcf, 0xe1, 0xa2, 0x00, 0xa0, 0x09, 0x20, 0x00, + 0xe2, 0xa9, 0x07, 0x8d, 0x00, 0xe0, 0x8d, 0x81, + 0xec, 0x60, 0x00, 0x00, 0x00, 0xa9, 0x00, 0x29, + 0xff, 0xf0, 0xf6, 0x4c, 0x29, 0xe3, 0xa9, 0x07, + 0x8d, 0x00, 0xe0, 0x60, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1e3b2894f2648a6d03324784c865c0e4c107d67e.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1e3b2894f2648a6d03324784c865c0e4c107d67e.svn-base new file mode 100644 index 000000000..741b3e1c7 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1e3b2894f2648a6d03324784c865c0e4c107d67e.svn-base @@ -0,0 +1,1576 @@ +// --------------------------------------------------------------------------- +// This file is part of reSID, a MOS6581 SID emulator engine. +// Copyright (C) 2010 Dag Lem +// +// 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 2 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, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// --------------------------------------------------------------------------- + +#ifndef RESID_FILTER_H +#define RESID_FILTER_H + +#include "resid-config.h" + +namespace reSID +{ + +// ---------------------------------------------------------------------------- +// The SID filter is modeled with a two-integrator-loop biquadratic filter, +// which has been confirmed by Bob Yannes to be the actual circuit used in +// the SID chip. +// +// Measurements show that excellent emulation of the SID filter is achieved, +// except when high resonance is combined with high sustain levels. +// In this case the SID op-amps are performing less than ideally and are +// causing some peculiar behavior of the SID filter. This however seems to +// have more effect on the overall amplitude than on the color of the sound. +// +// The theory for the filter circuit can be found in "Microelectric Circuits" +// by Adel S. Sedra and Kenneth C. Smith. +// The circuit is modeled based on the explanation found there except that +// an additional inverter is used in the feedback from the bandpass output, +// allowing the summer op-amp to operate in single-ended mode. This yields +// filter outputs with levels independent of Q, which corresponds with the +// results obtained from a real SID. +// +// We have been able to model the summer and the two integrators of the circuit +// to form components of an IIR filter. +// Vhp is the output of the summer, Vbp is the output of the first integrator, +// and Vlp is the output of the second integrator in the filter circuit. +// +// According to Bob Yannes, the active stages of the SID filter are not really +// op-amps. Rather, simple NMOS inverters are used. By biasing an inverter +// into its region of quasi-linear operation using a feedback resistor from +// input to output, a MOS inverter can be made to act like an op-amp for +// small signals centered around the switching threshold. +// +// In 2008, Michael Huth facilitated closer investigation of the SID 6581 +// filter circuit by publishing high quality microscope photographs of the die. +// Tommi Lempinen has done an impressive work on re-vectorizing and annotating +// the die photographs, substantially simplifying further analysis of the +// filter circuit. +// +// The filter schematics below are reverse engineered from these re-vectorized +// and annotated die photographs. While the filter first depicted in reSID 0.9 +// is a correct model of the basic filter, the schematics are now completed +// with the audio mixer and output stage, including details on intended +// relative resistor values. Also included are schematics for the NMOS FET +// voltage controlled resistors (VCRs) used to control cutoff frequency, the +// DAC which controls the VCRs, the NMOS op-amps, and the output buffer. +// +// +// SID filter / mixer / output +// --------------------------- +// +// --------------------------------------------------- +// | | +// | --1R1-- \-- D7 | +// | ---R1-- | | | +// | | | |--2R1-- \--| D6 | +// | --------------|--Rw-----[A>--|--Rw-----[A>--| +// ve (EXT IN) | | | | +// D3 \ ---------------R8--| | | (CAP2A) | (CAP1A) +// | v3 | | vhp | vbp | vlp +// D2 | \ -----------R8--| ----- | | +// | | v2 | | | | +// D1 | | \ -------R8--| | ---------------- | +// | | | v1 | | | | +// D0 | | | \ ---R8-- | | --------------------------- +// | | | | | | | +// R6 R6 R6 R6 R6 R6 R6 +// | | | | $18 | | | $18 +// | \ | | D7: 1=open \ \ \ D6 - D4: 0=open +// | | | | | | | +// --------------------------------- 12V +// | +// | D3 --/ --1R2-- | +// | ---R8-- | | ---R2-- | +// | | | D2 |--/ --2R2--| | | ||-- +// ------[A>---------| |-----[A>-----|| +// D1 |--/ --4R2--| (4.25R2) ||-- +// $18 | | | +// 0=open D0 --/ --8R2-- (8.75R2) | +// +// vo (AUDIO +// OUT) +// +// +// v1 - voice 1 +// v2 - voice 2 +// v3 - voice 3 +// ve - ext in +// vhp - highpass output +// vbp - bandpass output +// vlp - lowpass output +// vo - audio out +// [A> - single ended inverting op-amp (self-biased NMOS inverter) +// Rn - "resistors", implemented with custom NMOS FETs +// Rw - cutoff frequency resistor (VCR) +// C - capacitor +// +// Notes: +// +// R2 ~ 2.0*R1 +// R6 ~ 6.0*R1 +// R8 ~ 8.0*R1 +// R24 ~ 24.0*R1 +// +// The Rn "resistors" in the circuit are implemented with custom NMOS FETs, +// probably because of space constraints on the SID die. The silicon substrate +// is laid out in a narrow strip or "snake", with a strip length proportional +// to the intended resistance. The polysilicon gate electrode covers the entire +// silicon substrate and is fixed at 12V in order for the NMOS FET to operate +// in triode mode (a.k.a. linear mode or ohmic mode). +// +// Even in "linear mode", an NMOS FET is only an approximation of a resistor, +// as the apparant resistance increases with increasing drain-to-source +// voltage. If the drain-to-source voltage should approach the gate voltage +// of 12V, the NMOS FET will enter saturation mode (a.k.a. active mode), and +// the NMOS FET will not operate anywhere like a resistor. +// +// +// +// NMOS FET voltage controlled resistor (VCR) +// ------------------------------------------ +// +// Vw +// +// | +// | +// R1 +// | +// --R1--| +// | __|__ +// | ----- +// | | | +// vi ---------- -------- vo +// | | +// ----R24---- +// +// +// vi - input +// vo - output +// Rn - "resistors", implemented with custom NMOS FETs +// Vw - voltage from 11-bit DAC (frequency cutoff control) +// +// Notes: +// +// An approximate value for R24 can be found by using the formula for the +// filter cutoff frequency: +// +// FCmin = 1/(2*pi*Rmax*C) +// +// Assuming that a the setting for minimum cutoff frequency in combination with +// a low level input signal ensures that only negligible current will flow +// through the transistor in the schematics above, values for FCmin and C can +// be substituted in this formula to find Rmax. +// Using C = 470pF and FCmin = 220Hz (measured value), we get: +// +// FCmin = 1/(2*pi*Rmax*C) +// Rmax = 1/(2*pi*FCmin*C) = 1/(2*pi*220*470e-12) ~ 1.5MOhm +// +// From this it follows that: +// R24 = Rmax ~ 1.5MOhm +// R1 ~ R24/24 ~ 64kOhm +// R2 ~ 2.0*R1 ~ 128kOhm +// R6 ~ 6.0*R1 ~ 384kOhm +// R8 ~ 8.0*R1 ~ 512kOhm +// +// Note that these are only approximate values for one particular SID chip, +// due to process variations the values can be substantially different in +// other chips. +// +// +// +// Filter frequency cutoff DAC +// --------------------------- +// +// +// 12V 10 9 8 7 6 5 4 3 2 1 0 VGND +// | | | | | | | | | | | | | Missing +// 2R 2R 2R 2R 2R 2R 2R 2R 2R 2R 2R 2R 2R termination +// | | | | | | | | | | | | | +// Vw ----R---R---R---R---R---R---R---R---R---R---R-- --- +// +// Bit on: 12V +// Bit off: 5V (VGND) +// +// As is the case with all MOS 6581 DACs, the termination to (virtual) ground +// at bit 0 is missing. +// +// Furthermore, the control of the two VCRs imposes a load on the DAC output +// which varies with the input signals to the VCRs. This can be seen from the +// VCR figure above. +// +// +// +// "Op-amp" (self-biased NMOS inverter) +// ------------------------------------ +// +// +// 12V +// +// | +// -----------| +// | | +// | ------| +// | | | +// | | ||-- +// | --|| +// | ||-- +// ||-- | +// vi -----|| |--------- vo +// ||-- | | +// | ||-- | +// |-------|| | +// | ||-- | +// ||-- | | +// --|| | | +// | ||-- | | +// | | | | +// | -----------| | +// | | | +// | | +// | GND | +// | | +// ---------------------- +// +// +// vi - input +// vo - output +// +// Notes: +// +// The schematics above are laid out to show that the "op-amp" logically +// consists of two building blocks; a saturated load NMOS inverter (on the +// right hand side of the schematics) with a buffer / bias input stage +// consisting of a variable saturated load NMOS inverter (on the left hand +// side of the schematics). +// +// Provided a reasonably high input impedance and a reasonably low output +// impedance, the "op-amp" can be modeled as a voltage transfer function +// mapping input voltage to output voltage. +// +// +// +// Output buffer (NMOS voltage follower) +// ------------------------------------- +// +// +// 12V +// +// | +// | +// ||-- +// vi -----|| +// ||-- +// | +// |------ vo +// | (AUDIO +// Rext OUT) +// | +// | +// +// GND +// +// vi - input +// vo - output +// Rext - external resistor, 1kOhm +// +// Notes: +// +// The external resistor Rext is needed to complete the NMOS voltage follower, +// this resistor has a recommended value of 1kOhm. +// +// Die photographs show that actually, two NMOS transistors are used in the +// voltage follower. However the two transistors are coupled in parallel (all +// terminals are pairwise common), which implies that we can model the two +// transistors as one. +// +// ---------------------------------------------------------------------------- + +// Compile-time computation of op-amp summer and mixer table offsets. + +// The highpass summer has 2 - 6 inputs (bandpass, lowpass, and 0 - 4 voices). +template +struct summer_offset +{ + enum { value = summer_offset::value + ((2 + i - 1) << 16) }; +}; + +template<> +struct summer_offset<0> +{ + enum { value = 0 }; +}; + +// The mixer has 0 - 7 inputs (0 - 4 voices and 0 - 3 filter outputs). +template +struct mixer_offset +{ + enum { value = mixer_offset::value + ((i - 1) << 16) }; +}; + +template<> +struct mixer_offset<1> +{ + enum { value = 1 }; +}; + +template<> +struct mixer_offset<0> +{ + enum { value = 0 }; +}; + + +class Filter +{ +public: + Filter(); + + void enable_filter(bool enable); + void adjust_filter_bias(double dac_bias); + void set_chip_model(chip_model model); + void set_voice_mask(reg4 mask); + + void clock(int voice1, int voice2, int voice3); + void clock(cycle_count delta_t, int voice1, int voice2, int voice3); + void reset(); + + // Write registers. + void writeFC_LO(reg8); + void writeFC_HI(reg8); + void writeRES_FILT(reg8); + void writeMODE_VOL(reg8); + + // SID audio input (16 bits). + void input(short sample); + + // SID audio output (16 bits). + short output(); + +protected: + void set_sum_mix(); + void set_w0(); + void set_Q(); + + // Filter enabled. + bool enabled; + + // Filter cutoff frequency. + reg12 fc; + + // Filter resonance. + reg8 res; + + // Selects which voices to route through the filter. + reg8 filt; + + // Selects which filter outputs to route into the mixer. + reg4 mode; + + // Output master volume. + reg4 vol; + + // Used to mask out EXT IN if not connected, and for test purposes + // (voice muting). + reg8 voice_mask; + + // Select which inputs to route into the summer / mixer. + // These are derived from filt, mode, and voice_mask. + reg8 sum; + reg8 mix; + + // State of filter. + int Vhp; // highpass + int Vbp; // bandpass + int Vbp_x, Vbp_vc; + int Vlp; // lowpass + int Vlp_x, Vlp_vc; + // Filter / mixer inputs. + int ve; + int v3; + int v2; + int v1; + + // Cutoff frequency DAC voltage, resonance. + int Vddt_Vw_2, Vw_bias; + int _8_div_Q; + // FIXME: Temporarily used for MOS 8580 emulation. + int w0; + int _1024_div_Q; + + chip_model sid_model; + + typedef struct { + int vo_N16; // Fixed point scaling for 16 bit op-amp output. + int kVddt; // K*(Vdd - Vth) + int n_snake; + int voice_scale_s14; + int voice_DC; + int ak; + int bk; + int vc_min; + int vc_max; + + // Reverse op-amp transfer function. + unsigned short opamp_rev[1 << 16]; + // Lookup tables for gain and summer op-amps in output stage / filter. + unsigned short summer[summer_offset<5>::value]; + unsigned short gain[16][1 << 16]; + unsigned short mixer[mixer_offset<8>::value]; + // Cutoff frequency DAC output voltage table. FC is an 11 bit register. + unsigned short f0_dac[1 << 11]; + } model_filter_t; + + int solve_gain(int* opamp, int n, int vi_t, int& x, model_filter_t& mf); + int solve_integrate_6581(int dt, int vi_t, int& x, int& vc, model_filter_t& mf); + + // VCR - 6581 only. + static unsigned short vcr_kVg[1 << 16]; + static unsigned short vcr_n_Ids_term[1 << 16]; + // Common parameters. + static model_filter_t model_filter[2]; + +friend class SID; +}; + + +// ---------------------------------------------------------------------------- +// Inline functions. +// The following functions are defined inline because they are called every +// time a sample is calculated. +// ---------------------------------------------------------------------------- + +#if RESID_INLINING || defined(RESID_FILTER_CC) + +// ---------------------------------------------------------------------------- +// SID clocking - 1 cycle. +// ---------------------------------------------------------------------------- +RESID_INLINE +void Filter::clock(int voice1, int voice2, int voice3) +{ + model_filter_t& f = model_filter[sid_model]; + + v1 = (voice1*f.voice_scale_s14 >> 18) + f.voice_DC; + v2 = (voice2*f.voice_scale_s14 >> 18) + f.voice_DC; + v3 = (voice3*f.voice_scale_s14 >> 18) + f.voice_DC; + + // Sum inputs routed into the filter. + int Vi = 0; + int offset = 0; + + switch (sum & 0xf) { + case 0x0: + Vi = 0; + offset = summer_offset<0>::value; + break; + case 0x1: + Vi = v1; + offset = summer_offset<1>::value; + break; + case 0x2: + Vi = v2; + offset = summer_offset<1>::value; + break; + case 0x3: + Vi = v2 + v1; + offset = summer_offset<2>::value; + break; + case 0x4: + Vi = v3; + offset = summer_offset<1>::value; + break; + case 0x5: + Vi = v3 + v1; + offset = summer_offset<2>::value; + break; + case 0x6: + Vi = v3 + v2; + offset = summer_offset<2>::value; + break; + case 0x7: + Vi = v3 + v2 + v1; + offset = summer_offset<3>::value; + break; + case 0x8: + Vi = ve; + offset = summer_offset<1>::value; + break; + case 0x9: + Vi = ve + v1; + offset = summer_offset<2>::value; + break; + case 0xa: + Vi = ve + v2; + offset = summer_offset<2>::value; + break; + case 0xb: + Vi = ve + v2 + v1; + offset = summer_offset<3>::value; + break; + case 0xc: + Vi = ve + v3; + offset = summer_offset<2>::value; + break; + case 0xd: + Vi = ve + v3 + v1; + offset = summer_offset<3>::value; + break; + case 0xe: + Vi = ve + v3 + v2; + offset = summer_offset<3>::value; + break; + case 0xf: + Vi = ve + v3 + v2 + v1; + offset = summer_offset<4>::value; + break; + } + + // Calculate filter outputs. + if (sid_model == 0) { + // MOS 6581. + Vlp = solve_integrate_6581(1, Vbp, Vlp_x, Vlp_vc, f); + Vbp = solve_integrate_6581(1, Vhp, Vbp_x, Vbp_vc, f); + Vhp = f.summer[offset + f.gain[_8_div_Q][Vbp] + Vlp + Vi]; + } + else { + // MOS 8580. FIXME: Not yet using op-amp model. + + // delta_t = 1 is converted to seconds given a 1MHz clock by dividing + // with 1 000 000. + + int dVbp = w0*(Vhp >> 4) >> 16; + int dVlp = w0*(Vbp >> 4) >> 16; + Vbp -= dVbp; + Vlp -= dVlp; + Vhp = (Vbp*_1024_div_Q >> 10) - Vlp - Vi; + } +} + +// ---------------------------------------------------------------------------- +// SID clocking - delta_t cycles. +// ---------------------------------------------------------------------------- +RESID_INLINE +void Filter::clock(cycle_count delta_t, int voice1, int voice2, int voice3) +{ + model_filter_t& f = model_filter[sid_model]; + + v1 = (voice1*f.voice_scale_s14 >> 18) + f.voice_DC; + v2 = (voice2*f.voice_scale_s14 >> 18) + f.voice_DC; + v3 = (voice3*f.voice_scale_s14 >> 18) + f.voice_DC; + + // Enable filter on/off. + // This is not really part of SID, but is useful for testing. + // On slow CPUs it may be necessary to bypass the filter to lower the CPU + // load. + if (unlikely(!enabled)) { + return; + } + + // Sum inputs routed into the filter. + int Vi = 0; + int offset = 0; + + switch (sum & 0xf) { + case 0x0: + Vi = 0; + offset = summer_offset<0>::value; + break; + case 0x1: + Vi = v1; + offset = summer_offset<1>::value; + break; + case 0x2: + Vi = v2; + offset = summer_offset<1>::value; + break; + case 0x3: + Vi = v2 + v1; + offset = summer_offset<2>::value; + break; + case 0x4: + Vi = v3; + offset = summer_offset<1>::value; + break; + case 0x5: + Vi = v3 + v1; + offset = summer_offset<2>::value; + break; + case 0x6: + Vi = v3 + v2; + offset = summer_offset<2>::value; + break; + case 0x7: + Vi = v3 + v2 + v1; + offset = summer_offset<3>::value; + break; + case 0x8: + Vi = ve; + offset = summer_offset<1>::value; + break; + case 0x9: + Vi = ve + v1; + offset = summer_offset<2>::value; + break; + case 0xa: + Vi = ve + v2; + offset = summer_offset<2>::value; + break; + case 0xb: + Vi = ve + v2 + v1; + offset = summer_offset<3>::value; + break; + case 0xc: + Vi = ve + v3; + offset = summer_offset<2>::value; + break; + case 0xd: + Vi = ve + v3 + v1; + offset = summer_offset<3>::value; + break; + case 0xe: + Vi = ve + v3 + v2; + offset = summer_offset<3>::value; + break; + case 0xf: + Vi = ve + v3 + v2 + v1; + offset = summer_offset<4>::value; + break; + } + + // Maximum delta cycles for filter fixpoint iteration to converge + // is approximately 3. + cycle_count delta_t_flt = 3; + + if (sid_model == 0) { + // MOS 6581. + while (delta_t) { + if (unlikely(delta_t < delta_t_flt)) { + delta_t_flt = delta_t; + } + + // Calculate filter outputs. + Vlp = solve_integrate_6581(delta_t_flt, Vbp, Vlp_x, Vlp_vc, f); + Vbp = solve_integrate_6581(delta_t_flt, Vhp, Vbp_x, Vbp_vc, f); + Vhp = f.summer[offset + f.gain[_8_div_Q][Vbp] + Vlp + Vi]; + + delta_t -= delta_t_flt; + } + } + else { + // MOS 8580. FIXME: Not yet using op-amp model. + while (delta_t) { + if (delta_t < delta_t_flt) { + delta_t_flt = delta_t; + } + + // delta_t is converted to seconds given a 1MHz clock by dividing + // with 1 000 000. This is done in two operations to avoid integer + // multiplication overflow. + + // Calculate filter outputs. + int w0_delta_t = w0*delta_t_flt >> 2; + + int dVbp = w0_delta_t*(Vhp >> 4) >> 14; + int dVlp = w0_delta_t*(Vbp >> 4) >> 14; + Vbp -= dVbp; + Vlp -= dVlp; + Vhp = (Vbp*_1024_div_Q >> 10) - Vlp - Vi; + + delta_t -= delta_t_flt; + } + } +} + + +// ---------------------------------------------------------------------------- +// SID audio input (16 bits). +// ---------------------------------------------------------------------------- +RESID_INLINE +void Filter::input(short sample) +{ + // Scale to three times the peak-to-peak for one voice and add the op-amp + // "zero" DC level. + // NB! Adding the op-amp "zero" DC level is a (wildly inaccurate) + // approximation of feeding the input through an AC coupling capacitor. + // This could be implemented as a separate filter circuit, however the + // primary use of the emulator is not to process external signals. + // The upside is that the MOS8580 "digi boost" works without a separate (DC) + // input interface. + // Note that the input is 16 bits, compared to the 20 bit voice output. + model_filter_t& f = model_filter[sid_model]; + ve = (sample*f.voice_scale_s14*3 >> 14) + f.mixer[0]; +} + + +// ---------------------------------------------------------------------------- +// SID audio output (16 bits). +// ---------------------------------------------------------------------------- +RESID_INLINE +short Filter::output() +{ + model_filter_t& f = model_filter[sid_model]; + + // Writing the switch below manually would be tedious and error-prone; + // it is rather generated by the following Perl program: + + /* +my @i = qw(v1 v2 v3 ve Vlp Vbp Vhp); +for my $mix (0..2**@i-1) { + print sprintf(" case 0x%02x:\n", $mix); + my @sum; + for (@i) { + unshift(@sum, $_) if $mix & 0x01; + $mix >>= 1; + } + my $sum = join(" + ", @sum) || "0"; + print " Vi = $sum;\n"; + print " offset = mixer_offset<" . @sum . ">::value;\n"; + print " break;\n"; +} + */ + + // Sum inputs routed into the mixer. + int Vi = 0; + int offset = 0; + + switch (mix & 0x7f) { + case 0x00: + Vi = 0; + offset = mixer_offset<0>::value; + break; + case 0x01: + Vi = v1; + offset = mixer_offset<1>::value; + break; + case 0x02: + Vi = v2; + offset = mixer_offset<1>::value; + break; + case 0x03: + Vi = v2 + v1; + offset = mixer_offset<2>::value; + break; + case 0x04: + Vi = v3; + offset = mixer_offset<1>::value; + break; + case 0x05: + Vi = v3 + v1; + offset = mixer_offset<2>::value; + break; + case 0x06: + Vi = v3 + v2; + offset = mixer_offset<2>::value; + break; + case 0x07: + Vi = v3 + v2 + v1; + offset = mixer_offset<3>::value; + break; + case 0x08: + Vi = ve; + offset = mixer_offset<1>::value; + break; + case 0x09: + Vi = ve + v1; + offset = mixer_offset<2>::value; + break; + case 0x0a: + Vi = ve + v2; + offset = mixer_offset<2>::value; + break; + case 0x0b: + Vi = ve + v2 + v1; + offset = mixer_offset<3>::value; + break; + case 0x0c: + Vi = ve + v3; + offset = mixer_offset<2>::value; + break; + case 0x0d: + Vi = ve + v3 + v1; + offset = mixer_offset<3>::value; + break; + case 0x0e: + Vi = ve + v3 + v2; + offset = mixer_offset<3>::value; + break; + case 0x0f: + Vi = ve + v3 + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x10: + Vi = Vlp; + offset = mixer_offset<1>::value; + break; + case 0x11: + Vi = Vlp + v1; + offset = mixer_offset<2>::value; + break; + case 0x12: + Vi = Vlp + v2; + offset = mixer_offset<2>::value; + break; + case 0x13: + Vi = Vlp + v2 + v1; + offset = mixer_offset<3>::value; + break; + case 0x14: + Vi = Vlp + v3; + offset = mixer_offset<2>::value; + break; + case 0x15: + Vi = Vlp + v3 + v1; + offset = mixer_offset<3>::value; + break; + case 0x16: + Vi = Vlp + v3 + v2; + offset = mixer_offset<3>::value; + break; + case 0x17: + Vi = Vlp + v3 + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x18: + Vi = Vlp + ve; + offset = mixer_offset<2>::value; + break; + case 0x19: + Vi = Vlp + ve + v1; + offset = mixer_offset<3>::value; + break; + case 0x1a: + Vi = Vlp + ve + v2; + offset = mixer_offset<3>::value; + break; + case 0x1b: + Vi = Vlp + ve + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x1c: + Vi = Vlp + ve + v3; + offset = mixer_offset<3>::value; + break; + case 0x1d: + Vi = Vlp + ve + v3 + v1; + offset = mixer_offset<4>::value; + break; + case 0x1e: + Vi = Vlp + ve + v3 + v2; + offset = mixer_offset<4>::value; + break; + case 0x1f: + Vi = Vlp + ve + v3 + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x20: + Vi = Vbp; + offset = mixer_offset<1>::value; + break; + case 0x21: + Vi = Vbp + v1; + offset = mixer_offset<2>::value; + break; + case 0x22: + Vi = Vbp + v2; + offset = mixer_offset<2>::value; + break; + case 0x23: + Vi = Vbp + v2 + v1; + offset = mixer_offset<3>::value; + break; + case 0x24: + Vi = Vbp + v3; + offset = mixer_offset<2>::value; + break; + case 0x25: + Vi = Vbp + v3 + v1; + offset = mixer_offset<3>::value; + break; + case 0x26: + Vi = Vbp + v3 + v2; + offset = mixer_offset<3>::value; + break; + case 0x27: + Vi = Vbp + v3 + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x28: + Vi = Vbp + ve; + offset = mixer_offset<2>::value; + break; + case 0x29: + Vi = Vbp + ve + v1; + offset = mixer_offset<3>::value; + break; + case 0x2a: + Vi = Vbp + ve + v2; + offset = mixer_offset<3>::value; + break; + case 0x2b: + Vi = Vbp + ve + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x2c: + Vi = Vbp + ve + v3; + offset = mixer_offset<3>::value; + break; + case 0x2d: + Vi = Vbp + ve + v3 + v1; + offset = mixer_offset<4>::value; + break; + case 0x2e: + Vi = Vbp + ve + v3 + v2; + offset = mixer_offset<4>::value; + break; + case 0x2f: + Vi = Vbp + ve + v3 + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x30: + Vi = Vbp + Vlp; + offset = mixer_offset<2>::value; + break; + case 0x31: + Vi = Vbp + Vlp + v1; + offset = mixer_offset<3>::value; + break; + case 0x32: + Vi = Vbp + Vlp + v2; + offset = mixer_offset<3>::value; + break; + case 0x33: + Vi = Vbp + Vlp + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x34: + Vi = Vbp + Vlp + v3; + offset = mixer_offset<3>::value; + break; + case 0x35: + Vi = Vbp + Vlp + v3 + v1; + offset = mixer_offset<4>::value; + break; + case 0x36: + Vi = Vbp + Vlp + v3 + v2; + offset = mixer_offset<4>::value; + break; + case 0x37: + Vi = Vbp + Vlp + v3 + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x38: + Vi = Vbp + Vlp + ve; + offset = mixer_offset<3>::value; + break; + case 0x39: + Vi = Vbp + Vlp + ve + v1; + offset = mixer_offset<4>::value; + break; + case 0x3a: + Vi = Vbp + Vlp + ve + v2; + offset = mixer_offset<4>::value; + break; + case 0x3b: + Vi = Vbp + Vlp + ve + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x3c: + Vi = Vbp + Vlp + ve + v3; + offset = mixer_offset<4>::value; + break; + case 0x3d: + Vi = Vbp + Vlp + ve + v3 + v1; + offset = mixer_offset<5>::value; + break; + case 0x3e: + Vi = Vbp + Vlp + ve + v3 + v2; + offset = mixer_offset<5>::value; + break; + case 0x3f: + Vi = Vbp + Vlp + ve + v3 + v2 + v1; + offset = mixer_offset<6>::value; + break; + case 0x40: + Vi = Vhp; + offset = mixer_offset<1>::value; + break; + case 0x41: + Vi = Vhp + v1; + offset = mixer_offset<2>::value; + break; + case 0x42: + Vi = Vhp + v2; + offset = mixer_offset<2>::value; + break; + case 0x43: + Vi = Vhp + v2 + v1; + offset = mixer_offset<3>::value; + break; + case 0x44: + Vi = Vhp + v3; + offset = mixer_offset<2>::value; + break; + case 0x45: + Vi = Vhp + v3 + v1; + offset = mixer_offset<3>::value; + break; + case 0x46: + Vi = Vhp + v3 + v2; + offset = mixer_offset<3>::value; + break; + case 0x47: + Vi = Vhp + v3 + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x48: + Vi = Vhp + ve; + offset = mixer_offset<2>::value; + break; + case 0x49: + Vi = Vhp + ve + v1; + offset = mixer_offset<3>::value; + break; + case 0x4a: + Vi = Vhp + ve + v2; + offset = mixer_offset<3>::value; + break; + case 0x4b: + Vi = Vhp + ve + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x4c: + Vi = Vhp + ve + v3; + offset = mixer_offset<3>::value; + break; + case 0x4d: + Vi = Vhp + ve + v3 + v1; + offset = mixer_offset<4>::value; + break; + case 0x4e: + Vi = Vhp + ve + v3 + v2; + offset = mixer_offset<4>::value; + break; + case 0x4f: + Vi = Vhp + ve + v3 + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x50: + Vi = Vhp + Vlp; + offset = mixer_offset<2>::value; + break; + case 0x51: + Vi = Vhp + Vlp + v1; + offset = mixer_offset<3>::value; + break; + case 0x52: + Vi = Vhp + Vlp + v2; + offset = mixer_offset<3>::value; + break; + case 0x53: + Vi = Vhp + Vlp + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x54: + Vi = Vhp + Vlp + v3; + offset = mixer_offset<3>::value; + break; + case 0x55: + Vi = Vhp + Vlp + v3 + v1; + offset = mixer_offset<4>::value; + break; + case 0x56: + Vi = Vhp + Vlp + v3 + v2; + offset = mixer_offset<4>::value; + break; + case 0x57: + Vi = Vhp + Vlp + v3 + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x58: + Vi = Vhp + Vlp + ve; + offset = mixer_offset<3>::value; + break; + case 0x59: + Vi = Vhp + Vlp + ve + v1; + offset = mixer_offset<4>::value; + break; + case 0x5a: + Vi = Vhp + Vlp + ve + v2; + offset = mixer_offset<4>::value; + break; + case 0x5b: + Vi = Vhp + Vlp + ve + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x5c: + Vi = Vhp + Vlp + ve + v3; + offset = mixer_offset<4>::value; + break; + case 0x5d: + Vi = Vhp + Vlp + ve + v3 + v1; + offset = mixer_offset<5>::value; + break; + case 0x5e: + Vi = Vhp + Vlp + ve + v3 + v2; + offset = mixer_offset<5>::value; + break; + case 0x5f: + Vi = Vhp + Vlp + ve + v3 + v2 + v1; + offset = mixer_offset<6>::value; + break; + case 0x60: + Vi = Vhp + Vbp; + offset = mixer_offset<2>::value; + break; + case 0x61: + Vi = Vhp + Vbp + v1; + offset = mixer_offset<3>::value; + break; + case 0x62: + Vi = Vhp + Vbp + v2; + offset = mixer_offset<3>::value; + break; + case 0x63: + Vi = Vhp + Vbp + v2 + v1; + offset = mixer_offset<4>::value; + break; + case 0x64: + Vi = Vhp + Vbp + v3; + offset = mixer_offset<3>::value; + break; + case 0x65: + Vi = Vhp + Vbp + v3 + v1; + offset = mixer_offset<4>::value; + break; + case 0x66: + Vi = Vhp + Vbp + v3 + v2; + offset = mixer_offset<4>::value; + break; + case 0x67: + Vi = Vhp + Vbp + v3 + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x68: + Vi = Vhp + Vbp + ve; + offset = mixer_offset<3>::value; + break; + case 0x69: + Vi = Vhp + Vbp + ve + v1; + offset = mixer_offset<4>::value; + break; + case 0x6a: + Vi = Vhp + Vbp + ve + v2; + offset = mixer_offset<4>::value; + break; + case 0x6b: + Vi = Vhp + Vbp + ve + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x6c: + Vi = Vhp + Vbp + ve + v3; + offset = mixer_offset<4>::value; + break; + case 0x6d: + Vi = Vhp + Vbp + ve + v3 + v1; + offset = mixer_offset<5>::value; + break; + case 0x6e: + Vi = Vhp + Vbp + ve + v3 + v2; + offset = mixer_offset<5>::value; + break; + case 0x6f: + Vi = Vhp + Vbp + ve + v3 + v2 + v1; + offset = mixer_offset<6>::value; + break; + case 0x70: + Vi = Vhp + Vbp + Vlp; + offset = mixer_offset<3>::value; + break; + case 0x71: + Vi = Vhp + Vbp + Vlp + v1; + offset = mixer_offset<4>::value; + break; + case 0x72: + Vi = Vhp + Vbp + Vlp + v2; + offset = mixer_offset<4>::value; + break; + case 0x73: + Vi = Vhp + Vbp + Vlp + v2 + v1; + offset = mixer_offset<5>::value; + break; + case 0x74: + Vi = Vhp + Vbp + Vlp + v3; + offset = mixer_offset<4>::value; + break; + case 0x75: + Vi = Vhp + Vbp + Vlp + v3 + v1; + offset = mixer_offset<5>::value; + break; + case 0x76: + Vi = Vhp + Vbp + Vlp + v3 + v2; + offset = mixer_offset<5>::value; + break; + case 0x77: + Vi = Vhp + Vbp + Vlp + v3 + v2 + v1; + offset = mixer_offset<6>::value; + break; + case 0x78: + Vi = Vhp + Vbp + Vlp + ve; + offset = mixer_offset<4>::value; + break; + case 0x79: + Vi = Vhp + Vbp + Vlp + ve + v1; + offset = mixer_offset<5>::value; + break; + case 0x7a: + Vi = Vhp + Vbp + Vlp + ve + v2; + offset = mixer_offset<5>::value; + break; + case 0x7b: + Vi = Vhp + Vbp + Vlp + ve + v2 + v1; + offset = mixer_offset<6>::value; + break; + case 0x7c: + Vi = Vhp + Vbp + Vlp + ve + v3; + offset = mixer_offset<5>::value; + break; + case 0x7d: + Vi = Vhp + Vbp + Vlp + ve + v3 + v1; + offset = mixer_offset<6>::value; + break; + case 0x7e: + Vi = Vhp + Vbp + Vlp + ve + v3 + v2; + offset = mixer_offset<6>::value; + break; + case 0x7f: + Vi = Vhp + Vbp + Vlp + ve + v3 + v2 + v1; + offset = mixer_offset<7>::value; + break; + } + + // Sum the inputs in the mixer and run the mixer output through the gain. + if (sid_model == 0) { + return (short)(f.gain[vol][f.mixer[offset + Vi]] - (1 << 15)); + } + else { + // FIXME: Temporary code for MOS 8580, should use code above. + /* do hard clipping here, else some tunes manage to overflow this + (eg /MUSICIANS/L/Linus/64_Forever.sid, starting at 0:44) */ + int tmp = Vi*(int)vol >> 4; + if (tmp < -32768) tmp = -32768; + if (tmp > 32767) tmp = 32767; + return (short)tmp; } +} + + +/* +Find output voltage in inverting gain and inverting summer SID op-amp +circuits, using a combination of Newton-Raphson and bisection. + + ---R2-- + | | + vi ---R1-----[A>----- vo + vx + +From Kirchoff's current law it follows that + + IR1f + IR2r = 0 + +Substituting the triode mode transistor model K*W/L*(Vgst^2 - Vgdt^2) +for the currents, we get: + + n*((Vddt - vx)^2 - (Vddt - vi)^2) + (Vddt - vx)^2 - (Vddt - vo)^2 = 0 + +Our root function f can thus be written as: + + f = (n + 1)*(Vddt - vx)^2 - n*(Vddt - vi)^2 - (Vddt - vo)^2 = 0 + +We are using the mapping function x = vo - vx -> vx. We thus substitute +for vo = vx + x and get: + + f = (n + 1)*(Vddt - vx)^2 - n*(Vddt - vi)^2 - (Vddt - (vx + x))^2 = 0 + +Using substitution constants + + a = n + 1 + b = Vddt + c = n*(Vddt - vi)^2 + +the equations for the root function and its derivative can be written as: + + f = a*(b - vx)^2 - c - (b - (vx + x))^2 + df = 2*((b - (vx + x))*(dvx + 1) - a*(b - vx)*dvx) +*/ +RESID_INLINE +int Filter::solve_gain(int* opamp, int n, int vi, int& x, model_filter_t& mf) +{ + // Note that all variables are translated and scaled in order to fit + // in 16 bits. It is not necessary to explicitly translate the variables here, + // since they are all used in subtractions which cancel out the translation: + // (a - t) - (b - t) = a - b + + // Start off with an estimate of x and a root bracket [ak, bk]. + // f is increasing, so that f(ak) < 0 and f(bk) > 0. + int ak = mf.ak, bk = mf.bk; + + int a = n + (1 << 7); // Scaled by 2^7 + int b = mf.kVddt; // Scaled by m*2^16 + int b_vi = b - vi; // Scaled by m*2^16 + if (b_vi < 0) b_vi = 0; + int c = n*int(unsigned(b_vi)*unsigned(b_vi) >> 12); // Scaled by m^2*2^27 + + for (;;) { + int xk = x; + + // Calculate f and df. + int vx_dvx = opamp[x]; + int vx = vx_dvx & 0xffff; // Scaled by m*2^16 + int dvx = vx_dvx >> 16; // Scaled by 2^11 + + // f = a*(b - vx)^2 - c - (b - vo)^2 + // df = 2*((b - vo)*(dvx + 1) - a*(b - vx)*dvx) + // + int vo = vx + (x << 1) - (1 << 16); + if (vo >= (1 << 16)) { + vo = (1 << 16) - 1; + } + else if (vo < 0) { + vo = 0; + } + int b_vx = b - vx; + if (b_vx < 0) b_vx = 0; + int b_vo = b - vo; + if (b_vo < 0) b_vo = 0; + // The dividend is scaled by m^2*2^27. + int f = a*int(unsigned(b_vx)*unsigned(b_vx) >> 12) - c - int(unsigned(b_vo)*unsigned(b_vo) >> 5); + // The divisor is scaled by m*2^11. + int df = (b_vo*(dvx + (1 << 11)) - a*(b_vx*dvx >> 7)) >> 15; + // The resulting quotient is thus scaled by m*2^16. + + // Newton-Raphson step: xk1 = xk - f(xk)/f'(xk) + x -= f/df; + if (unlikely(x == xk)) { + // No further root improvement possible. + return vo; + } + + // Narrow down root bracket. + if (f < 0) { + // f(xk) < 0 + ak = xk; + } + else { + // f(xk) > 0 + bk = xk; + } + + if (unlikely(x <= ak) || unlikely(x >= bk)) { + // Bisection step (ala Dekker's method). + x = (ak + bk) >> 1; + if (unlikely(x == ak)) { + // No further bisection possible. + return vo; + } + } + } +} + + +/* +Find output voltage in inverting integrator SID op-amp circuits, using a +single fixpoint iteration step. + +A circuit diagram of a MOS 6581 integrator is shown below. + + ---C--- + | | + vi -----Rw-------[A>----- vo + | | vx + --Rs-- + +From Kirchoff's current law it follows that + + IRw + IRs + ICr = 0 + +Using the formula for current through a capacitor, i = C*dv/dt, we get + + IRw + IRs + C*(vc - vc0)/dt = 0 + dt/C*(IRw + IRs) + vc - vc0 = 0 + vc = vc0 - n*(IRw(vi,vx) + IRs(vi,vx)) + +which may be rewritten as the following iterative fixpoint function: + + vc = vc0 - n*(IRw(vi,g(vc)) + IRs(vi,g(vc))) + +To accurately calculate the currents through Rs and Rw, we need to use +transistor models. Rs has a gate voltage of Vdd = 12V, and can be +assumed to always be in triode mode. For Rw, the situation is rather +more complex, as it turns out that this transistor will operate in +both subthreshold, triode, and saturation modes. + +The Shichman-Hodges transistor model routinely used in textbooks may +be written as follows: + + Ids = 0 , Vgst < 0 (subthreshold mode) + Ids = K/2*W/L*(2*Vgst - Vds)*Vds , Vgst >= 0, Vds < Vgst (triode mode) + Ids = K/2*W/L*Vgst^2 , Vgst >= 0, Vds >= Vgst (saturation mode) + + where + K = u*Cox (conductance) + W/L = ratio between substrate width and length + Vgst = Vg - Vs - Vt (overdrive voltage) + +This transistor model is also called the quadratic model. + +Note that the equation for the triode mode can be reformulated as +independent terms depending on Vgs and Vgd, respectively, by the +following substitution: + + Vds = Vgst - (Vgst - Vds) = Vgst - Vgdt + + Ids = K*W/L*(2*Vgst - Vds)*Vds + = K*W/L*(2*Vgst - (Vgst - Vgdt)*(Vgst - Vgdt) + = K*W/L*(Vgst + Vgdt)*(Vgst - Vgdt) + = K*W/L*(Vgst^2 - Vgdt^2) + +This turns out to be a general equation which covers both the triode +and saturation modes (where the second term is 0 in saturation mode). +The equation is also symmetrical, i.e. it can calculate negative +currents without any change of parameters (since the terms for drain +and source are identical except for the sign). + +FIXME: Subthreshold as function of Vgs, Vgd. + Ids = I0*e^(Vgst/(n*VT)) , Vgst < 0 (subthreshold mode) + +The remaining problem with the textbook model is that the transition +from subthreshold the triode/saturation is not continuous. + +Realizing that the subthreshold and triode/saturation modes may both +be defined by independent (and equal) terms of Vgs and Vds, +respectively, the corresponding terms can be blended into (equal) +continuous functions suitable for table lookup. + +The EKV model (Enz, Krummenacher and Vittoz) essentially performs this +blending using an elegant mathematical formulation: + + Ids = Is*(if - ir) + Is = 2*u*Cox*Ut^2/k*W/L + if = ln^2(1 + e^((k*(Vg - Vt) - Vs)/(2*Ut)) + ir = ln^2(1 + e^((k*(Vg - Vt) - Vd)/(2*Ut)) + +For our purposes, the EKV model preserves two important properties +discussed above: + +- It consists of two independent terms, which can be represented by + the same lookup table. +- It is symmetrical, i.e. it calculates current in both directions, + facilitating a branch-free implementation. + +Rw in the circuit diagram above is a VCR (voltage controlled resistor), +as shown in the circuit diagram below. + + Vw + + | + Vdd | + |---| + _|_ | + -- --| Vg + | __|__ + | ----- Rw + | | | + vi ------------ -------- vo + + +In order to calculalate the current through the VCR, its gate voltage +must be determined. + +Assuming triode mode and applying Kirchoff's current law, we get the +following equation for Vg: + +u*Cox/2*W/L*((Vddt - Vg)^2 - (Vddt - vi)^2 + (Vddt - Vg)^2 - (Vddt - Vw)^2) = 0 +2*(Vddt - Vg)^2 - (Vddt - vi)^2 - (Vddt - Vw)^2 = 0 +(Vddt - Vg) = sqrt(((Vddt - vi)^2 + (Vddt - Vw)^2)/2) + +Vg = Vddt - sqrt(((Vddt - vi)^2 + (Vddt - Vw)^2)/2) + +*/ +RESID_INLINE +int Filter::solve_integrate_6581(int dt, int vi, int& vx, int& vc, + model_filter_t& mf) +{ + // Note that all variables are translated and scaled in order to fit + // in 16 bits. It is not necessary to explicitly translate the variables here, + // since they are all used in subtractions which cancel out the translation: + // (a - t) - (b - t) = a - b + + int kVddt = mf.kVddt; // Scaled by m*2^16 + + // "Snake" voltages for triode mode calculation. + unsigned int Vgst = kVddt - vx; + unsigned int Vgdt = kVddt - vi; + unsigned int Vgdt_2 = Vgdt*Vgdt; + + // "Snake" current, scaled by (1/m)*2^13*m*2^16*m*2^16*2^-15 = m*2^30 + int n_I_snake = mf.n_snake*(int(Vgst*Vgst - Vgdt_2) >> 15); + + // VCR gate voltage. // Scaled by m*2^16 + // Vg = Vddt - sqrt(((Vddt - Vw)^2 + Vgdt^2)/2) + int kVg = vcr_kVg[(Vddt_Vw_2 + (Vgdt_2 >> 1)) >> 16]; + + // VCR voltages for EKV model table lookup. + int Vgs = kVg - vx; + if (Vgs < 0) Vgs = 0; + int Vgd = kVg - vi; + if (Vgd < 0) Vgd = 0; + + // VCR current, scaled by m*2^15*2^15 = m*2^30 + int n_I_vcr = (vcr_n_Ids_term[Vgs] - vcr_n_Ids_term[Vgd]) << 15; + + // Change in capacitor charge. + vc -= (n_I_snake + n_I_vcr)*dt; + +/* + // FIXME: Determine whether this check is necessary. + if (vc < mf.vc_min) { + vc = mf.vc_min; + } + else if (vc > mf.vc_max) { + vc = mf.vc_max; + } +*/ + + // vx = g(vc) + vx = mf.opamp_rev[(vc >> 15) + (1 << 15)]; + + // Return vo. + return vx + (vc >> 14); +} + +#endif // RESID_INLINING || defined(RESID_FILTER_CC) + +} // namespace reSID + +#endif // not RESID_FILTER_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1e8dd1f975673f7cc215f166a922dfb7ee4214d0.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1e8dd1f975673f7cc215f166a922dfb7ee4214d0.svn-base new file mode 100644 index 000000000..8e8247417 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1e8dd1f975673f7cc215f166a922dfb7ee4214d0.svn-base @@ -0,0 +1,48 @@ + +AUTOMAKE_OPTIONS = foreign subdir-objects + +if ENABLE_TEST + +AM_CPPFLAGS = \ +-I$(top_srcdir)/src \ +-I$(top_builddir)/src/builders/residfp-builder/residfp + +AM_LDFLAGS = @unittest_libs@ + +TESTS = \ +TestEnvelopeGenerator \ +TestSpline \ +TestDac \ +TestPSID \ +TestMUS + +check_PROGRAMS = $(TESTS) + +TestEnvelopeGenerator_SOURCES = \ +Main.cpp \ +TestEnvelopeGenerator.cpp +TestEnvelopeGenerator_LDADD = \ +$(top_builddir)/src/builders/residfp-builder/residfp/EnvelopeGenerator.o \ +$(top_builddir)/src/builders/residfp-builder/residfp/Dac.o + +TestSpline_SOURCES = \ +Main.cpp \ +TestSpline.cpp +TestSpline_LDADD = $(top_builddir)/src/builders/residfp-builder/residfp/Spline.o + +TestDac_SOURCES = \ +Main.cpp \ +TestDac.cpp +TestDac_LDADD = $(top_builddir)/src/builders/residfp-builder/residfp/Dac.o + +TestPSID_SOURCES = \ +Main.cpp \ +TestPSID.cpp +TestPSID_LDADD = $(top_builddir)/src/libsidplayfp.la + +TestMUS_SOURCES = \ +Main.cpp \ +TestMUS.cpp +TestMUS_LDADD = $(top_builddir)/src/libsidplayfp.la + +endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1ef74fcfbfee1b7e71d0602b1d4c7dcd1e29f990.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1ef74fcfbfee1b7e71d0602b1d4c7dcd1e29f990.svn-base new file mode 100644 index 000000000..3fa475241 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/1e/1ef74fcfbfee1b7e71d0602b1d4c7dcd1e29f990.svn-base @@ -0,0 +1,57 @@ +/* + * This file is part of sidplayfp, a console SID player. + * + * Copyright 2016 Leandro Nini + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef AUDIO_NULL_H +#define AUDIO_NULL_H + +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#if defined(HAVE_SIDPLAYFP_BUILDERS_HARDSID_H) || defined(HAVE_SIDPLAYFP_BUILDERS_EXSID_H) +# ifndef AudioDriver +# define AudioDriver Audio_Null +# endif +#endif + +#include "../AudioBase.h" + +/* + * Null audio driver used for hardsid, exSID + * and songlength detection + */ +class Audio_Null: public AudioBase +{ +private: // ------------------------------------------------------- private + bool isOpen; + +public: // --------------------------------------------------------- public + Audio_Null(); + ~Audio_Null(); + + bool open (AudioConfig &cfg) override; + void close () override; + void reset () override {} + bool write () override; + void pause () override {} +}; + +#endif // AUDIO_NULL_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/20/202abd462ba794df0ca57d4252ddf390328c1b40.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/20/202abd462ba794df0ca57d4252ddf390328c1b40.svn-base new file mode 100644 index 000000000..7ddc5104a --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/20/202abd462ba794df0ca57d4252ddf390328c1b40.svn-base @@ -0,0 +1,254 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SIDTUNEBASE_H +#define SIDTUNEBASE_H + +#include +#include +#include +#include + +#include "sidplayfp/SidTuneInfo.h" +#include "sidplayfp/siddefs.h" + +#include "SmartPtr.h" +#include "SidTuneInfoImpl.h" + +#include "sidcxx11.h" + +namespace libsidplayfp +{ + +class sidmemory; +template class SmartPtr_sidtt; + +/** + * loadError + */ +class loadError +{ +private: + const char* m_msg; +public: + loadError(const char* msg) : m_msg(msg) {} + const char* message() const { return m_msg; } +}; + +/** + * SidTuneBaseBase + */ +class SidTuneBase +{ +protected: + typedef std::vector buffer_t; + +protected: + /// Also PSID file format limit. + static const unsigned int MAX_SONGS = 256; + + // Generic error messages + static const char ERR_TRUNCATED[]; + static const char ERR_INVALID[]; + +public: // ---------------------------------------------------------------- + virtual ~SidTuneBase() {} + + /** + * Load a sidtune from a file. + * + * To retrieve data from standard input pass in filename "-". + * If you want to override the default filename extensions use this + * contructor. Please note, that if the specified "sidTuneFileName" + * does exist and the loader is able to determine its file format, + * this function does not try to append any file name extension. + * See "SidTune.cpp" for the default list of file name extensions. + * + * @param fileName + * @param fileNameExt + * @param separatorIsSlash + * @return the sid tune + * @throw loadError + */ + static SidTuneBase* load(const char* fileName, const char **fileNameExt, bool separatorIsSlash); + + /** + * Load a single-file sidtune from a memory buffer. + * Currently supported: PSID format + * + * @param sourceBuffer + * @param bufferLen + * @return the sid tune + * @throw loadError + */ + static SidTuneBase* read(const uint_least8_t* sourceBuffer, uint_least32_t bufferLen); + + /** + * Select sub-song (0 = default starting song) + * and return active song number out of [1,2,..,SIDTUNE_MAX_SONGS]. + * + * @param songNum + * @return the active song + */ + unsigned int selectSong(unsigned int songNum); + + /** + * Retrieve sub-song specific information. + */ + const SidTuneInfo* getInfo() const; + + /** + * Select sub-song (0 = default starting song) + * and retrieve active song information. + * + * @param songNum + */ + const SidTuneInfo* getInfo(unsigned int songNum); + + /** + * Copy sidtune into C64 memory (64 KB). + * + * @param mem + */ + virtual void placeSidTuneInC64mem(sidmemory& mem); + + /** + * Calculates the MD5 hash of the tune. + * Not providing an md5 buffer will cause the internal one to be used. + * If provided, buffer must be MD5_LENGTH + 1 + * + * @return a pointer to the buffer containing the md5 string. + */ + virtual const char *createMD5(char *) { return nullptr; } + + /** + * Get the pointer to the tune data. + */ + const uint_least8_t* c64Data() const { return &cache[fileOffset]; } + +protected: // ------------------------------------------------------------- + + std::unique_ptr info; + + uint_least8_t songSpeed[MAX_SONGS]; + SidTuneInfo::clock_t clockSpeed[MAX_SONGS]; + + /// For files with header: offset to real data + uint_least32_t fileOffset; + + buffer_t cache; + +protected: + SidTuneBase(); + + /** + * Does not affect status of object, and therefore can be used + * to load files. Error string is put into info.statusString, though. + * + * @param fileName + * @param bufferRef + * @throw loadError + */ + static void loadFile(const char* fileName, buffer_t& bufferRef); + + /** + * Convert 32-bit PSID-style speed word to internal tables. + * + * @param speed + * @param clock + */ + void convertOldStyleSpeedToTables(uint_least32_t speed, + SidTuneInfo::clock_t clock = SidTuneInfo::CLOCK_PAL); + + /** + * Check if compatibility constraints are fulfilled. + */ + bool checkCompatibility(); + + /** + * Check for valid relocation information. + */ + bool checkRelocInfo(); + + /** + * Common address resolution procedure. + * + * @param c64data + */ + void resolveAddrs(const uint_least8_t* c64data); + + /** + * Cache the data of a single-file or two-file sidtune and its + * corresponding file names. + * + * @param dataFileName + * @param infoFileName + * @param buf + * @param isSlashedFileName If your opendir() and readdir()->d_name return path names + * that contain the forward slash (/) as file separator, but + * your operating system uses a different character, there are + * extra functions that can deal with this special case. Set + * separatorIsSlash to true if you like path names to be split + * correctly. + * You do not need these extra functions if your systems file + * separator is the forward slash. + * @throw loadError + */ + virtual void acceptSidTune(const char* dataFileName, const char* infoFileName, + buffer_t& buf, bool isSlashedFileName); + + /** + * Petscii to Ascii converter. + */ + std::string petsciiToAscii(SmartPtr_sidtt& spPet); + +private: // --------------------------------------------------------------- + +#if !defined(SIDTUNE_NO_STDIN_LOADER) + static SidTuneBase* getFromStdIn(); +#endif + static SidTuneBase* getFromFiles(const char* name, const char **fileNameExtensions, bool separatorIsSlash); + + /** + * Try to retrieve single-file sidtune from specified buffer. + */ + static SidTuneBase* getFromBuffer(const uint_least8_t* const buffer, uint_least32_t bufferLen); + + /** + * Get new file name with specified extension. + * + * @param destString destinaton string + * @param sourceName original file name + * @param sourceExt new extension + */ + static void createNewFileName(std::string& destString, + const char* sourceName, const char* sourceExt); + +private: + // prevent copying + SidTuneBase(const SidTuneBase&); + SidTuneBase& operator=(SidTuneBase&); +}; + +} + +#endif /* SIDTUNEBASE_H */ diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/22/224576b030acac8d6fcb61abac326488630a3fed.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/22/224576b030acac8d6fcb61abac326488630a3fed.svn-base new file mode 100644 index 000000000..2a2dd24f7 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/22/224576b030acac8d6fcb61abac326488630a3fed.svn-base @@ -0,0 +1,90 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004 Dag Lem + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "Filter.h" + +namespace reSIDfp +{ + +void Filter::enable(bool enable) +{ + enabled = enable; + + if (enabled) + { + writeRES_FILT(filt); + } + else + { + filt1 = filt2 = filt3 = filtE = false; + } +} + +void Filter::reset() +{ + writeFC_LO(0); + writeFC_HI(0); + writeMODE_VOL(0); + writeRES_FILT(0); +} + +void Filter::writeFC_LO(unsigned char fc_lo) +{ + fc = (fc & 0x7f8) | (fc_lo & 0x007); + updatedCenterFrequency(); +} + +void Filter::writeFC_HI(unsigned char fc_hi) +{ + fc = (fc_hi << 3 & 0x7f8) | (fc & 0x007); + updatedCenterFrequency(); +} + +void Filter::writeRES_FILT(unsigned char res_filt) +{ + filt = res_filt; + + updateResonance((res_filt >> 4) & 0x0f); + + if (enabled) + { + filt1 = (filt & 0x01) != 0; + filt2 = (filt & 0x02) != 0; + filt3 = (filt & 0x04) != 0; + filtE = (filt & 0x08) != 0; + } + + updatedMixing(); +} + +void Filter::writeMODE_VOL(unsigned char mode_vol) +{ + vol = mode_vol & 0x0f; + lp = (mode_vol & 0x10) != 0; + bp = (mode_vol & 0x20) != 0; + hp = (mode_vol & 0x40) != 0; + voice3off = (mode_vol & 0x80) != 0; + + updatedMixing(); +} + +} // namespace reSIDfp diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/23/23463f95a9f4c93b6925ce361227ca6333a4c381.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/23/23463f95a9f4c93b6925ce361227ca6333a4c381.svn-base new file mode 100644 index 000000000..bb69513d8 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/23/23463f95a9f4c93b6925ce361227ca6333a4c381.svn-base @@ -0,0 +1,76 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2009-2014 VICE Project + * Copyright 2007-2010 Antti Lankila + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SERIALPORT_H +#define SERIALPORT_H + +#include "interrupt.h" + +namespace libsidplayfp +{ + +class SerialPort +{ +private: + InterruptSource *interruptSource; + + int count; + + bool buffered; + + uint8_t out; + +public: + explicit SerialPort(InterruptSource *intSource) : + interruptSource(intSource) + {} + + void reset() + { + out = 0; + count = 0; + buffered = false; + } + + void setBuffered() { buffered = true; } + + void handle(uint8_t serialDataReg) + { + if (count && --count == 0) + { + interruptSource->trigger(InterruptSource::INTERRUPT_SP); + } + + if (count == 0 && buffered) + { + out = serialDataReg; + buffered = false; + count = 16; + // Output rate 8 bits at ta / 2 + } + } +}; + +} + +#endif // SERIALPORT_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/23/23eadd1a69620f0831de153625d2b0b095b9241d.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/23/23eadd1a69620f0831de153625d2b0b095b9241d.svn-base new file mode 100644 index 000000000..e2b46f344 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/23/23eadd1a69620f0831de153625d2b0b095b9241d.svn-base @@ -0,0 +1,88 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef ZEROORDER_RESAMPLER_H +#define ZEROORDER_RESAMPLER_H + +#include "Resampler.h" + +#include "sidcxx11.h" + +namespace reSIDfp +{ + +/** + * Return sample with linear interpolation. + * + * @author Antti Lankila + */ +class ZeroOrderResampler final : public Resampler +{ + +private: + /// Last sample + int cachedSample; + + /// Number of cycles per sample + const int cyclesPerSample; + + int sampleOffset; + + /// Calculated sample + int outputValue; + +public: + ZeroOrderResampler(double clockFrequency, double samplingFrequency) : + cachedSample(0), + cyclesPerSample(static_cast(clockFrequency / samplingFrequency * 1024.)), + sampleOffset(0), + outputValue(0) {} + + bool input(int sample) override + { + bool ready = false; + + if (sampleOffset < 1024) + { + outputValue = cachedSample + (sampleOffset * (sample - cachedSample) >> 10); + ready = true; + sampleOffset += cyclesPerSample; + } + + sampleOffset -= 1024; + + cachedSample = sample; + + return ready; + } + + int output() const override { return outputValue; } + + void reset() override + { + sampleOffset = 0; + cachedSample = 0; + } +}; + +} // namespace reSIDfp + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/24/243a76a8b3f837e2250fbf656bb68374e832f396.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/24/243a76a8b3f837e2250fbf656bb68374e832f396.svn-base new file mode 100644 index 000000000..5ab73cf64 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/24/243a76a8b3f837e2250fbf656bb68374e832f396.svn-base @@ -0,0 +1,1551 @@ + .word $f000 + * = $f000 + +lf000 lf001 = * + 1 + lf002 = * + 2 + .byt $00,$00,$00 + lf005 = * + 2 + .byt $00,$00,$00 + lf008 = * + 2 + .byt $00,$00,$00 + lf00b = * + 2 + .byt $00,$00,$00 + lf00e = * + 2 + .byt $00,$00,$00 + lf011 = * + 2 + .byt $00,$00,$00 + lf014 = * + 2 + .byt $00,$00,$00 + lf017 = * + 2 + .byt $00,$00,$00 + lf01a = * + 2 + .byt $00,$00,$00 +lf01b lf01c = * + 1 + lf01d = * + 2 + .byt $00,$00,$00 + lf020 = * + 2 + .byt $00,$00,$00 + lf023 = * + 2 + .byt $00,$00,$00 +lf024 lf025 = * + 1 + lf026 = * + 2 + .byt $00,$00,$00 +lf027 lf028 = * + 1 + lf029 = * + 2 + .byt $00,$00,$00 +lf02a .byt $00,$00,$00 +lf02d lf02e = * + 1 + lf02f = * + 2 + .byt $00,$00,$00 +lf030 .byt $00,$00,$00 +lf033 .byt $00,$00,$00 +lf036 .byt $00,$00,$00 +lf039 .byt $00,$00,$00 +lf03c .byt $00,$00,$00 +lf03f .byt $00,$00,$00 +lf042 .byt $00,$00,$00 +lf045 .byt $00,$00,$00 +lf048 .byt $00,$00,$00 +lf04b .byt $00,$00,$00 +lf04e .byt $00,$00,$00 +lf051 .byt $00,$00,$00 +lf054 .byt $00,$00,$00 +lf057 .byt $00,$00,$00 +lf05a .byt $00,$00,$00 +lf05d .byt $00,$00,$00 +lf060 .byt $00,$00,$00 +lf063 .byt $00,$00,$00 +lf066 .byt $00,$00,$00 +lf069 .byt $00,$00,$00 +lf06c .byt $00,$00,$00 +lf06f .byt $00,$00,$00 +lf072 .byt $00,$00,$00 +lf075 .byt $00,$00,$00 +lf078 .byt $00,$00,$00 +lf07b .byt $00,$00,$00 +lf07e .byt $00,$00,$00 +lf081 .byt $00,$00,$00 +lf084 .byt $00,$00,$00 +lf087 .byt $00,$00,$00 +lf08a .byt $00,$00,$00 +lf08d .byt $00,$00,$00 +lf090 .byt $00,$00,$00 +lf093 .byt $00,$00,$00 +lf096 .byt $00,$00,$00 +lf099 .byt $00,$00,$00 +lf09c .byt $00,$00,$00 +lf09f .byt $00,$00,$00 +lf0a2 .byt $00,$00,$00 +lf0a5 .byt $00,$00,$00 +lf0a8 .byt $00,$00,$00 +lf0ab .byt $00,$00,$00 +lf0ae .byt $00,$00,$00 +lf0b1 .byt $00,$00,$00 +lf0b4 .byt $00,$00,$00 +lf0b7 .byt $00,$00,$00 +lf0ba lf0bc = * + 2 + .byt $00,$00,$00 +lf0bd lf0be = * + 1 + lf0bf = * + 2 + .byt $00,$00,$00 +lf0c0 .byt $00,$00,$00 +lf0c3 .byt $00,$00,$00 +lf0c6 .byt $00,$00,$00 +lf0c9 lf0ca = * + 1 + lf0cb = * + 2 + .byt $00,$00,$00 +lf0cc lf0cd = * + 1 + .byt $00,$00,$00 + lf0d0 = * + 1 + .byt $00,$00,$00 + lf0d3 = * + 1 + .byt $00,$00,$00 + lf0d6 = * + 1 + .byt $00,$00,$00 + lf0d9 = * + 1 + .byt $00,$00,$00 + lf0dc = * + 1 + .byt $00,$00,$00 + lf0df = * + 1 + lf0e0 = * + 2 + .byt $00,$00,$00 +lf0e1 .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 +lf0f0 .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 +lf0ff .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 +lf117 .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 +lf12f .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 +lf13e .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 + .byt $00,$00,$00 +lf156 lf157 = * + 1 + lf158 = * + 2 + .byt $00,$00,$00 +lf159 lf15a = * + 1 + lf15b = * + 2 + .byt $00,$00,$00 +lf15c lf15d = * + 1 + lf15e = * + 2 + .byt $00,$00,$00 +lf15f lf160 = * + 1 +; Instruction opcode accessed. +; Instruction parameter accessed. + adc ($f1,x) + rts +lf162 .byt $01,$02,$04 +lf165 lf167 = * + 2 + .byt $00,$07,$0e + .byt $02,$02,$fe + .byt $02,$02,$fe + lf16f = * + 1 + .byt $fe,$00,$01 + lf172 = * + 1 + .byt $00,$ff,$00 + .byt $02,$04,$05 + .byt $07,$09,$0b +lf17a .byt $1e,$18,$8b + .byt $7e,$fa,$06 + .byt $ac,$f3,$e6 + .byt $8f,$f8,$2e +lf186 .byt $86,$8e,$96 + .byt $9f,$a8,$b3 + .byt $bd,$c8,$d4 + .byt $e1,$ee,$fd +lf192 sty $6478 + bvc lf1d3 + .byt $28,$14,$00 +lf19a .byt $00,$02,$03 + .byt $05,$07,$08 + .byt $0a,$0c,$0d + .byt $0f,$11,$12 +lf1a6 lf1a8 = * + 2 + .byt $00,$e0,$00 +lf1a9 .byt $05,$0a,$0f +lf1ac lf1ad = * + 1 + .byt $f9,$00,$f5 +lf1af .byt $00,$00,$00 +lf1b2 bpl lf1b4 +lf1b4 .byt $00 +lf1b5 jsr $0000 + bmi lf1ba +lf1ba .byt $00,$40,$00 + .byt $00 +lf1be bvc lf1c0 +lf1c0 .byt $00,$60,$00 + .byt $00 +lf1c4 bvs lf1c6 +lf1c6 .byt $00,$80,$00 + .byt $00 +lf1ca bcc lf1cc +lf1cc .byt $00 +lf1cd ldy #$00 +lf1cf lda #$00 + lf1d3 = * + 2 + sta lf000 + ldx #$95 + ldy #$42 + lda $02a6 + beq lf1e1 +lf1dd ldx #$25 + ldy #$40 +lf1e1 stx lf15b + sty lf15c + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + rts +lf200 lda #$00 + sta lf000 + stx $61 + sty $62 + ldy #$bc +lf20b sta lf000,y + dey + bne lf20b +lf211 ldy #$72 +lf213 sta lf0bc,y + dey + bne lf213 +lf219 sta $d515 + sta $d516 + lda #$08 + sta lf025 + sta $d517 + sta lf026 + sta $d518 + lda #$90 + sta lf027 + lda #$60 + sta lf028 + lda #$0c + sta lf029 + lda lf15b + sta lf02d + lda lf15c + sta lf02e + lda #$ff + sta lf0cc + lda #$d5 + sta $64 + ldx #$02 +lf253 lda #$ff + sta lf00b,x + lda #$01 + sta lf030,x + sta lf02a,x + txa + sta lf033,x + sta lf0ae,x + lda #$04 + sta lf039,x + lda lf1a8,x + sta lf0ba,x + lda #$5b + sta lf07e,x + lda lf165,x + sta $63 + lda #$00 + tay + sta ($63),y + iny + sta ($63),y + iny + sta ($63),y + lda #$08 + sta lf017,x + sta lf09c,x + iny + sta ($63),y + iny + sta ($63),y + lda #$40 + sta lf01a,x + sta ($63),y + lda #$20 + sta lf01d,x + iny + sta ($63),y + lda #$f5 + sta lf020,x + iny + sta ($63),y + dex + bpl lf253 +lf2af txa + ldx #$17 +lf2b2 sta lf13e,x + dex + bpl lf2b2 +lf2b8 lda $61 + clc + adc #$06 + sta $63 + lda #$00 + tax + tay + adc $62 +lf2c5 sta $64 + sta lf0ab,x + sta lf0b4,x + lda $63 + sta lf0a8,x + sta lf0b1,x + clc + adc ($61),y + sta $63 + lda $64 + iny + adc ($61),y + iny + inx + cpx #$03 + bne lf2c5 +lf2e5 ldx $63 + tay + rts +lf2e9 lda #$00 + sta $d504 + sta $d50b + sta $d512 + sta $d501 + sta $d508 + sta $d50f + lda #$08 + sta $d517 + lda lf15b + sta $dc04 + lda lf15c + sta $dc05 + rts +lf30f nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + rts +lf31e lda #$08 + sta lf000 +lf323 jmp (lf15d) +lf326 nop + nop + nop +lf329 lda lf000 + bmi lf31e +lf32e ora #$80 + tay + and #$07 + beq lf323 +lf335 cld + sty lf000 + nop + lda $fb + sta lf156 + lda $fc + sta lf157 + lda $fd + sta lf158 + lda $fe + sta lf159 + lda $ff + sta lf15a + lda lf023 + clc + adc lf0d9 + pha + and #$07 + tay + lda lf0dc + adc #$00 + sta $ff + pla + lsr $ff + ror + lsr $ff + ror + lsr $ff + ror + clc + adc lf024 + sty $d515 + sta $d516 + lda lf025 + sta $d517 + lda lf026 + sta $d518 + lda #$d5 + sta $fc + ldx #$00 +lf38b lda lf000 + and lf162,x + beq lf3e4 +lf393 lda lf165,x + sta $fb + lda lf00e,x + clc + adc lf051,x + tay + lda lf011,x + adc lf054,x + pha + tya + clc + adc lf0cd,x + ldy #$00 + sta ($fb),y + pla + adc lf0d0,x + iny + sta ($fb),y + lda lf014,x + clc + adc lf069,x + sta $ff + lda lf017,x + adc lf06c,x + pha + lda $ff + clc + adc lf0d3,x + iny + sta ($fb),y + pla + adc lf0d6,x + iny + sta ($fb),y + lda lf01d,x + iny + iny + sta ($fb),y + lda lf020,x + iny + sta ($fb),y +lf3e4 inx + cpx #$03 + bne lf38b +lf3e9 ldy lf01a + ldx lf01b + lda lf01c + sty $d504 + stx $d50b + sta $d512 + ldx lf02d + ldy lf02e + stx $dc04 + sty $dc05 + +; replaced unused reads with nops +; lda $d51b +; sta lf0be +; lda $d51c +; sta lf0bf + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + nop + + ldx #$00 +lf415 lda lf000 + and lf162,x + beq lf42d +lf41d stx lf02f + jsr lf536 + lda lf000 + and #$78 + beq lf42d +lf42a jmp lf50c +lf42d inx + cpx #$03 + bne lf415 +lf432 lda lf0c9 + bne lf489 +lf437 lda lf0ca + ora lf0cb + beq lf4b7 +lf43f lda lf0df + bne lf46c +lf444 lda lf0ca + beq lf471 +lf449 clc + adc lf0bd + bcs lf456 +lf44f cmp lf0cc + bcc lf4b4 +lf454 beq lf4b4 +lf456 lda #$00 + sta lf0df + lda lf0cb + beq lf4b4 +lf460 inc lf0df + lda lf0bd + sbc lf0cb + jmp lf4b4 +lf46c lda lf0cb + beq lf444 +lf471 lda lf0bd + sec + sbc lf0cb + bcs lf4b4 +lf47a lda #$00 + sta lf0df + lda lf0ca + bne lf4b4 +lf484 inc lf0df + bne lf4b1 +lf489 dec lf0e0 + bne lf4b7 +lf48e lda lf0df + bne lf4a4 +lf493 inc lf0df + lda lf0cb + bne lf49d +lf49b lda #$20 +lf49d sta lf0e0 + lda #$00 + beq lf4b4 +lf4a4 dec lf0df + lda lf0ca + bne lf4ae +lf4ac lda #$20 +lf4ae sta lf0e0 +lf4b1 lda lf0cc +lf4b4 sta lf0bd +lf4b7 ldx #$00 +lf4b9 lda lf0c3,x + beq lf502 +lf4be lda #$00 + sta $ff + ldy lf0c0,x + lda lf0bd,y + ldy lf0c6,x + beq lf4db +lf4cd bmi lf4d7 +lf4cf asl + rol $ff + dey + bne lf4cf +lf4d5 beq lf4db +lf4d7 lsr + iny + bne lf4d7 +lf4db ldy lf0c3,x + dey + bne lf4ec +lf4e1 sta lf0cd,x + lda $ff + sta lf0d0,x + jmp lf502 +lf4ec dey + bne lf4fa +lf4ef sta lf0d3,x + lda $ff + sta lf0d6,x + jmp lf502 +lf4fa sta lf0d9 + lda $ff + sta lf0dc +lf502 inx + cpx #$03 + bne lf4b9 +lf507 lda lf000 + and #$7f +lf50c sta lf000 + lda lf156 + sta $fb + lda lf157 + sta $fc + lda lf158 + sta $fd + lda lf159 + sta $fe + lda lf15a + sta $ff + jmp (lf15d) +lf52b lda lf060,x + bne lf533 +lf530 jmp lf69f +lf533 jmp lf5ba +lf536 dec lf030,x + bne lf53e +lf53b jmp lf6a0 +lf53e lda lf036,x + bmi lf52b +lf543 bne lf55f +lf545 lda lf03f,x + beq lf54f +lf54a dec lf03f,x + bne lf55f +lf54f lda lf039,x + cmp lf030,x + bcc lf55f +lf557 lda lf01a,x + and #$fe + sta lf01a,x +lf55f lda lf042,x + beq lf5ba +lf564 asl + lda lf00e,x + bcs lf587 +lf56a adc lf045,x + sta lf00e,x + tay + lda lf011,x + adc lf048,x + sta lf011,x + pha + tya + cmp lf08d,x + pla + sbc lf090,x + bcs lf5a4 +lf585 bcc lf5b5 +lf587 sbc lf045,x + sta lf00e,x + lda lf011,x + sbc lf048,x + sta lf011,x + lda lf08d,x + cmp lf00e,x + lda lf090,x + sbc lf011,x + bcc lf5b5 +lf5a4 lda lf08d,x + sta lf00e,x + lda lf090,x + sta lf011,x + lda #$00 + sta lf042,x +lf5b5 lda lf060,x + beq lf60f +lf5ba lda lf04b,x + beq lf60a +lf5bf ldy #$00 + dec lf04e,x + bne lf5f7 +lf5c6 lda lf051,x + ora lf054,x + bne lf5e9 +lf5ce lda lf05d,x + sta lf057,x + sta lf04e,x + lda lf04b,x + asl + lda lf05a,x + bcc lf5e4 +lf5e0 eor #$ff + adc #$00 +lf5e4 sta lf04b,x + bne lf5f9 +lf5e9 lda lf057,x + sta lf04e,x + tya + sec + sbc lf04b,x + sta lf04b,x +lf5f7 cmp #$00 +lf5f9 bpl lf5fc +lf5fb dey +lf5fc clc + adc lf051,x + sta lf051,x + tya + adc lf054,x + sta lf054,x +lf60a lda lf036,x + bmi lf624 +lf60f lda lf093,x + beq lf624 +lf614 clc + adc lf014,x + sta lf014,x + lda lf096,x + adc lf017,x + sta lf017,x +lf624 lda lf063,x + beq lf674 +lf629 ldy #$00 + dec lf066,x + bne lf661 +lf630 lda lf069,x + ora lf06c,x + bne lf653 +lf638 lda lf072,x + sta lf06f,x + sta lf066,x + lda lf063,x + asl + lda lf075,x + bcc lf64e +lf64a eor #$ff + adc #$00 +lf64e sta lf063,x + bne lf663 +lf653 lda lf06f,x + sta lf066,x + tya + sec + sbc lf063,x + sta lf063,x +lf661 cmp #$00 +lf663 bpl lf666 +lf665 dey +lf666 clc + adc lf069,x + sta lf069,x + tya + adc lf06c,x + sta lf06c,x +lf674 lda lf036,x + bpl lf67c +lf679 jmp lf69f +lf67c ldy #$00 + lda lf0a2,x + beq lf69f +lf683 bpl lf686 +lf685 iny +lf686 clc + adc lf023 + pha + and #$07 + sta lf023 + pla + ror + lsr + lsr + clc + adc lf1a6,y + clc + adc lf024 + sta lf024 +lf69f rts +lf6a0 lda lf0a8,x + sta $fd + lda lf0ab,x + sta $fe + bne lf6b0 +lf6ac rts +lf6ad jsr lf898 +lf6b0 lda lf000 + and lf162,x + beq lf6ac +lf6b8 ldy #$00 + lda ($fd),y + sta $ff + iny + lda ($fd),y + tay + lda $fd + clc + adc #$02 + sta $fd + sta lf0a8,x + lda $fe + adc #$00 + sta $fe + sta lf0ab,x + lda $ff + and #$03 + bne lf6ad +lf6db lda lf08d,x + sta lf00e,x + lda lf090,x + sta lf011,x + lda $ff + sta lf005,x + tya + sta lf002,x + and #$07 + tay + lda lf167,y + sta lf16f + lda lf002,x + and #$38 + lsr + lsr + lsr + adc lf081,x + sta $fd + lda lf002,x + and #$c0 + asl + rol + rol + tay + lda lf16f,y + sta $fe + lda lf002,x + and #$07 + beq lf77d +lf71b tay + lda lf172,y + adc $fe + clc + adc lf084,x + bpl lf72c +lf727 clc + adc #$0c + inc $fd +lf72c cmp #$0c + bcc lf734 +lf730 sbc #$0c + dec $fd +lf734 sta $fe + tay + lda lf186,y + sta $ff + lda lf17a,y + ldy $fd + dey + bmi lf74a +lf744 lsr $ff + ror + dey + bpl lf744 +lf74a clc + adc lf087,x + sta lf08d,x + lda $ff + adc lf08a,x + sta lf090,x + lda lf005,x + bne lf761 +lf75e jmp lf6a0 +lf761 lda lf045,x + ora lf048,x + beq lf77f +lf769 lda lf00e,x + cmp lf08d,x + lda lf011,x + sbc lf090,x + lda #$fe + ror + sta lf042,x + bcc lf78e +lf77d beq lf7c9 +lf77f sta lf042,x + lda lf08d,x + sta lf00e,x + lda lf090,x + sta lf011,x +lf78e lda lf036,x + asl + bne lf7c9 +lf794 lda lf093,x + beq lf7a5 +lf799 lda lf099,x + sta lf014,x + lda lf09c,x + sta lf017,x +lf7a5 lda lf09f,x + beq lf7b9 +lf7aa ldy $fd + clc + adc lf192,y + ldy $fe + clc + adc lf19a,y + clc + bcc lf7c1 +lf7b9 lda lf0a2,x + beq lf7c9 +lf7be lda lf0a5,x +lf7c1 sta lf024 + lda #$00 + sta lf023 +lf7c9 lda lf03c,x + sta lf03f,x + lda lf005,x + and #$40 + sta lf036,x + lda lf005,x + lsr + lsr + and #$07 + bne lf810 +lf7e0 lda lf005,x + bmi lf7f9 +lf7e5 lda lf027 + and #$3c + bne lf80a +lf7ec lda lf027 + asl + rol + rol + bne lf7f6 +lf7f4 lda #$04 +lf7f6 jmp lf870 +lf7f9 lda lf028 + beq lf80a +lf7fe and #$3f + bne lf80a +lf802 lda lf028 + asl + rol + rol + bne lf870 +lf80a lda #$10 + sta lf000 + rts +lf810 cmp #$01 + bne lf827 +lf814 lda lf005,x + and #$20 + bne lf821 +lf81b lda lf029 + jmp lf870 +lf821 lda lf02a,x + jmp lf870 +lf827 tay + lda lf005,x + and #$a0 + cmp #$80 + beq lf861 +lf831 sta $ff + clc + lda lf027 + bne lf83a +lf839 sec +lf83a dey + dey + beq lf844 +lf83e ror + bcs lf88f +lf841 dey + bne lf83e +lf844 ldy $ff + sta $ff + beq lf870 +lf84a lsr $ff + bcs lf88f +lf84e beq lf892 +lf850 adc $ff + bcs lf892 +lf854 iny + bpl lf870 +lf857 lsr $ff + bcs lf88f +lf85b adc $ff + bcc lf870 +lf85f bcs lf892 +lf861 lda lf028 + beq lf88f +lf866 dey + dey + beq lf870 +lf86a lsr + bcs lf88f +lf86d dey + bne lf86a +lf870 sta lf030,x + lda lf01a,x + and #$f6 + sta lf01a,x + sec + lda lf002,x + and #$07 + bne lf886 +lf883 ror lf036,x +lf886 lda lf01a,x + adc #$00 + sta lf01a,x + rts +lf88f lda #$10 + lf892 = * + 1 +; Instruction parameter jumped to. + bit $18a9 + sta lf000 + rts +lf898 tya + pha + lda $ff + lsr + bcc lf8a2 +lf89f jmp lfa42 +lf8a2 lsr + lsr + bcs lf8c4 +lf8a6 lsr + bcs lf8b7 +lf8a9 sta lf09c,x + sta lf017,x + pla + sta lf099,x + sta lf014,x + rts +lf8b7 lsr + bcc lf8bc +lf8ba ora #$f8 +lf8bc sta lf08a,x + pla + sta lf087,x + rts +lf8c4 lsr + bcs lf8ca +lf8c7 jmp lf94a +lf8ca lsr + bcs lf92e +lf8cd lsr + bcs lf8df +lf8d0 bne lf8da +lf8d2 pla + sta lf0a5,x + sta lf024 + rts +lf8da pla + sta lf03c,x + rts +lf8df bne lf929 +lf8e1 pla + sta lf07e,x + cmp #$5b + beq lf91c +lf8e9 tay + lsr + lsr + lsr + sec + sbc #$0b + clc + adc lf084,x + bmi lf902 +lf8f6 cmp #$0c + bcc lf90b +lf8fa sbc #$0c + dec lf081,x + jmp lf90b +lf902 cmp #$f5 + bcs lf90b +lf906 adc #$0c + inc lf081,x +lf90b sta lf084,x + tya + and #$07 + sec + sbc #$03 + clc + adc lf081,x + sta lf081,x + rts +lf91c lda lf078,x + sta lf081,x + lda lf07b,x + sta lf084,x + rts +lf929 pla + sta lf0c6,x + rts +lf92e lsr + bcs lf939 +lf931 sta lf00b,x + pla + sta lf008,x + rts +lf939 lsr + ror + ror + adc lf15b + sta lf02d + pla + adc lf15c + sta lf02e + rts +lf94a lsr + bcc lf950 +lf94d jmp lf9d3 +lf950 lsr + bcs lf993 +lf953 lsr + bcs lf96d +lf956 lsr + bcs lf968 +lf959 pla + sta lf027 + lsr + lsr + lsr + tay + lda lf1af,y + sta lf028 + rts +lf968 pla + sta lf05d,x + rts +lf96d lsr + bcs lf975 +lf970 pla + sta lf001 + rts +lf975 pla + beq lf989 +lf978 sta lf075,x + ldy lf063,x + bne lf988 +lf980 sta lf063,x + lda #$01 + sta lf066,x +lf988 rts +lf989 sta lf063,x + sta lf069,x + sta lf06c,x + rts +lf993 lsr + bcs lf9c6 +lf996 lsr + bcs lf99e +lf999 pla + sta lf039,x + rts +lf99e pla + ldy #$00 + lsr + bcc lf9a6 +lf9a4 iny + clc +lf9a6 pha + and #$07 + adc lf1ac,y + sta lf078,x + sta lf081,x + pla + lsr + lsr + lsr + clc + adc lf1ad,y + sta lf07b,x + sta lf084,x + lda #$5b + sta lf07e,x + rts +lf9c6 lsr + bcs lf9ce +lf9c9 pla + sta lf0a2,x + rts +lf9ce pla + sta lf0cc + rts +lf9d3 lsr + bcs lf9fd +lf9d6 lsr + bcs lf9e6 +lf9d9 lsr + bcs lf9e1 +lf9dc pla + sta lf029 + rts +lf9e1 pla + sta lf09f,x + rts +lf9e6 lsr + bcs lf9f8 +lf9e9 pla + sta lf093,x + ldy #$00 + asl + bcc lf9f3 +lf9f2 dey +lf9f3 tya + sta lf096,x + rts +lf9f8 pla + sta lf072,x + rts +lf9fd lsr + bcs lfa1c +lfa00 lsr + bcs lfa18 +lfa03 pla + sta lf0b7,x + lda $fd + sta lf0b1,x + lda $fe + sta lf0b4,x + lda lf033,x + sta lf0ae,x + rts +lfa18 pla + jmp (lf15f) +lfa1c lsr + bcs lfa3d +lfa1f pla + bne lfa2c +lfa22 sta lf04b,x + sta lf051,x + sta lf054,x + rts +lfa2c sta lf05a,x + ldy lf04b,x + bne lfa3c +lfa34 sta lf04b,x + lda #$01 + sta lf04e,x +lfa3c rts +lfa3d pla + sta lf02a,x + rts +lfa42 lsr + bcc lfa4d +lfa45 sta lf048,x + pla + sta lf045,x + rts +lfa4d pla + lsr + bcs lfab2 +lfa51 lsr + bcs lfa79 +lfa54 lsr + bcs lfa5c +lfa57 lsr + ldy #$f0 + bne lfa62 +lfa5c asl + asl + asl + asl + ldy #$0f +lfa62 sta $ff + tya + bcs lfa70 +lfa67 and lf01d,x + ora $ff + sta lf01d,x + rts +lfa70 and lf020,x + ora $ff + sta lf020,x + rts +lfa79 lsr + bcs lfab4 +lfa7c lsr + bcs lfae3 +lfa7f sta $ff + lda lf0ba,x + cmp lf1a9,x + beq lfadd +lfa89 inc lf0ba,x + tay + lda $fd + sta lf0e1,y + lda $fe + sta lf0f0,y + lda lf033,x + sta lf12f,y + ldy $ff + lda lf117,y + beq lfada +lfaa4 sta $fe + lda lf0ff,y + sta $fd + lda lf13e,y + sta lf033,x + rts +lfab2 bcs lfaff +lfab4 lsr + bcs lfaf3 +lfab7 tay + lda $fd + sta lf0ff,y + lda $fe + sta lf117,y + lda lf033,x + sta lf13e,y + lda lf0ba,x + cmp lf1a9,x + beq lfadd +lfad0 inc lf0ba,x + tay + lda #$00 + sta lf0f0,y + rts +lfada lda #$30 + lfadd = * + 1 +; Instruction parameter jumped to. + bit $28a9 + sta lf000 + rts +lfae3 asl + asl + asl + asl + eor lf025 + and #$f0 + eor lf025 + sta lf025 + rts +lfaf3 eor lf026 + and #$0f + eor lf026 + sta lf026 + rts +lfaff lsr + bcs lfb0d +lfb02 lsr + bcs lfb09 +lfb05 sta lf0ca + rts +lfb09 sta lf0cb + rts +lfb0d lsr + bcc lfb13 +lfb10 jmp lfba5 +lfb13 lsr + tay + beq lfb38 +lfb17 dey + beq lfb4e +lfb1a dey + beq lfb5f +lfb1d dey + beq lfb6a +lfb20 dey + beq lfb75 +lfb23 dey + beq lfb82 +lfb26 dey + beq lfb8f +lfb29 dey + beq lfb9f +lfb2c and #$07 + ora #$10 + bcs lfb35 +lfb32 jmp lfab7 +lfb35 jmp lfa7f +lfb38 ldy lf026 + bcs lfb44 +lfb3d iny + tya + and #$0f + bne lfb4a +lfb43 rts +lfb44 tya + and #$0f + beq lfb4d +lfb49 dey +lfb4a sty lf026 +lfb4d rts +lfb4e lda lf162,x + eor #$ff + and lf025 + bcc lfb5b +lfb58 ora lf162,x +lfb5b sta lf025 + rts +lfb5f lda lf01a,x + and #$fb + bcc lfbbb +lfb66 ora #$04 + bcs lfbbb +lfb6a lda lf01a,x + and #$fd + bcc lfbbb +lfb71 ora #$02 + bcs lfbbb +lfb75 lda lf025 + and #$f7 + bcc lfb7e +lfb7c ora #$08 +lfb7e sta lf025 + rts +lfb82 lda lf026 + and #$7f + bcc lfb8b +lfb89 ora #$80 +lfb8b sta lf026 + rts +lfb8f tya + sta lf0bd + sta lf0df + iny + sty lf0e0 + rol + sta lf0c9 + rts +lfb9f tya + rol + sta lf060,x + rts +lfba5 lsr + bcs lfbcf +lfba8 lsr + bcs lfbbf +lfbab bne lfbaf +lfbad lda #$08 +lfbaf asl + asl + asl + asl + eor lf01a,x + and #$f0 + eor lf01a,x +lfbbb sta lf01a,x + rts +lfbbf asl + asl + asl + asl + eor lf026 + and #$70 + eor lf026 + sta lf026 + rts +lfbcf lsr + bcc lfbd6 +lfbd2 sta lf0c0,x + rts +lfbd6 tay + beq lfbf9 +lfbd9 dey + beq lfc1c +lfbdc dey + beq lfc42 +lfbdf and #$03 + sta lf0c3,x + lda #$00 + sta lf0cd,x + sta lf0d0,x + sta lf0d3,x + sta lf0d6,x + sta lf0d9 + sta lf0dc + rts +lfbf9 lda lf0b7,x + beq lfc03 +lfbfe dec lf0b7,x + beq lfc15 +lfc03 lda lf033,x + cmp lf0ae,x + bne lfc16 +lfc0b lda lf0b1,x + sta $fd + lda lf0b4,x + sta $fe +lfc15 rts +lfc16 lda #$38 + sta lf000 + rts +lfc1c lda lf0ba,x + cmp lf1a8,x + beq lfc3c +lfc24 dec lf0ba,x + tay + dey + lda lf0f0,y + beq lfc3b +lfc2e sta $fe + lda lf0e1,y + sta $fd + lda lf12f,y + sta lf033,x +lfc3b rts +lfc3c lda #$20 + sta lf000 + rts +lfc42 lda lf000 + eor lf162,x + sta lf000 + lda #$01 + sta lf030,x + rts +lfc51 lda lf000 + and #$07 + sta lfc81 + bne lfc5e +lfc5b jsr lf2e9 +lfc5e rts + .byt $00 +lfc60 ldx #$51 + ldy #$fc + stx lf15d + sty lf15e + jsr lf1cf + ldx #$00 + ldy #$09 + jsr lf200 + lda #$07 + sta lf000 + sta lfc81 +lfc7c rts + .byt $00,$00,$00 +lfc80 lfc81 = * + 1 +; Instruction parameter accessed. + lda #$00 + and #$ff + beq lfc7c +lfc86 jmp lf329 +lfc89 lda #$07 + sta lf000 + rts + .byt $00 +lfc90 jsr $ec60 + jmp lfc60 +lfc96 jsr $ec80 + jmp lfc80 diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/27/2778a9ad9984f0cf90b678b69e99f9a04a914367.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/27/2778a9ad9984f0cf90b678b69e99f9a04a914367.svn-base new file mode 100644 index 000000000..224b9004c --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/27/2778a9ad9984f0cf90b678b69e99f9a04a914367.svn-base @@ -0,0 +1,76 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2012-2013 Leandro Nini + * Copyright 2010 Antti Lankila + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SIDBANK_H +#define SIDBANK_H + +#include "Bank.h" +#include "c64/c64sid.h" + +#include "sidcxx11.h" + +#include "NullSid.h" + +namespace libsidplayfp +{ + +/** + * SID + * + * Located at $D400-$D7FF, mirrored each 32 bytes + */ +class SidBank final : public Bank +{ +private: + /// SID chip + c64sid *sid; + +public: + SidBank() + : sid(NullSid::getInstance()) + {} + + void reset() + { + sid->reset(0xf); + } + + uint8_t peek(uint_least16_t addr) override + { + return sid->peek(addr); + } + + void poke(uint_least16_t addr, uint8_t data) override + { + sid->poke(addr, data); + } + + /** + * Set SID emulation. + * + * @param s the emulation, nullptr to remove current sid + */ + void setSID(c64sid *s) { sid = (s != nullptr) ? s : NullSid::getInstance(); } +}; + +} + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/28/287e32afeb9043dcfeb98278594e4820e76045c5.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/28/287e32afeb9043dcfeb98278594e4820e76045c5.svn-base new file mode 100644 index 000000000..0598d95d9 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/28/287e32afeb9043dcfeb98278594e4820e76045c5.svn-base @@ -0,0 +1,373 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2013-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef PARAMETERS_H +#define PARAMETERS_H + +#include + +#include +#include +#include +#include + +typedef std::numeric_limits flt; + +// Model parameters +enum class Param_t +{ + THRESHOLD, + PULSESTRENGTH, + TOPBIT, + DISTANCE1, + DISTANCE2, + STMIX +}; +// define the postfix increment operator to allow looping over enum +inline Param_t& operator++(Param_t& x, int) +{ + return x = static_cast(static_cast::type>(x) + 1); +} + +typedef std::vector ref_vector_t; + +struct score_t +{ + unsigned int audible_error; + unsigned int wrong_bits; + + score_t() : + audible_error(0), + wrong_bits(0) + {} + + std::string wrongBitsRate() const + { + std::ostringstream o; + o << wrong_bits << "/" << 4096*8; + return o.str(); + } + + bool isBetter(const score_t& newScore) const + { + return (newScore.audible_error < audible_error) + || ((newScore.audible_error == audible_error) + && (newScore.wrong_bits < wrong_bits)); + } +}; + +std::ostream & operator<<(std::ostream & os, const score_t & foo) +{ + os.precision(2); + os << foo.audible_error << " (" << std::fixed << foo.wrongBitsRate() << ")"; + return os; +} + +class Parameters +{ +private: + typedef float (*distance_t)(float, int); + +private: + // Distance functions + static float exponentialDistance(float distance, int i) + { + return pow(distance, -i); + } + + static float linearDistance(float distance, int i) + { + return 1.f / (1.f + i * distance); + } + + static float quadraticDistance(float distance, int i) + { + return 1.f / (1.f + (i*i) * distance); + } + +public: + float threshold, pulsestrength, topbit, distance1, distance2, stmix; + +public: + Parameters() { reset(); } + + void reset() + { + threshold = 0.f; + pulsestrength = 0.f; + topbit = 0.f; + distance1 = 0.f; + distance2 = 0.f; + stmix = 0.f; + } + + float GetValue(Param_t i) + { + switch (i) + { + case Param_t::THRESHOLD: return threshold; + case Param_t::PULSESTRENGTH: return pulsestrength; + case Param_t::TOPBIT: return topbit; + case Param_t::DISTANCE1: return distance1; + case Param_t::DISTANCE2: return distance2; + case Param_t::STMIX: return stmix; + } + } + + void SetValue(Param_t i, float v) + { + switch (i) + { + case Param_t::THRESHOLD: threshold = v; break; + case Param_t::PULSESTRENGTH: pulsestrength = v; break; + case Param_t::TOPBIT: topbit = v; break; + case Param_t::DISTANCE1: distance1 = v; break; + case Param_t::DISTANCE2: distance2 = v; break; + case Param_t::STMIX: stmix = v; break; + } + } + + std::string toString() + { + std::ostringstream ss; + ss.precision(flt::max_digits10); + ss << "threshold = " << threshold << std::endl; + ss << "pulsestrength = " << pulsestrength << std::endl; + ss << "topbit = " << topbit << std::endl; + ss << "distance1 = " << distance1 << std::endl; + ss << "distance2 = " << distance2 << std::endl; + ss << "stmix = " << stmix << std::endl; + return ss.str(); + } + +private: + void SimulateMix(float bitarray[12], float wa[], bool HasPulse) const + { + float tmp[12]; + + for (int sb = 0; sb < 12; sb++) + { + float n = 0.f; + float avg = 0.f; + for (int cb = 0; cb < 12; cb++) + { + const float weight = wa[sb - cb + 12]; + avg += bitarray[cb] * weight; + n += weight; + } + if (HasPulse) + { + const float weight = wa[sb]; + avg += pulsestrength * weight; + n += weight; + } + tmp[sb] = (bitarray[sb] + avg / n) * 0.5f; + } + for (int i = 0; i < 12; i++) + bitarray[i] = tmp[i]; + } + + /** + * Get the upper 8 bits of the predicted value. + */ + unsigned int GetScore8(float bitarray[12]) const + { + unsigned int result = 0; + for (int cb = 0; cb < 8; cb++) + { + if (bitarray[4+cb] > threshold) + result |= 1 << cb; + } + return result; + } + + /** + * Calculate audible error. + */ + static unsigned int ScoreResult(unsigned int a, unsigned int b) + { + return a ^ b; + } + + /** + * Count number of mispredicted bits. + */ + static unsigned int WrongBits(unsigned int v) + { + // Brian Kernighan's method, goes through as many iterations as there are set bits + unsigned int c = 0; + for (; v; c++) + { + v &= v - 1; + } + return c; + } + + float getAnalogValue(float bitarray[12]) const + { + float analogval = 0.f; + for (unsigned int i = 0; i < 12; i++) + { + float val = (bitarray[i] - threshold) * 512 + 0.5f; + if (val < 0.f) + val = 0.f; + else if (val > 1.f) + val = 1.f; + analogval += ldexp(val, i); + } + return analogval / 16.f; + } + +public: + score_t Score(int wave, bool is8580, const ref_vector_t &reference, bool print, unsigned int bestscore) + { + /* + * Calculate the weight as a function of distance. + * The quadratic model (1.f + (i*i) * distance) gives better results for + * waveforms 6 for 8580 model. + * The linear model (1.f + i * distance) is quite good for waveform 6 for 6581. + * Waveform 5 shows mixed results for both 6581 and 8580. + * Furthermore the cross-bits effect seems to be asymmetric. + * TODO: try to come up with a generic distance function to + * cover all scenarios... + */ + const distance_t distFunc = (wave & 1) == 1 ? exponentialDistance : is8580 ? quadraticDistance : linearDistance; + + float wa[12 * 2 + 1]; + wa[12] = 1.f; + for (int i = 12; i > 0; i--) + { + wa[12-i] = distFunc(distance1, i); + wa[12+i] = distFunc(distance2, i); + } + + score_t score; + + bool done = false; + + // loop over the 4096 oscillator values + #pragma omp parallel for ordered + for (unsigned int j = 0; j < 4096; j++) + { + #pragma omp flush(done) + if (!done) + { + float bitarray[12]; + + // Saw + for (unsigned int i = 0; i < 12; i++) + { + bitarray[i] = (j & (1 << i)) != 0 ? 1.f : 0.f; + } + + // If Saw is not selected the bits are XORed + if ((wave & 2) == 0) + { + const bool top = (j & 2048) != 0; + for (int i = 11; i > 0; i--) + { + bitarray[i] = top ? 1.f - bitarray[i-1] : bitarray[i-1]; + } + bitarray[0] = 0.f; + } + + // If both Saw and Triangle are selected the bits are interconnected + // + // @NOTE: on the 8580 the triangle selector transistors, with the exception + // of the lowest four bits, are half the width of the other selectors. + // How does this affects combined waveforms? + else if ((wave & 3) == 3) + { +#if 1 + bitarray[0] *= stmix; + const float compl_stmix = 1.f - stmix; + for (int i = 1; i < 12; i++) + { + /* + * Enabling the S waveform pulls the XOR circuit selector transistor down + * (which would normally make the descending ramp of the triangle waveform), + * so ST does not actually have a sawtooth and triangle waveform combined, + * but merely combines two sawtooths, one rising double the speed the other. + * + * http://www.lemon64.com/forum/viewtopic.php?t=25442&postdays=0&postorder=asc&start=165 + */ + bitarray[i] = bitarray[i] * stmix + bitarray[i-1] * compl_stmix; + } +#else + const float compl_stmix = 1.f - stmix; + for (int i = 11; i > 0; i--) + { + bitarray[i] = bitarray[i] * stmix + bitarray[i-1] * compl_stmix; + } + bitarray[0] *= stmix; +#endif + } + + // topbit for Saw + if ((wave & 2) == 2) + { + // Why does this happen? + // For 6581 this is mostly 0 while for 8580 it's near 1 + // A few 'odd' 6581 chips show a strangely high value + // for Pulse-Saw combination + bitarray[11] *= topbit; + } + + SimulateMix(bitarray, wa, wave > 4); + + // Calculate score + const unsigned int simval = GetScore8(bitarray); + const unsigned int refval = reference[j]; + const unsigned int error = ScoreResult(simval, refval); + #pragma omp atomic + score.audible_error += error; + #pragma omp atomic + score.wrong_bits += WrongBits(error); + + if (print) + { + #pragma omp ordered + std::cout << j << " " + << refval << " " + << simval << " " + << (simval ^ refval) << " " +#if 0 + << getAnalogValue(bitarray) << " " +#endif + << std::endl; + } + + // halt if we already are worst than the best score + if (score.audible_error > bestscore) + { + done = true; + #pragma omp flush(done) +#ifndef _OPENMP + return score; +#endif + } + } + } + return score; + } +}; + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/28/288a36e67b3f5d1e3e891a3fb16a83a1c8b533cf.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/28/288a36e67b3f5d1e3e891a3fb16a83a1c8b533cf.svn-base new file mode 100644 index 000000000..5bf81f4cb --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/28/288a36e67b3f5d1e3e891a3fb16a83a1c8b533cf.svn-base @@ -0,0 +1,89 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SIDDATABASE_H +#define SIDDATABASE_H + +#include +#include + +#include "sidplayfp/siddefs.h" + +class SidTune; + +namespace libsidplayfp +{ +class iniParser; +} + +/** + * SidDatabase + * An utility class to deal with the songlength DataBase. + */ +class SID_EXTERN SidDatabase +{ +private: + std::auto_ptr m_parser; + + const char *errorString; + +public: + SidDatabase(); + ~SidDatabase(); + + /** + * Open the songlength DataBase. + * + * @param filename songlengthDB file name with full path. + * @return false in case of errors, true otherwise. + */ + bool open(const char *filename); + + /** + * Close the songlength DataBase. + */ + void close(); + + /** + * Get the length of the current subtune. + * + * @param tune + * @return tune length in seconds, -1 in case of errors. + */ + int_least32_t length(SidTune &tune); + + /** + * Get the length of the selected subtune. + * + * @param md5 the md5 hash of the tune. + * @param song the subtune. + * @return tune length in seconds, -1 in case of errors. + */ + int_least32_t length(const char *md5, unsigned int song); + + /** + * Get descriptive error message. + */ + const char *error() const { return errorString; } +}; + +#endif // SIDDATABASE_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/290643272797795b2a4c69b6a70ba30b167febb0.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/290643272797795b2a4c69b6a70ba30b167febb0.svn-base new file mode 100644 index 000000000..e148e4d95 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/290643272797795b2a4c69b6a70ba30b167febb0.svn-base @@ -0,0 +1,142 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2009-2014 VICE Project + * Copyright 2007-2010 Antti Lankila + * Copyright 2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef LIGHTPEN_H +#define LIGHTPEN_H + +namespace libsidplayfp +{ + +/** + * Lightpen emulation. + * Does not reflect model differences. + */ +class Lightpen +{ +private: + /// Last VIC raster line + unsigned int lastLine; + + /// VIC cycles per line + unsigned int cyclesPerLine; + + /// X coordinate + unsigned int lpx; + + /// Y coordinate + unsigned int lpy; + + /// Has light pen IRQ been triggered in this frame already? + bool isTriggered; + +public: + /** + * Set VIC screen size. + * + * @param height number of raster lines + * @param width number of cycles per line + */ + void setScreenSize(unsigned int height, unsigned int width) + { + lastLine = height - 1; + cyclesPerLine = width; + } + + /** + * Reset the lightpen. + */ + void reset() + { + lpx = 0; + lpy = 0; + isTriggered = false; + } + + /** + * Return the low byte of x coordinate. + */ + uint8_t getX() const { return lpx; } + + /** + * Return the low byte of y coordinate. + */ + uint8_t getY() const { return lpy; } + + /** + * Retrigger lightpen on vertical blank. + * + * @param lineCycle current line cycle + * @param rasterY current y raster position + * @return true if an IRQ should be triggered + */ + bool retrigger(unsigned int lineCycle, unsigned int rasterY) + { + const bool triggered = trigger(lineCycle, rasterY); + switch (cyclesPerLine) + { + case 63: + default: + lpx = 0xd1; + break; + case 65: + lpx = 0xd5; + break; + } + return triggered; + } + + /** + * Trigger lightpen from CIA. + * + * @param lineCycle current line cycle + * @param rasterY current y raster position + * @return true if an IRQ should be triggered + */ + bool trigger(unsigned int lineCycle, unsigned int rasterY) + { + if (!isTriggered) + { + // don't trigger on the last line, except on the first cycle + if ((rasterY == lastLine) && (lineCycle > 0)) { + return false; + } + + isTriggered = true; + + // Latch current coordinates + lpx = (lineCycle << 2) + 2; + lpy = rasterY; + return true; + } + return false; + } + + /** + * Untrigger lightpen from CIA. + */ + void untrigger() { isTriggered = false; } +}; + +} + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/2921d7254f0373eb5418cc39027227896e2a2341.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/2921d7254f0373eb5418cc39027227896e2a2341.svn-base new file mode 100644 index 000000000..e7fc44b20 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/2921d7254f0373eb5418cc39027227896e2a2341.svn-base @@ -0,0 +1,59 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2012-2014 Leandro Nini + * Copyright 2010 Antti Lankila + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef NULLSID_H +#define NULLSID_H + +#include "c64/c64sid.h" + +#include "sidcxx11.h" + +namespace libsidplayfp +{ + +/** + * SID chip placeholder which does nothing and returns 0xff on reading. + */ +class NullSid final : public c64sid +{ +private: + NullSid() {} + virtual ~NullSid() {} + +public: + /** + * Returns singleton instance. + */ + static NullSid *getInstance() + { + static NullSid nullsid; + return &nullsid; + } + + void reset(uint8_t) override {} + + void write(uint_least8_t, uint8_t) override {} + uint8_t read(uint_least8_t) override { return 0xff; } +}; + +} + +#endif // NULLSID_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/298497a49e5a5001d8003aa2a3d1ff7d3d785789.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/298497a49e5a5001d8003aa2a3d1ff7d3d785789.svn-base new file mode 100644 index 000000000..3c50068e6 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/298497a49e5a5001d8003aa2a3d1ff7d3d785789.svn-base @@ -0,0 +1,305 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2004,2010 Dag Lem + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef ENVELOPEGENERATOR_H +#define ENVELOPEGENERATOR_H + +#include "siddefs-fp.h" + +namespace reSIDfp +{ + +/** + * A 15 bit [LFSR] is used to implement the envelope rates, in effect dividing + * the clock to the envelope counter by the currently selected rate period. + * + * In addition, another counter is used to implement the exponential envelope decay, + * in effect further dividing the clock to the envelope counter. + * The period of this counter is set to 1, 2, 4, 8, 16, 30 at the envelope counter + * values 255, 93, 54, 26, 14, 6, respectively. + * + * [LFSR]: https://en.wikipedia.org/wiki/Linear_feedback_shift_register + */ +class EnvelopeGenerator +{ +private: + /** + * The envelope state machine's distinct states. In addition to this, + * envelope has a hold mode, which freezes envelope counter to zero. + */ + enum State + { + ATTACK, DECAY_SUSTAIN, RELEASE + }; + +private: + /// XOR shift register for ADSR prescaling. + unsigned int lfsr; + + /// Comparison value (period) of the rate counter before next event. + unsigned int rate; + + /** + * During release mode, the SID arpproximates envelope decay via piecewise + * linear decay rate. + */ + unsigned int exponential_counter; + + /** + * Comparison value (period) of the exponential decay counter before next + * decrement. + */ + unsigned int exponential_counter_period; + + /// Current envelope state + State state; + + /// Whether hold is enabled. Only switching to ATTACK can release envelope. + bool hold_zero; + + bool envelope_pipeline; + + /// Gate bit + bool gate; + + /// The current digital value of envelope output. + unsigned char envelope_counter; + + /// Attack register + unsigned char attack; + + /// Decay register + unsigned char decay; + + /// Sustain register + unsigned char sustain; + + /// Release register + unsigned char release; + + /** + * Emulated nonlinearity of the envelope DAC. + * + * @See SID.kinked_dac + */ + float dac[256]; + +private: + /** + * Lookup table to convert from attack, decay, or release value to rate + * counter period. + * + * The rate counter is a 15 bit register which is left shifted each cycle. + * When the counter reaches a specific comparison value, + * the envelope counter is incremented (attack) or decremented + * (decay/release) and the rate counter is resetted. + * + * see [kevtris.org](http://blog.kevtris.org/?p=13) + */ + static const unsigned int adsrtable[16]; + +private: + void set_exponential_counter(); + +public: + /** + * Set chip model. + * This determines the type of the analog DAC emulation: + * 8580 is perfectly linear while 6581 is nonlinear. + * + * @param chipModel + */ + void setChipModel(ChipModel chipModel); + + /** + * SID clocking. + */ + void clock(); + + /** + * Get the Envelope Generator output. + * DAC imperfections are emulated by using envelope_counter as an index + * into a DAC lookup table. readENV() uses envelope_counter directly. + */ + float output() const { return dac[envelope_counter]; } + + /** + * Constructor. + */ + EnvelopeGenerator() : + lfsr(0), + rate(0), + exponential_counter(0), + exponential_counter_period(1), + state(RELEASE), + hold_zero(true), + envelope_pipeline(false), + gate(false), + envelope_counter(0), + attack(0), + decay(0), + sustain(0), + release(0) {} + + /** + * SID reset. + */ + void reset(); + + /** + * Write control register. + * + * @param control + * control register + */ + void writeCONTROL_REG(unsigned char control); + + /** + * Write Attack/Decay register. + * + * @param attack_decay + * attack/decay value + */ + void writeATTACK_DECAY(unsigned char attack_decay); + + /** + * Write Sustain/Release register. + * + * @param sustain_release + * sustain/release value + */ + void writeSUSTAIN_RELEASE(unsigned char sustain_release); + + /** + * Return the envelope current value. + * + * @return envelope counter + */ + unsigned char readENV() const { return envelope_counter; } +}; + +} // namespace reSIDfp + +#if RESID_INLINING || defined(ENVELOPEGENERATOR_CPP) + +namespace reSIDfp +{ + +RESID_INLINE +void EnvelopeGenerator::clock() +{ + if (unlikely(envelope_pipeline)) + { + --envelope_counter; + envelope_pipeline = false; + // Check for change of exponential counter period. + set_exponential_counter(); + } + + // Check for ADSR delay bug. + // If the rate counter comparison value is set below the current value of the + // rate counter, the counter will continue counting up until it wraps around + // to zero at 2^15 = 0x8000, and then count rate_period - 1 before the + // envelope can constly be stepped. + // This has been verified by sampling ENV3. + // + // Note: Envelope is now implemented like in the real machine with a shift register + // so the ADSR delay bug should be correcly modeled + + // check to see if LFSR matches table value + if (likely(lfsr != rate)) + { + // it wasn't a match, clock the LFSR once + // by performing XOR on last 2 bits + const unsigned int feedback = ((lfsr << 14) ^ (lfsr << 13)) & 0x4000; + lfsr = (lfsr >> 1) | feedback; + return; + } + + // reset LFSR + lfsr = 0x7fff; + + // The first envelope step in the attack state also resets the exponential + // counter. This has been verified by sampling ENV3. + if (state == ATTACK || ++exponential_counter == exponential_counter_period) + { + // likely (~50%) + exponential_counter = 0; + + // Check whether the envelope counter is frozen at zero. + if (unlikely(hold_zero)) + { + return; + } + + switch (state) + { + case ATTACK: + // The envelope counter can flip from 0xff to 0x00 by changing state to + // release, then to attack. The envelope counter is then frozen at + // zero; to unlock this situation the state must be changed to release, + // then to attack. This has been verified by sampling ENV3. + ++envelope_counter; + + if (unlikely(envelope_counter == 0xff)) + { + state = DECAY_SUSTAIN; + rate = adsrtable[decay]; + } + + break; + + case DECAY_SUSTAIN: + if (likely(envelope_counter == sustain)) + { + return; + } + + // fall-through + + case RELEASE: + // The envelope counter can flip from 0x00 to 0xff by changing state to + // attack, then to release. The envelope counter will then continue + // counting down in the release state. + // This has been verified by sampling ENV3. + // NB! The operation below requires two's complement integer. + if (unlikely(exponential_counter_period != 1)) + { + // The decrement is delayed one cycle. + envelope_pipeline = true; + return; + } + + --envelope_counter; + break; + } + + // Check for change of exponential counter period. + set_exponential_counter(); + } +} + +} // namespace reSIDfp + +#endif + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/29dde9b1eba5f6a602eb6e5a9ef38fae430168b7.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/29dde9b1eba5f6a602eb6e5a9ef38fae430168b7.svn-base new file mode 100644 index 000000000..0b5a0135f --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/29/29dde9b1eba5f6a602eb6e5a9ef38fae430168b7.svn-base @@ -0,0 +1,2353 @@ +# Doxyfile 1.8.8 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = @PACKAGE_NAME@ + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = @PACKAGE_VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = @builddir@/docs + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = @srcdir@ \ + @srcdir@/docs + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = @srcdir@/test + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = NO + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra stylesheet files is of importance (e.g. the last +# stylesheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /
) that +lists all known bugs in SID tunes in HVSC. See the top of that file +for details about what's in it exactly. A BUG entry is like a +STIL entry, but it is contained in this BUGlist.txt file. + +=item B + +The smallest piece of information in a STIL entry. Currently +valid field names are NAME, TITLE, ARTIST and COMMENT. + +=item B + +A special COMMENT field in a STIL entry for a +multi-tune SID file that refers to the whole SID, not just one tune in +it. These usually contain general information about the SID file +itself. + +Example: + + /Hubbard_Rob/Gerry_the_Germ.sid + COMMENT: In Rob's own demo of this music, the tunes are named after the levels + in the original game. + (#1) + TITLE: Lungs + (#2) + TITLE: Kidney + (#7) + TITLE: End + +=item B + +High Voltage SID Collection. If you don't know what this is, you +downloaded the wrong program. :) + +=item B + +The pathname plus filename of a SID file that can be found in your +HVSC, relative to the base directory of HVSC. It is always in +UNIX-style format, eg.: /Hubbard_Rob/Commando.sid refers to +Rob Hubbard's Commando.sid file within HVSC (which may actually be +found as C:\Music\HVSC\Hubbard_Rob\Commando.sid on your Windows PC). + +=item B + +A STIL entry that is referring to a SID file that has many tunes in it. +Each tune might have its own STIL block, which are separated by a +so-called tune designation in the form of "(#x)", where x = the +tune number. Consult the STIL.FAQ in HVSC for a detailed description. + +Example: + + /Hubbard_Rob/Gerry_the_Germ.sid + COMMENT: In Rob's own demo of this music, the tunes are named after the levels + in the original game. + (#1) + TITLE: Lungs + (#2) + TITLE: Kidney + (#7) + TITLE: End + +=item B
+ +A part of STIL that belongs to one composer (ie. every STIL entry +referring to SID files that are in one subdirectory in HVSC). +Sections in STIL are always separated by a line in the form of: "### +Composer's name ########". + +=item B + +A special STIL entry that refers not to an individual SID file, +but to a whole subdirectory. These usually contain info about the +composer himself, or about all the SID file he/she ever composed, +and are always indexed in the form of "/Subdir/" (note the trailing +slash!). + +Example: + + /Hubbard_Rob/ + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + Hubbard's own comments are denoted by (RH). + +=item B + +A STIL entry that has no tune designation in it in the form of "(#x)", +where x is a number. (Note, that a single-tune entry might still refer +to a SID file which has many tunes in it, ie. when a single-tune entry +has nothing but a COMMENT field in it!) + +Example: + + /Hubbard_Rob/Chain_Reaction.sid + TITLE: Zoolook (remix) [from Zoolook] + ARTIST: Jean Michel Jarre + +Another example (the SID this is refering to has many tunes in it!): + + /Barrett_Steve/Magic_Land_Dizzy.sid + COMMENT: Also used in the game "Wacky Darts" (c) 1990 Codemasters. + +=item B + +SID Tune Information List, essentially a text-file database that +can be found in your HVSC in the /DOCUMENTS/ subdirectory. + +=item B + +All of the pieces of information in STIL relating to one SID file +of the HVSC. They are always indexed by the HVSC-relative pathname. + +=item B + +One of the compositions in a SID. Most SID files have only one tune +in them, but many have more than one (eg. one for the title score +of the game, and one for the hi-score music). + +=back + + +=head1 OPTIONS + +=over + +=item B<-b> + +Do B print BUG entries +Default value: Not specified (ie. do print BUG entries) + +Example: C + +When this option is specified, BUG entries will not be printed for +the given SID tune. At a minimum, the -e option has to be specified +for this option to work. + +=item B<-d> + +Default value: Not specified (ie. debug mode is off) + +Example: C + +Turns on debug mode in STILView. This will result in an extensive +output, with the debugging messages going to STDERR. If you +encounter any problem or strange behavior with STILView, run +STILView with the exact same options as you did when you +encountered the problem, with this -d option added to them. Capture +the complete output of this run, and send it to me with a detailed +explanation of the problem (see email address at the top of this +file). + +=item B<-e>=I + +Default: NONE (you have to give an HVSC-relative pathname to this +option) + +Example #1: C + +Example #2: C + +This is where you specify the STIL entry you are looking for, given +as an HVSC-relative pathname. If there exists no STIL entry for the +given filename, STILView will print out nothing. Otherwise, you'll +get the STIL entry (or parts of it, as you may have specified it by +other options). HVSC-relative pathnames are case-insensitive, so +/HUBBARD_ROB/Commando.sid is the same as /Hubbard_Rob/Commando.sid. + +Example #1 is the most frequent way of retrieving STIL entries, and +it will return all of the STIL entry for Commando.sid, as well as +the section-global comment for /Hubbard_Rob/. Example #2 is another +valid thing to do: this will return only the section-global comment +for /Hubbard_Rob/. + +=item B<-h> + +Default: NONE Example: stilview -h + +Prints a brief help screen listing the available options. All other +options that are also specified on the command-line are ignored. + +=item B<-f>=I + +Default: all + +Valid values for are: all, name, author, title, artist, +comment + +Example #1: C + +Example #2: C + +Example #3: C + +Asks for one particular field in a STIL entry. Combined with the -t +option, these two options can retrieve any portion of a STIL entry, +including a single field in a specific subtune's entry. Below is +full and complete explanation of what the different possible +combinations of the -t and -f options retrieve: + +C<-t=0 -f=all> : All of the STIL entry is printed. + +C<-t=0 -f=comment> : The file-global comment is printed. For +single-tune entries that have nothing but a COMMENT field in them, +this prints that COMMENT. For single-tune entries that have other +fields in them, this prints nothing. (This is because single-tune +entries with nothing but a COMMENT field are assumed to be +file-global comments.) + +C<< -t=0 -f= >> : Nothing is printed. This +combination of these options is invalid. + +C<< -t= -f=all >> : (Where x is anything but 0.) All fields from the +portion of the STIL entry for the given tune number are +printed. For single-tune entries, asking for -t=1 -f=all is +equivalent to saying -t=0 -f=all, since by definition, the whole +entry refers to only one tune. (However, specifying -t with any +other number than 1 will print nothing!) Note that if there's a +file-global comment in the STIL entry (which also means that if a +single-tune entry has nothing but a COMMENT field in it), that is +B printed with these combinations of options. + +C<< -t= -f= >> : (Where x is anything +but 0.) The specific field from the portion of the STIL entry for +the given tune number is printed. For single-tune entries that have +nothing but a COMMENT in them, this returns nothing. + +Of course, if the STIL entry or any portion of it asked with these +options does not exist, STILView will print nothing. Also, unless +otherwise specified with the -o, -s and -b options, the +section-global comment and the BUG entry of the given SID file will +also get printed (provided they exist). + +In example #1, the file-global comment for /Hubbard_Rob/Delta.sid +is printed, since -t is not specified and is assumed to be 0. Also +printed are the section- global comment and the BUG entry for the +same SID file (if they exist). In example #2, the TITLE field of +the STIL entry for tune #1 of /Hubbard_Rob/Delta.sid is printed +along with the section-global comment and the BUG entry for the +same SID file (if they exist). In example #3, all of the STIL entry +for tune #12 of /Hubbard_Rob/Delta.sid is printed, but nothing +else. + +=item B<-i> + +Default: NONE + +Example: C + +Starts STILView in interactive mode, ignoring all other options +specified on the command-line, except -l, -d and -m. In interactive +mode, you can look for STIL entries by typing them in. You will get +prompted for the desired STIL entry (which has to be specified with +an HVSC-relative pathname), for the tune number requested (which +should be any non-negative number, but this is not enforced), and +finally for the specific STIL field you want to retrieve. + +=item B<-l>=I + +Default: The value of the HVSC_BASE environment variable + +Example #1: C + +Example #2: C + +Example #3: C + +This is where you tell STILView where it can find the HVSC base +directory (the path to the directory has to be specified in the +form required by your operating system, eg. C:\Music\HVSC under +Windows, /home/lala/HVSC under UNIX). STILView will then try to +locate the STIL.txt file in the /DOCUMENTS/ subdirectory of that +directory. If this option is not specified (or if -l is specified +without a base directory), STILView will try to extract the path of +the HVSC base directory from the HVSC_BASE environment variable. If +that environment variable doesn't exist or is pointing to a +location where there's no STIL.txt file in a DOCUMENTS directory, +STILView fails. If the HVSC_BASE environment variable exists and is +valid, and this option is specified, the directory specified with +this option is used as the HVSC base directory instead of the +environment variable. + +In example #1 the HVSC base directory is located in C:\Music\HVSC\ +on the hard drive of a Windows PC, in example #2 it is located in +the HVSC directory of the current directory's parent directory of a +UNIX system. In example #3 the HVSC base directory is not specified +with the option, so it is assumed that the HVSC_BASE environment +variable contains the path to it. In reality, specifying the -l +option in example #3 is redundant, and can be omitted. + +=item B<-m> + +Demo mode + +Default: NONE + +Example #1: C + +Example #2: C + +When specified, it prints out a whole bunch of things that a) test +most of the functionality of STILView, and b) show what STILView is +capable of retrieving from STIL. In example #1, the demo is printed +with the STIL info coming from a default STIL entry, then STILView +quits. In example #2, the demo is printed taking the STIL info from +the specified STIL entry of /Hubbard_Rob/Commando.sid (instead of +the default SID file), then interactive mode is entered. + +=item B<-o> + +Do B print STIL entries + +Default value: Not specified (ie. do print STIL entries) + +Example #1: C + +Example #2: C + +When this option is specified, STIL entries will not be printed for +the given SID tune (but section-global entries and BUG entries will +be printed, provided they exist and other options did not turn +their output off). At a minimum, the -e option has to be specified +for this option to work. Example #1 will print out the +section-global comment and the BUG entry for +/Hubbard_Rob/Delta.sid, example #2 will print out just the +section-global comment for the same SID. + +=item B<-s> + +Do B print section-global comments + +Default value: Not specified (ie. do print section-global entries) + +Example: C + +When this option is specified, section-global entries will not be +printed for the given SID tune. At a minimum, the -e option has to +be specified for this option to work. + +=item B<-t>=I + +Default value: 0 + +Example #1: C + +Example #2: C + +Example #3: C + +Asks for the portion of a STIL entry referring to one particular +tune. If tune number 0 is given, it retrieves all of the entry. +Combined with the -f option, these two options can retrieve any +portion of a STIL entry, including a single field in a specific +subtune's entry. + +For further details about this option, see the explanation of the +-f option. + +Example #1 retrieves all of the STIL entry for +/Hubbard_Rob/Commando.sid, including the section-global comment and +the BUG entry (if any), but since the default value for this option +is 0, it might as well be omitted in this example. Example #2 +retrieves only the TITLE field of the first subtune's entry for +/Hubbard_Rob/Delta.sid (and not the section- global comment or the +BUG entry), while example #3 retrieves all of the STIL entry for +tune #12 of the same SID file (including the section-global comment +and the BUG entry, if any). + +=item B<-v> + +Print version numbers + +Default value: Not specified (ie. do *not* print version numbers) + +Example #1: C + +Example #2: C + +When this option is specified, the version number of the STILView +program and the version number of the STIL.txt file used by it is +printed out. In example #1 this is the only piece of info that gets +printed on the screen, in example #2 the version numbers are +printed out, then the STIL entry for /Hubbard_Rob/Commando.sid is +also printed out. + +=back + + +=head1 ENVIRONMENT + +=over + +=item B + +Specifies the location of the HVSC base directory. + +=back + + +=head1 EXAMPLES + +All of the examples below assume that the HVSC_BASE environment is set +to a valid HVSC base directory (where the F<$HVSC_BASE/DOCUMENTS/STIL.txt> +and F<$HVSC_BASE/DOCUMENTS/BUGlist.txt> files exist), and the examples +also assume the presence of the following entries in these files: + + --- In STIL.txt --- + + /Hubbard_Rob/ + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + + /Hubbard_Rob/Action_Biker.sid + COMMENT: "Action B was a very early game and very conservative in it's approach + - it was my idea of giving them what I thought they wanted, a simple + cute tune....." (RH) + + /Hubbard_Rob/Commando.sid + COMMENT: Tunes #1 and #3 have been converted from arcade version. + + /Hubbard_Rob/Delta.sid + COMMENT: According to Hubbard, Kentilla and Delta were the most complicated one + to compose, they took the longest time to do and they both drove him + insane. + (#1) + TITLE: On the Run [from the Dark Side of the Moon] + ARTIST: Pink Floyd + COMMENT: It is more inspired by it than a remix of it. + (#12) + TITLE: Koyaanisqatsi [from the movie] + ARTIST: Philip Glass + COMMENT: "Inspired by Philip Glass and Pink Floyd." (RH) + + /Hubbard_Rob/International_Karate.sid + TITLE: Merry Christmas, Mr. Lawrence [from the movie] (0:42-1:16) + ARTIST: Ryuichi Sakamoto + COMMENT: "[...] I started exploring pentatonic things in B flat minor over + different bass notes, B flat, D flat, G flat and A flat. The middle + section went into F (I think) at double tempo to liven things up. I + was pleased with the tune......" (RH) + + /Hubbard_Rob/Rasputin.sid + (#1) + TITLE: Katjusha (0:07-0:36) + ARTIST: Matvei Blanter, M. Isakovski + TITLE: Katjusha (2:20) + ARTIST: Matvei Blanter, M. Isakovski + TITLE: Kaljinka (2:41-2:51) + ARTIST: Traditional + COMMENT: Russian folk song. + TITLE: Kaljinka (3:12-3:22) + ARTIST: Traditional + COMMENT: Russian folk song. + (#2) + COMMENT: Russian folk song. + + --- In BUGlist.txt --- + + /Hubbard_Rob/Commando.sid + BUG: This is just for demo. + + /Hubbard_Rob/Delta.sid + (#12) + BUG: Demo entry. + +Given these entries, following are the printouts you can expect from +STILView. ($> denotes a command-line prompt given by your operating +system.) + +Everything related to a SID file is printed: + + $> stilview -e=/Hubbard_Rob/Commando.sid + ---- GLOBAL COMMENT ---- + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + ------ STIL ENTRY ------ + COMMENT: Tunes #1 and #3 have been converted from arcade version. + ---------- BUG ---------- + BUG: This is just for demo. + $> + +Ask for just the section-global comment: + + $> stilview -e=/Hubbard_Rob/ + /Hubbard_Rob/ + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + $> + +Note that this can also be retrieved with: + + $> stilview -e=/Hubbard_Rob/Commando.sid -o -b + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + $> + +This prints out nothing, as single-tune entries do not have file-global +comments: + + $> stilview -e=/Hubbard_Rob/International_Karate.sid -t=0 -f=comment -s -b + $> + +...Except if the only field in them is a COMMENT (in which case that +comment is assumed to be a file-global comment): + + $> stilview -e=/Hubbard_Rob/Action_Biker.sid -t=0 -f=comment -s -b + COMMENT: "Action B was a very early game and very conservative in it's approach + - it was my idea of giving them what I thought they wanted, a simple + cute tune....." (RH) + $> + +Also note that single-tune entries have only one tune, so asking for +the STIL entry of tune #3 is pointless: + + $> stilview -e=/Hubbard_Rob/International_Karate.sid -t=3 -s -b + $> + +Print out the file-global comment for the given SID file: + + $> stilview -e=/Hubbard_Rob/Delta.sid -t=0 -f=comment -s -b + COMMENT: According to Hubbard, Kentilla and Delta were the most complicated one + to compose, they took the longest time to do and they both drove him + insane. + $> + +Print out the ARTIST field of tune #12 of the given SID file, plus +print out everything else related to the SID file: + + $> stilview -e=/Hubbard_Rob/Delta.sid -t=12 -f=artist + ---- GLOBAL COMMENT ---- + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + ------ STIL ENTRY ------ + ARTIST: Philip Glass + ---------- BUG ---------- + BUG: Demo entry. + $> + +Note that the current version of STILView is capable to retrieve only +the first specified field of a tune that covers multiple songs! See +below: + + $> stilview -e=/Hubbard_Rob/Rasputin.sid -t=1 -f=title -s + TITLE: Katjusha (0:07-0:36) + $> + +Section-global comments are printed out even if the STIL entry for the +given SID file does not exist: + + $> stilview -e=/Hubbard_Rob/This_doesnt_exist.sid + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + $> + +The following 4 steps depict how to have STILView print out everything +related to a given SID file's given tune number one by one: + +1) This prints out just the section-global comment: + + $> stilview -e=/Hubbard_Rob/Delta.sid -o -b + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + $> + +2) This prints out just the file-global comment: + + $> stilview -e=/Hubbard_Rob/Delta.sid -t=0 -f=comment -s -b + COMMENT: According to Hubbard, Kentilla and Delta were the most complicated one + to compose, they took the longest time to do and they both drove him + insane. + $> + +3) This prints out all of the STIL entry for the given tune number: + + $> stilview -e=/Hubbard_Rob/Delta.sid -t=12 -f=all -s -b + TITLE: Koyaanisqatsi [from the movie] + ARTIST: Philip Glass + COMMENT: "Inspired by Philip Glass and Pink Floyd." (RH) + $> + +4) And this prints out just the BUG entry for the same tune number: + + $> stilview -e=/Hubbard_Rob/Delta.sid -t=12 -s -o + BUG: Demo entry. + $> + +The following 3 steps depict how to have STILView print out everything +related to a given SID file: + +1) This prints out just the section-global comment: + + $> stilview -e=/Hubbard_Rob/Delta.sid -o -b + COMMENT: All of these tunes have been confirmed by Hubbard to be his. People + have often stolen Hubbard's routine causing some tunes to be falsely + credited to him. + $> + +2) This prints out all of the STIL entry: + + $> stilview -e=/Hubbard_Rob/Delta.sid -s -b + COMMENT: "[...] The Delta music loader and ingame music was Gary Liddon's idea. + [...] He was the producer at Thalamus at the time. He told Rob Hubbard + to make the ingame music like the 2nd track from Dark Side of the Moon + by Pink Floyd." (Info from Matt Furniss.) + "The small jingles are all small clips from Sanxion and Romeo/Juliet + music. They were all supposed to be for short stingers such as end of + level, extra life etc..." + "Delta was based on this minimalist composition technique inspired by + Glass and a bit of Pink Floyd. It was quite hard too do and required + some custom code to the driver to do it. The music was tedious to + debug. The other Delta stuff was more conventional - I quite liked the + other tunes. Delta was spread over a 2 week period....." (RH) + According to Hubbard, Kentilla and Delta were the most complicated one + to compose, they took the longest time to do and they both drove him + insane. + (#1) + TITLE: On the Run [from the Dark Side of the Moon] + ARTIST: Pink Floyd + COMMENT: It is more inspired by it than a remix of it. + (#12) + TITLE: Koyaanisqatsi [from the movie] + ARTIST: Philip Glass + COMMENT: "Inspired by Philip Glass and Pink Floyd." (RH) + $> + +3) And this prints out all of the BUG entry: + + $> stilview -e=/Hubbard_Rob/Delta.sid -s -o + (#12) + BUG: Demo entry. + $> + + +=head1 AUTHORS + +=over + +=item B + +Original author. + +=item B + +Current maintainer. + +=back + + +=head1 RESOURCES + +=over + +=item SourceForge project: L + +=item High Voltage Sid Collection (HVSC): L + +=back + + +=head1 COPYING + +=over + +=item Copyright (C) 1998, 2002 LaLa + +=item Copyright (C) 2012-2016 Leandro Nini + +=back + +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 2 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, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/c64/component.h b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e8/e8d5fbe339ff1a1a71f1826d93c6613b443efb2a.svn-base similarity index 69% rename from Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/c64/component.h rename to Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e8/e8d5fbe339ff1a1a71f1826d93c6613b443efb2a.svn-base index b460ddebf..949f5c084 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/c64/component.h +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e8/e8d5fbe339ff1a1a71f1826d93c6613b443efb2a.svn-base @@ -1,9 +1,9 @@ /* * This file is part of libsidplayfp, a SID player engine. * - * Copyright 2011-2014 Leandro Nini + * Copyright 2011-2015 Leandro Nini * Copyright 2007-2010 Antti Lankila - * Copyright 2001 Simon White + * Copyright 2000 Simon White * * 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 @@ -20,27 +20,29 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#ifndef COMPONENT_H -#define COMPONENT_H +#ifndef MOS6510DEBUG_H +#define MOS6510DEBUG_H -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#ifdef DEBUG + +#include "Event.h" namespace libsidplayfp { -class component +class MOS6510; + +namespace MOS6510Debug { -protected: - virtual uint8_t read(uint_least8_t addr) = 0; - virtual void write(uint_least8_t addr, uint8_t data) = 0; - -public: - virtual void reset() = 0; - -protected: - ~component() {} -}; + void DumpState(event_clock_t time, MOS6510 &cpu); +} } -#endif // COMPONENT_H +#endif // DEBUG + +#endif // MOS6510DEBUG_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e9/e98ac88c78a83a03c70a6f674ed361127122bac2.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e9/e98ac88c78a83a03c70a6f674ed361127122bac2.svn-base new file mode 100644 index 000000000..855679979 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/e9/e98ac88c78a83a03c70a6f674ed361127122bac2.svn-base @@ -0,0 +1,159 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2013 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SIDBUILDER_H +#define SIDBUILDER_H + +#include +#include + +#include "sidplayfp/SidConfig.h" + +namespace libsidplayfp +{ +class sidemu; +class EventScheduler; +} + +/** + * Base class for sid builders. + */ +class sidbuilder +{ +protected: + typedef std::set emuset_t; + +private: + const char * const m_name; + +protected: + std::string m_errorBuffer; + + emuset_t sidobjs; + + bool m_status; + +protected: + /** + * Utility class for setting emu parameters in builders. + */ + template + class applyParameter + { + protected: + Tparam m_param; + void (Temu::*m_method)(Tparam); + + public: + applyParameter(void (Temu::*method)(Tparam), Tparam param) : + m_param(param), + m_method(method) {} + void operator() (libsidplayfp::sidemu *e) { (static_cast(e)->*m_method)(m_param); } + }; + +public: + sidbuilder(const char * const name) : + m_name(name), + m_errorBuffer("N/A"), + m_status(true) {} + virtual ~sidbuilder() {} + + /** + * The number of used devices. + * + * @return number of used sids, 0 if none. + */ + unsigned int usedDevices() const { return sidobjs.size(); } + + /** + * Available devices. + * + * @return the number of available sids, 0 = endless. + */ + virtual unsigned int availDevices() const = 0; + + /** + * Create the sid emu. + * + * @param sids the number of required sid emu + * @return the number of actually created sid emus + */ + virtual unsigned int create(unsigned int sids) = 0; + + /** + * Find a free SID of the required specs + * + * @param env the event context + * @param model the required sid model + * @return pointer to the locked sid emu + */ + libsidplayfp::sidemu *lock(libsidplayfp::EventScheduler *scheduler, SidConfig::sid_model_t model); + + /** + * Release this SID. + * + * @param device the sid emu to unlock + */ + void unlock(libsidplayfp::sidemu *device); + + /** + * Remove all SID emulations. + */ + void remove(); + + /** + * Get the builder's name. + * + * @return the name + */ + const char *name() const { return m_name; } + + /** + * Error message. + * + * @return string error message. + */ + const char *error() const { return m_errorBuffer.c_str(); } + + /** + * Determine current state of object. + * + * @return true = okay, false = error + */ + bool getStatus() const { return m_status; } + + /** + * Get the builder's credits. + * + * @return credits + */ + virtual const char *credits() const = 0; + + /** + * Toggle sid filter emulation. + * + * @param enable true = enable, false = disable + */ + virtual void filter(bool enable) = 0; +}; + +#endif // SIDBUILDER_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/eb/eb6e1bf360f08c7455a990dec7badb512cc1e9be.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/eb/eb6e1bf360f08c7455a990dec7badb512cc1e9be.svn-base new file mode 100644 index 000000000..6cc28cedd --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/eb/eb6e1bf360f08c7455a990dec7badb512cc1e9be.svn-base @@ -0,0 +1,168 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "p00.h" + +#include +#include +#include +#include + +#include "sidplayfp/SidTuneInfo.h" + +#include "SmartPtr.h" +#include "SidTuneTools.h" + +namespace libsidplayfp +{ + +#define X00_ID_LEN 8 +#define X00_NAME_LEN 17 + +// File format from PC64. PC64 automatically generates +// the filename from the cbm name (16 to 8 conversion) +// but we only need to worry about that when writing files +// should we want pc64 compatibility. The extension numbers +// are just an index to try to avoid repeats. Name conversion +// works by creating an initial filename from alphanumeric +// and ' ', '-' characters only with the later two being +// converted to '_'. Then it parses the filename +// from end to start removing characters stopping as soon +// as the filename becomes <= 8. The removal of characters +// occurs in three passes, the first removes all '_', then +// vowels and finally numerics. If the filename is still +// greater than 8 it is truncated. + +struct X00Header +{ + char id[X00_ID_LEN]; // 'C64File' (ASCII) + uint8_t name[X00_NAME_LEN]; // C64 name (PETSCII) + uint8_t length; // Rel files only (Bytes/Record), + // should be 0 for all other types +}; + +typedef enum +{ + X00_DEL, + X00_SEQ, + X00_PRG, + X00_USR, + X00_REL +} X00Format; + +// Format strings +const char TXT_FORMAT_DEL[] = "Unsupported tape image file (DEL)"; +const char TXT_FORMAT_SEQ[] = "Unsupported tape image file (SEQ)"; +const char TXT_FORMAT_PRG[] = "Tape image file (PRG)"; +const char TXT_FORMAT_USR[] = "Unsupported USR file (USR)"; +const char TXT_FORMAT_REL[] = "Unsupported tape image file (REL)"; + +// Magic field +const char P00_ID[] = "C64File"; + + +SidTuneBase* p00::load(const char *fileName, buffer_t& dataBuf) +{ + const char *ext = SidTuneTools::fileExtOfPath(fileName); + + // Combined extension & magic field identification + if (strlen(ext) != 4) + return nullptr; + + if (!isdigit(ext[2]) || !isdigit(ext[3])) + return nullptr; + + const char *format = nullptr; + X00Format type; + + switch (toupper(ext[1])) + { + case 'D': + type = X00_DEL; + format = TXT_FORMAT_DEL; + break; + case 'S': + type = X00_SEQ; + format = TXT_FORMAT_SEQ; + break; + case 'P': + type = X00_PRG; + format = TXT_FORMAT_PRG; + break; + case 'U': + type = X00_USR; + format = TXT_FORMAT_USR; + break; + case 'R': + type = X00_REL; + format = TXT_FORMAT_REL; + break; + default: + return nullptr; + } + + // Verify the file is what we think it is + const buffer_t::size_type bufLen = dataBuf.size(); + if (bufLen < X00_ID_LEN) + return nullptr; + + X00Header pHeader; + memcpy(pHeader.id, &dataBuf[0], X00_ID_LEN); + memcpy(pHeader.name, &dataBuf[X00_ID_LEN], X00_NAME_LEN); + pHeader.length = dataBuf[X00_ID_LEN + X00_NAME_LEN]; + + if (strcmp(pHeader.id, P00_ID)) + return nullptr; + + // File types current supported + if (type != X00_PRG) + throw loadError("Not a PRG inside X00"); + + if (bufLen < sizeof(X00Header) + 2) + throw loadError(ERR_TRUNCATED); + + std::unique_ptr tune(new p00()); + tune->load(format, &pHeader); + + return tune.release(); +} + +void p00::load(const char* format, const X00Header* pHeader) +{ + info->m_formatString = format; + + { // Decode file name + SmartPtr_sidtt spPet(pHeader->name, X00_NAME_LEN); + info->m_infoString.push_back(petsciiToAscii(spPet)); + } + + // Automatic settings + fileOffset = X00_ID_LEN + X00_NAME_LEN + 1; + info->m_songs = 1; + info->m_startSong = 1; + info->m_compatibility = SidTuneInfo::COMPATIBILITY_BASIC; + + // Create the speed/clock setting table. + convertOldStyleSpeedToTables(~0, info->m_clockSpeed); +} + +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ee/ee5ac16e27b44c8ffa8aedf4a623b92488fd924d.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ee/ee5ac16e27b44c8ffa8aedf4a623b92488fd924d.svn-base new file mode 100644 index 000000000..00287eaf9 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ee/ee5ac16e27b44c8ffa8aedf4a623b92488fd924d.svn-base @@ -0,0 +1,174 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SIDTUNE_H +#define SIDTUNE_H + +#include +#include + +#include "sidplayfp/siddefs.h" + +class SidTuneInfo; + +namespace libsidplayfp +{ +class SidTuneBase; +class sidmemory; +} + +/** + * SidTune + */ +class SID_EXTERN SidTune +{ +public: + static const int MD5_LENGTH = 32; + +private: + /// Filename extensions to append for various file types. + static const char** fileNameExtensions; + +private: // ------------------------------------------------------------- + std::auto_ptr tune; + + const char* m_statusString; + + bool m_status; + +public: // ---------------------------------------------------------------- + + /** + * Load a sidtune from a file. + * + * To retrieve data from standard input pass in filename "-". + * If you want to override the default filename extensions use this + * contructor. Please note, that if the specified "fileName" + * does exist and the loader is able to determine its file format, + * this function does not try to append any file name extension. + * See "SidTune.cpp" for the default list of file name extensions. + * You can specify "fileName = 0", if you do not want to + * load a sidtune. You can later load one with open(). + * + * @param fileName + * @param fileNameExt + * @param separatorIsSlash + */ + SidTune(const char* fileName, const char **fileNameExt = 0, + bool separatorIsSlash = false); + + /** + * Load a single-file sidtune from a memory buffer. + * Currently supported: PSID and MUS formats. + * + * @param oneFileFormatSidtune the buffer that contains song data + * @param sidtuneLength length of the buffer + */ + SidTune(const uint_least8_t* oneFileFormatSidtune, uint_least32_t sidtuneLength); + + ~SidTune(); + + /** + * The SidTune class does not copy the list of file name extensions, + * so make sure you keep it. If the provided pointer is 0, the + * default list will be activated. This is a static list which + * is used by all SidTune objects. + * + * @param fileNameExt + */ + void setFileNameExtensions(const char **fileNameExt); + + /** + * Load a sidtune into an existing object from a file. + * + * @param fileName + * @param separatorIsSlash + */ + void load(const char* fileName, bool separatorIsSlash = false); + + /** + * Load a sidtune into an existing object from a buffer. + * + * @param sourceBuffer the buffer that contains song data + * @param bufferLen length of the buffer + */ + void read(const uint_least8_t* sourceBuffer, uint_least32_t bufferLen); + + /** + * Select sub-song. + * + * @param songNum the selected song (0 = default starting song) + * @return active song number, 0 if no tune is loaded. + */ + unsigned int selectSong(unsigned int songNum); + + /** + * Retrieve current active sub-song specific information. + * + * @return a pointer to #SidTuneInfo, 0 if no tune is loaded. The pointer must not be deleted. + */ + const SidTuneInfo* getInfo() const; + + /** + * Select sub-song and retrieve information. + * + * @param songNum the selected song (0 = default starting song) + * @return a pointer to #SidTuneInfo, 0 if no tune is loaded. The pointer must not be deleted. + */ + const SidTuneInfo* getInfo(unsigned int songNum); + + /** + * Determine current state of object. + * Upon error condition use #statusString to get a descriptive + * text string. + * + * @return current state (true = okay, false = error) + */ + bool getStatus() const; + + /** + * Error/status message of last operation. + */ + const char* statusString() const; + + /** + * Copy sidtune into C64 memory (64 KB). + */ + bool placeSidTuneInC64mem(libsidplayfp::sidmemory& mem); + + /** + * Calculates the MD5 hash of the tune. + * Not providing an md5 buffer will cause the internal one to be used. + * If provided, buffer must be MD5_LENGTH + 1 + * + * @return a pointer to the buffer containing the md5 string, 0 if no tune is loaded. + */ + const char *createMD5(char *md5 = 0); + + const uint_least8_t* c64Data() const; + +private: // prevent copying + SidTune(const SidTune&); + SidTune& operator=(SidTune&); +}; + +#endif /* SIDTUNE_H */ diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f3/f33d72eb6f84db9898910aea2133fa46e14f16b3.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f3/f33d72eb6f84db9898910aea2133fa46e14f16b3.svn-base new file mode 100644 index 000000000..a1c83e6ce --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f3/f33d72eb6f84db9898910aea2133fa46e14f16b3.svn-base @@ -0,0 +1,301 @@ +/* + * This file is part of sidplayfp, a console SID player. + * + * Copyright 2012-2016 Leandro Nini + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "keyboard.h" + +#include "sidcxx11.h" + +#ifndef _WIN32 +// Unix console headers +# include +// bzero requires memset on some platforms +# include +# include +# include +# include +# include +# include +# include +int _getch (void); +#endif + +#define MAX_CMDLEN 10 +#define ESC '\033' + +// Special Extended Key Definitions +enum +{ + PCK_HOME = '\107', + PCK_UP = '\110', + PCK_LEFT = '\113', + PCK_RIGHT = '\115', + PCK_END = '\117', + PCK_DOWN = '\120', + PCK_EXTENDED = '\340' +}; + +static char keytable[] = +{ + // Windows Special Cursors +#ifdef _WIN32 + PCK_EXTENDED, PCK_RIGHT,0, A_RIGHT_ARROW, + PCK_EXTENDED, PCK_LEFT,0, A_LEFT_ARROW, + PCK_EXTENDED, PCK_UP,0, A_UP_ARROW, + PCK_EXTENDED, PCK_DOWN,0, A_DOWN_ARROW, + PCK_EXTENDED, PCK_HOME,0, A_HOME, + PCK_EXTENDED, PCK_END,0, A_END, +#else + // Linux Special Keys + ESC,'[','C',0, A_RIGHT_ARROW, + ESC,'[','D',0, A_LEFT_ARROW, + ESC,'[','A',0, A_UP_ARROW, + ESC,'[','B',0, A_DOWN_ARROW, + // Hmm, in consile there: + ESC,'[','1','~',0, A_HOME, + ESC,'[','4','~',0, A_END, + // But in X there: + ESC,'[','H',0, A_HOME, + ESC,'[','F',0, A_END, + + ESC,'[','1','0',0, A_INVALID, + ESC,'[','2','0',0, A_INVALID, +#endif + + /* debug keys. Just use the cursor keys in linux to move in the song */ + '1',0, A_TOGGLE_VOICE1, + '2',0, A_TOGGLE_VOICE2, + '3',0, A_TOGGLE_VOICE3, + '4',0, A_TOGGLE_VOICE4, + '5',0, A_TOGGLE_VOICE5, + '6',0, A_TOGGLE_VOICE6, + '7',0, A_TOGGLE_VOICE7, + '8',0, A_TOGGLE_VOICE8, + '9',0, A_TOGGLE_VOICE9, + 'f',0, A_TOGGLE_FILTER, + + // General Keys + 'p',0, A_PAUSED, + ESC,ESC,0, A_QUIT, + + // Old Keys + '>',0, A_RIGHT_ARROW, + '<',0, A_LEFT_ARROW, + '.',0, A_RIGHT_ARROW, + ',',0, A_LEFT_ARROW, + + 0, A_END_LIST +}; + + +/* + * Search a single command table for the command string in cmd. + */ +static int keyboard_search (char *cmd) +{ + char *p; + char *q; + int a; + + for (p = keytable, q = cmd;; p++, q++) + { + if (*p == *q) + { + /* + * Current characters match. + * If we're at the end of the string, we've found it. + * Return the action code, which is the character + * after the null at the end of the string + * in the command table. + */ + if (*p == '\0') + { + a = *++p & 0377; + while (a == A_SKIP) + a = *++p & 0377; + if (a == A_END_LIST) + { + /* + * We get here only if the original + * cmd string passed in was empty (""). + * I don't think that can happen, + * but just in case ... + */ + break; + } + return (a); + } + } + else if (*q == '\0') + { + /* + * Hit the end of the user's command, + * but not the end of the string in the command table. + * The user's command is incomplete. + */ + return (A_PREFIX); + } + else + { + /* + * Not a match. + * Skip ahead to the next command in the + * command table, and reset the pointer + * to the beginning of the user's command. + */ + if (*p == '\0' && p[1] == A_END_LIST) + { + /* + * A_END_LIST is a special marker that tells + * us to abort the cmd search. + */ + break; + } + while (*p++ != '\0') + continue; + while (*p == A_SKIP) + p++; + q = cmd-1; + } + } + /* + * No match found in the entire command table. + */ + return (A_INVALID); +} + +int keyboard_decode () +{ + char cmd[MAX_CMDLEN+1]; + int nch = 0; + int action = A_NONE; + + /* + * Collect characters in a buffer. + * Start with the one we have, and get more if we need them. + */ + int c = _getch(); + if (c == '\0') + c = '\340'; // 224 + else if (c == ESC) + { + cmd[nch++] = c; + if (_kbhit ()) + c = _getch (); + } + + while (c >= 0) + { + cmd[nch++] = c; + cmd[nch] = '\0'; + action = keyboard_search (cmd); + + if (action != A_PREFIX) + break; + if (!_kbhit ()) + break; + c = _getch (); + } + return action; +} + +// Simulate Standard Microsoft Extensions under Unix +#ifndef _WIN32 + +static int infd = -1; + +int _kbhit (void) +{ + if (infd >= 0) + { // Set no delay + static struct timeval tv = {0, 0}; + fd_set rdfs; + + // See if key has been pressed + FD_ZERO (&rdfs); + FD_SET (infd, &rdfs); + if (select (infd + 1, &rdfs, nullptr, nullptr, &tv) <= 0) + return 0; + if (FD_ISSET (infd, &rdfs)) + return 1; + } + return 0; +} + +int _getch (void) +{ + char ch = -1; + if (infd >= 0) + read (infd, &ch, 1); + return ch; +} + +// Set keyboard to raw mode to getch will work +static termios term; +void keyboard_enable_raw () +{ + // set to non canonical mode, echo off, ignore signals + struct termios current; + + // Already open + if (infd >= 0) + return; + + // Determine if stdin/stderr has been redirected + if (isatty (STDIN_FILENO)) + infd = STDIN_FILENO; + else if (isatty (STDERR_FILENO)) + infd = STDERR_FILENO; + else + { // Try opening a terminal directly + infd = open("/dev/tty", O_RDONLY); + if (infd < 0) + return; + } + + // save current terminal settings + tcgetattr (infd, ¤t); + + // set to non canonical mode, echo off, ignore signals + term = current; + current.c_lflag &= ~(ECHO | ICANON | IEXTEN); + current.c_cc[VMIN] = 1; + current.c_cc[VTIME] = 0; + tcsetattr (infd, TCSAFLUSH, ¤t); +} + +void keyboard_disable_raw () +{ + if (infd >= 0) + { // Restore old terminal settings + tcsetattr (infd, TCSAFLUSH, &term); + switch (infd) + { + case STDIN_FILENO: + case STDERR_FILENO: + break; + default: + close (infd); + } + infd = -1; + } +} + +#endif // HAVE_LINUX diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f4/f416344704491e69717fc88e1c7ca1a491570a72.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f4/f416344704491e69717fc88e1c7ca1a491570a72.svn-base new file mode 100644 index 000000000..72b5b0c86 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f4/f416344704491e69717fc88e1c7ca1a491570a72.svn-base @@ -0,0 +1,53 @@ +sidplayfp +========= + +http://sourceforge.net/projects/sidplay-residfp/ + +sidplayfp is a fork of SIDPLAY2, a C64 music player which integrates +the reSID SID chip emulation into a cycle-based emulator environment, +started with primary purpose to improve emulation of the C64 system +and the SID chips. + +Copyright (c) 2000 Simon White +Copyright (c) 2007-2010 Antti Lankila +Copyright (c) 2010-2016 Leandro Nini + + +NOTE: +----- +ROM dumps are no longer embedded but must be supplied by the user. +The ROMs are optional and most tune should work fine without +but compatibility is not guaranteed. +Check the sidplayfp.ini documentation for configuration details +and default search paths. + + + +stilview +======== + +STILView is a command-line driven program to help you retrieve +the entries stored in STIL fast and accurately. + +Copyright (c) 1998, 2002 by LaLa +Copyright (c) 2013-2016 Leandro Nini + + + +----------------------------------------------------------------------------- + + 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 2 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, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +----------------------------------------------------------------------------- diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f6/f6e9d17965280c8a118a95443d0eddb78fc702dc.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f6/f6e9d17965280c8a118a95443d0eddb78fc702dc.svn-base new file mode 100644 index 000000000..16fdbdbc3 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f6/f6e9d17965280c8a118a95443d0eddb78fc702dc.svn-base @@ -0,0 +1,94 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2012-2015 Leandro Nini + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SIDMD5_H +#define SIDMD5_H + +#include +#include +#include +#include + +#include "utils/md5Factory.h" +#include "utils/iMd5.h" + +#include "sidcxx11.h" + +namespace libsidplayfp +{ + +/** + * A wrapper around the md5 implementation that provides + * an hex formatted digest + */ +class sidmd5 +{ +private: + std::unique_ptr m_md5; + +public: + /** + * @throw md5Error + */ + sidmd5() : + m_md5(md5Factory::get()) + {} + + /** + * Append a string to the message. + */ + void append(const void* data, int nbytes) { m_md5->append(data, nbytes); } + + /** + * Finish the message. + */ + void finish() { m_md5->finish(); } + + /** + * Initialize the algorithm. Reset starting values. + */ + void reset() { m_md5->reset(); } + + /** + * Return pointer to 32-byte hex fingerprint. + */ + std::string getDigest() + { + const unsigned char* digest = m_md5->getDigest(); + if (digest == nullptr) + return std::string(); + + // Construct fingerprint. + std::ostringstream ss; + ss.fill('0'); + ss.flags(std::ios::hex); + + for (int di = 0; di < 16; ++di) + { + ss << std::setw(2) << static_cast(digest[di]); + } + + return ss.str(); + } +}; + +} + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f7/f70fff4c3b32d9f0037efa5a5499dd7810455bb0.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f7/f70fff4c3b32d9f0037efa5a5499dd7810455bb0.svn-base new file mode 100644 index 000000000..150c4b7ef --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f7/f70fff4c3b32d9f0037efa5a5499dd7810455bb0.svn-base @@ -0,0 +1,106 @@ +# Test for std c++11 compiler support +# +# trimmed down verision of AX_CXX_COMPILE_STDCXX_11 +# from the GNU Autoconf Archive +# +# Copyright (c) 2008 Benjamin Kosnik +# Copyright (c) 2012 Zack Weinberg +# Copyright (c) 2013 Roy Stogner +# Copyright (c) 2014 Alexey Sokolov +# Copyright (c) 2014, 2015 Google Inc. +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 7 + +m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ + template + struct check + { + static_assert(sizeof(int) <= sizeof(T), "not big enough"); + }; + + struct Base { + virtual void f() {} + }; + struct Child : public Base { + virtual void f() override {} + }; + + typedef check> right_angle_brackets; + + int a; + decltype(a) b; + + typedef check check_type; + check_type c; + check_type&& cr = static_cast(c); + + auto d = a; + auto l = [](){}; + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this + namespace test_template_alias_sfinae { + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test() { + func(0); + } + } +]]) + +AC_DEFUN([SID_CXX_COMPILE_STDCXX_11], [dnl + AC_LANG_PUSH([C++])dnl + ac_success=no + AC_CACHE_CHECK(whether $CXX supports C++11 features by default, + ax_cv_cxx_compile_cxx11, + [AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [ax_cv_cxx_compile_cxx11=yes], + [ax_cv_cxx_compile_cxx11=no])]) + if test x$ax_cv_cxx_compile_cxx11 = xyes; then + ac_success=yes + fi + + if test x$ac_success = xno; then + cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_-std=c++11]) + AC_CACHE_CHECK(whether $CXX supports C++11 features with -std=c++11, + $cachevar, + [ac_save_CXX="$CXX" + CXX="$CXX -std=c++11" + AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], + [eval $cachevar=yes], + [eval $cachevar=no]) + CXX="$ac_save_CXX"]) + if eval test x\$$cachevar = xyes; then + CXX="$CXX -std=c++11" + ac_success=yes + break + fi + fi + + AC_LANG_POP([C++]) + + if test x$ac_success = xno; then + HAVE_CXX11=0 + AC_MSG_NOTICE([No compiler with C++11 support was found]) + else + HAVE_CXX11=1 + AC_DEFINE(HAVE_CXX11,1, + [define if the compiler supports basic C++11 syntax]) + fi + + AC_SUBST(HAVE_CXX11) +]) diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f8/f82fdd3ea4f9a314f381e98bbd7b32a15f95f7c6.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f8/f82fdd3ea4f9a314f381e98bbd7b32a15f95f7c6.svn-base new file mode 100644 index 000000000..160c1d47c --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f8/f82fdd3ea4f9a314f381e98bbd7b32a15f95f7c6.svn-base @@ -0,0 +1,541 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + + +#include "player.h" + +#include "sidplayfp/SidTune.h" +#include "sidplayfp/sidbuilder.h" + +#include "sidemu.h" +#include "psiddrv.h" +#include "romCheck.h" + +#include "sidcxx11.h" + +namespace libsidplayfp +{ + +// Speed strings +const char TXT_PAL_VBI[] = "50 Hz VBI (PAL)"; +const char TXT_PAL_VBI_FIXED[] = "60 Hz VBI (PAL FIXED)"; +const char TXT_PAL_CIA[] = "CIA (PAL)"; +const char TXT_PAL_UNKNOWN[] = "UNKNOWN (PAL)"; +const char TXT_NTSC_VBI[] = "60 Hz VBI (NTSC)"; +const char TXT_NTSC_VBI_FIXED[] = "50 Hz VBI (NTSC FIXED)"; +const char TXT_NTSC_CIA[] = "CIA (NTSC)"; +const char TXT_NTSC_UNKNOWN[] = "UNKNOWN (NTSC)"; + +// Error Strings +const char ERR_NA[] = "NA"; +const char ERR_UNSUPPORTED_FREQ[] = "SIDPLAYER ERROR: Unsupported sampling frequency."; +const char ERR_UNSUPPORTED_SID_ADDR[] = "SIDPLAYER ERROR: Unsupported SID address."; +const char ERR_UNSUPPORTED_SIZE[] = "SIDPLAYER ERROR: Size of music data exceeds C64 memory."; +const char ERR_INVALID_PERCENTAGE[] = "SIDPLAYER ERROR: Percentage value out of range."; + +/** + * Configuration error exception. + */ +class configError +{ +private: + const char* m_msg; + +public: + configError(const char* msg) : m_msg(msg) {} + const char* message() const { return m_msg; } +}; + +Player::Player() : + // Set default settings for system + m_tune(nullptr), + m_errorString(ERR_NA), + m_isPlaying(STOPPED) +{ +#ifdef PC64_TESTSUITE + m_c64.setTestEnv(this); +#endif + + m_c64.setRoms(nullptr, nullptr, nullptr); + config(m_cfg); + + // Get component credits + m_info.m_credits.push_back(m_c64.cpuCredits()); + m_info.m_credits.push_back(m_c64.ciaCredits()); + m_info.m_credits.push_back(m_c64.vicCredits()); +} + +template +inline void checkRom(const uint8_t* rom, std::string &desc) +{ + if (rom != nullptr) + { + T romCheck(rom); + desc.assign(romCheck.info()); + } + else + desc.clear(); +} + +void Player::setRoms(const uint8_t* kernal, const uint8_t* basic, const uint8_t* character) +{ + checkRom(kernal, m_info.m_kernalDesc); + checkRom(basic, m_info.m_basicDesc); + checkRom(character, m_info.m_chargenDesc); + + m_c64.setRoms(kernal, basic, character); +} + +bool Player::fastForward(unsigned int percent) +{ + if (!m_mixer.setFastForward(percent / 100)) + { + m_errorString = ERR_INVALID_PERCENTAGE; + return false; + } + + return true; +} + +void Player::initialise() +{ + m_isPlaying = STOPPED; + + m_c64.reset(); + + const SidTuneInfo* tuneInfo = m_tune->getInfo(); + + const uint_least32_t size = static_cast(tuneInfo->loadAddr()) + tuneInfo->c64dataLen() - 1; + if (size > 0xffff) + { + throw configError(ERR_UNSUPPORTED_SIZE); + } + + psiddrv driver(m_tune->getInfo()); + if (!driver.drvReloc()) + { + throw configError(driver.errorString()); + } + + m_info.m_driverAddr = driver.driverAddr(); + m_info.m_driverLength = driver.driverLength(); + + driver.install(m_c64.getMemInterface(), videoSwitch); + + if (!m_tune->placeSidTuneInC64mem(m_c64.getMemInterface())) + { + throw configError(m_tune->statusString()); + } + + m_c64.resetCpu(); +} + +bool Player::load(SidTune *tune) +{ + m_tune = tune; + + if (tune != nullptr) + { + // Must re-configure on fly for stereo support! + if (!config(m_cfg, true)) + { + // Failed configuration with new tune, reject it + m_tune = nullptr; + return false; + } + } + return true; +} + +void Player::mute(unsigned int sidNum, unsigned int voice, bool enable) +{ + sidemu *s = m_mixer.getSid(sidNum); + if (s != nullptr) + s->voice(voice, enable); +} + +void Player::run(unsigned int events) +{ + for (unsigned int i = 0; m_isPlaying && i < events; i++) + m_c64.getEventScheduler()->clock(); +} + +uint_least32_t Player::play(short *buffer, uint_least32_t count) +{ + // Make sure a tune is loaded + if (m_tune == nullptr) + return 0; + + // Start the player loop + if (m_isPlaying == STOPPED) + m_isPlaying = PLAYING; + + if (m_isPlaying == PLAYING) + { + m_mixer.begin(buffer, count); + + if (m_mixer.getSid(0) != nullptr) + { + if (count && buffer != nullptr) + { + // Clock chips and mix into output buffer + while (m_isPlaying && m_mixer.notFinished()) + { + run(sidemu::OUTPUTBUFFERSIZE); + + m_mixer.clockChips(); + m_mixer.doMix(); + } + count = m_mixer.samplesGenerated(); + } + else + { + // Clock chips and discard buffers + int size = m_c64.getMainCpuSpeed() / m_cfg.frequency; + while (m_isPlaying && --size) + { + run(sidemu::OUTPUTBUFFERSIZE); + + m_mixer.clockChips(); + m_mixer.resetBufs(); + } + } + } + else + { + // Clock the machine + int size = m_c64.getMainCpuSpeed() / m_cfg.frequency; + while (m_isPlaying && --size) + { + run(sidemu::OUTPUTBUFFERSIZE); + } + } + } + + if (m_isPlaying == STOPPING) + { + try + { + initialise(); + } + catch (configError const &) {} + m_isPlaying = STOPPED; + } + + return count; +} + +void Player::stop() +{ + if (m_tune != nullptr && m_isPlaying == PLAYING) + { + m_isPlaying = STOPPING; + } +} + +bool Player::config(const SidConfig &cfg, bool force) +{ + // Check if configuration have been changed or forced + if (!force && !m_cfg.compare(cfg)) + { + return true; + } + + // Check for base sampling frequency + if (cfg.frequency < 8000) + { + m_errorString = ERR_UNSUPPORTED_FREQ; + return false; + } + + // Only do these if we have a loaded tune + if (m_tune != nullptr) + { + const SidTuneInfo* tuneInfo = m_tune->getInfo(); + + try + { + sidRelease(); + + std::vector addresses; + const uint_least16_t secondSidAddress = tuneInfo->sidChipBase(1) != 0 ? + tuneInfo->sidChipBase(1) : + cfg.secondSidAddress; + if (secondSidAddress != 0) + addresses.push_back(secondSidAddress); + + const uint_least16_t thirdSidAddress = tuneInfo->sidChipBase(2) != 0 ? + tuneInfo->sidChipBase(2) : + cfg.thirdSidAddress; + if (thirdSidAddress != 0) + addresses.push_back(thirdSidAddress); + + // SID emulation setup (must be performed before the + // environment setup call) + sidCreate(cfg.sidEmulation, cfg.defaultSidModel, cfg.forceSidModel, addresses); + + // Determine clock speed + const c64::model_t model = c64model(cfg.defaultC64Model, cfg.forceC64Model); + + m_c64.setModel(model); + + sidParams(m_c64.getMainCpuSpeed(), cfg.frequency, cfg.samplingMethod, cfg.fastSampling); + + // Configure, setup and install C64 environment/events + initialise(); + } + catch (configError const &e) + { + m_errorString = e.message(); + m_cfg.sidEmulation = 0; + if (&m_cfg != &cfg) + { + config(m_cfg); + } + return false; + } + } + + const bool isStereo = cfg.playback == SidConfig::STEREO; + m_info.m_channels = isStereo ? 2 : 1; + + m_mixer.setStereo(isStereo); + m_mixer.setVolume(cfg.leftVolume, cfg.rightVolume); + + // Update Configuration + m_cfg = cfg; + + return true; +} + +// Clock speed changes due to loading a new song +c64::model_t Player::c64model(SidConfig::c64_model_t defaultModel, bool forced) +{ + const SidTuneInfo* tuneInfo = m_tune->getInfo(); + + SidTuneInfo::clock_t clockSpeed = tuneInfo->clockSpeed(); + + c64::model_t model; + + // Use preferred speed if forced or if song speed is unknown + if (forced || clockSpeed == SidTuneInfo::CLOCK_UNKNOWN || clockSpeed == SidTuneInfo::CLOCK_ANY) + { + switch (defaultModel) + { + case SidConfig::PAL: + clockSpeed = SidTuneInfo::CLOCK_PAL; + model = c64::PAL_B; + videoSwitch = 1; + break; + case SidConfig::DREAN: + clockSpeed = SidTuneInfo::CLOCK_PAL; + model = c64::PAL_N; + videoSwitch = 1; // TODO verify + break; + case SidConfig::NTSC: + clockSpeed = SidTuneInfo::CLOCK_NTSC; + model = c64::NTSC_M; + videoSwitch = 0; + break; + case SidConfig::OLD_NTSC: + clockSpeed = SidTuneInfo::CLOCK_NTSC; + model = c64::OLD_NTSC_M; + videoSwitch = 0; + break; + } + } + else + { + switch (clockSpeed) + { + default: + case SidTuneInfo::CLOCK_PAL: + model = c64::PAL_B; + videoSwitch = 1; + break; + case SidTuneInfo::CLOCK_NTSC: + model = c64::NTSC_M; + videoSwitch = 0; + break; + } + } + + switch (clockSpeed) + { + case SidTuneInfo::CLOCK_PAL: + if (tuneInfo->songSpeed() == SidTuneInfo::SPEED_CIA_1A) + m_info.m_speedString = TXT_PAL_CIA; + else if (tuneInfo->clockSpeed() == SidTuneInfo::CLOCK_NTSC) + m_info.m_speedString = TXT_PAL_VBI_FIXED; + else + m_info.m_speedString = TXT_PAL_VBI; + break; + case SidTuneInfo::CLOCK_NTSC: + if (tuneInfo->songSpeed() == SidTuneInfo::SPEED_CIA_1A) + m_info.m_speedString = TXT_NTSC_CIA; + else if (tuneInfo->clockSpeed() == SidTuneInfo::CLOCK_PAL) + m_info.m_speedString = TXT_NTSC_VBI_FIXED; + else + m_info.m_speedString = TXT_NTSC_VBI; + break; + default: + break; + } + + return model; +} + +/** + * Get the SID model. + * + * @param sidModel the tune requested model + * @param defaultModel the default model + * @param forced true if the default model shold be forced in spite of tune model + */ +SidConfig::sid_model_t getSidModel(SidTuneInfo::model_t sidModel, SidConfig::sid_model_t defaultModel, bool forced) +{ + SidTuneInfo::model_t tuneModel = sidModel; + + // Use preferred speed if forced or if song speed is unknown + if (forced || tuneModel == SidTuneInfo::SIDMODEL_UNKNOWN || tuneModel == SidTuneInfo::SIDMODEL_ANY) + { + switch (defaultModel) + { + case SidConfig::MOS6581: + tuneModel = SidTuneInfo::SIDMODEL_6581; + break; + case SidConfig::MOS8580: + tuneModel = SidTuneInfo::SIDMODEL_8580; + break; + default: + break; + } + } + + SidConfig::sid_model_t newModel; + + switch (tuneModel) + { + default: + case SidTuneInfo::SIDMODEL_6581: + newModel = SidConfig::MOS6581; + break; + case SidTuneInfo::SIDMODEL_8580: + newModel = SidConfig::MOS8580; + break; + } + + return newModel; +} + +void Player::sidRelease() +{ + m_c64.clearSids(); + + for (unsigned int i = 0; ; i++) + { + sidemu *s = m_mixer.getSid(i); + if (s == nullptr) + break; + + if (sidbuilder *b = s->builder()) + { + b->unlock(s); + } + } + + m_mixer.clearSids(); +} + +void Player::sidCreate(sidbuilder *builder, SidConfig::sid_model_t defaultModel, + bool forced, const std::vector &extraSidAddresses) +{ + if (builder != nullptr) + { + const SidTuneInfo* tuneInfo = m_tune->getInfo(); + + // Setup base SID + const SidConfig::sid_model_t userModel = getSidModel(tuneInfo->sidModel(0), defaultModel, forced); + sidemu *s = builder->lock(m_c64.getEventScheduler(), userModel); + if (!builder->getStatus()) + { + throw configError(builder->error()); + } + + m_c64.setBaseSid(s); + m_mixer.addSid(s); + + // Setup extra SIDs if needed + if (extraSidAddresses.size() != 0) + { + // If bits 6-7 are set to Unknown then the second SID will be set to the same SID + // model as the first SID. + defaultModel = userModel; + + const unsigned int extraSidChips = extraSidAddresses.size(); + + for (unsigned int i = 0; i < extraSidChips; i++) + { + const SidConfig::sid_model_t userModel = getSidModel(tuneInfo->sidModel(i+1), defaultModel, forced); + + sidemu *s = builder->lock(m_c64.getEventScheduler(), userModel); + if (!builder->getStatus()) + { + throw configError(builder->error()); + } + + if (!m_c64.addExtraSid(s, extraSidAddresses[i])) + throw configError(ERR_UNSUPPORTED_SID_ADDR); + + m_mixer.addSid(s); + } + } + } +} + +void Player::sidParams(double cpuFreq, int frequency, + SidConfig::sampling_method_t sampling, bool fastSampling) +{ + for (unsigned int i = 0; ; i++) + { + sidemu *s = m_mixer.getSid(i); + if (s == nullptr) + break; + + s->sampling((float)cpuFreq, frequency, sampling, fastSampling); + } +} + +#ifdef PC64_TESTSUITE + void Player::load(const char *file) + { + std::string name(PC64_TESTSUITE); + name.append(file); + name.append(".prg"); + + m_tune->load(name.c_str()); + m_tune->selectSong(0); + initialise(); + } +#endif + +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f8/f8c83aab72adf86d17231d59eb45085d5942f285.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f8/f8c83aab72adf86d17231d59eb45085d5942f285.svn-base new file mode 100644 index 000000000..36f8160fd --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f8/f8c83aab72adf86d17231d59eb45085d5942f285.svn-base @@ -0,0 +1,1024 @@ +// --------------------------------------------------------------------------- +// This file is part of reSID, a MOS6581 SID emulator engine. +// Copyright (C) 2010 Dag Lem +// +// 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 2 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, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// --------------------------------------------------------------------------- + +#define RESID_SID_CC + +#ifdef _M_ARM +#undef _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE +#define _ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE 1 +#endif + +#include "sid.h" +#include + +#ifndef round +#define round(x) (x>=0.0?floor(x+0.5):ceil(x-0.5)) +#endif + +namespace reSID +{ + +// ---------------------------------------------------------------------------- +// Constructor. +// ---------------------------------------------------------------------------- +SID::SID() +{ + // Initialize pointers. + sample = 0; + fir = 0; + fir_N = 0; + fir_RES = 0; + fir_beta = 0; + fir_f_cycles_per_sample = 0; + fir_filter_scale = 0; + + sid_model = MOS6581; + voice[0].set_sync_source(&voice[2]); + voice[1].set_sync_source(&voice[0]); + voice[2].set_sync_source(&voice[1]); + + set_sampling_parameters(985248, SAMPLE_FAST, 44100); + + bus_value = 0; + bus_value_ttl = 0; + write_pipeline = 0; +} + + +// ---------------------------------------------------------------------------- +// Destructor. +// ---------------------------------------------------------------------------- +SID::~SID() +{ + delete[] sample; + delete[] fir; +} + + +// ---------------------------------------------------------------------------- +// Set chip model. +// ---------------------------------------------------------------------------- +void SID::set_chip_model(chip_model model) +{ + sid_model = model; + + for (int i = 0; i < 3; i++) { + voice[i].set_chip_model(model); + } + + filter.set_chip_model(model); +} + + +// ---------------------------------------------------------------------------- +// SID reset. +// ---------------------------------------------------------------------------- +void SID::reset() +{ + for (int i = 0; i < 3; i++) { + voice[i].reset(); + } + filter.reset(); + extfilt.reset(); + + bus_value = 0; + bus_value_ttl = 0; +} + + +// ---------------------------------------------------------------------------- +// Write 16-bit sample to audio input. +// Note that to mix in an external audio signal, the signal should be +// resampled to 1MHz first to avoid sampling noise. +// ---------------------------------------------------------------------------- +void SID::input(short sample) +{ + // The input can be used to simulate the MOS8580 "digi boost" hardware hack. + filter.input(sample); +} + + +// ---------------------------------------------------------------------------- +// Read registers. +// +// Reading a write only register returns the last byte written to any SID +// register. The individual bits in this value start to fade down towards +// zero after a few cycles. All bits reach zero within approximately +// $2000 - $4000 cycles. +// It has been claimed that this fading happens in an orderly fashion, however +// sampling of write only registers reveals that this is not the case. +// NB! This is not correctly modeled. +// The actual use of write only registers has largely been made in the belief +// that all SID registers are readable. To support this belief the read +// would have to be done immediately after a write to the same register +// (remember that an intermediate write to another register would yield that +// value instead). With this in mind we return the last value written to +// any SID register for $4000 cycles without modeling the bit fading. +// ---------------------------------------------------------------------------- +reg8 SID::read(reg8 offset) +{ + switch (offset) { + case 0x19: + return potx.readPOT(); + case 0x1a: + return poty.readPOT(); + case 0x1b: + return voice[2].wave.readOSC(); + case 0x1c: + return voice[2].envelope.readENV(); + default: + return bus_value; + } +} + + +// ---------------------------------------------------------------------------- +// Write registers. +// Writes are one cycle delayed on the MOS8580. This is only modeled for +// single cycle clocking. +// ---------------------------------------------------------------------------- +void SID::write(reg8 offset, reg8 value) +{ + write_address = offset; + bus_value = value; + /* + results from real C64 (testprogs/SID/bitfade/delayfrq0.prg): + + (new SID) (250469/8580R5) (250469/8580R5) + delayfrq0 ~7a000 ~108000 + + (old SID) (250407/6581) + delayfrq0 ~01d00 + + */ + if (sid_model == MOS8580) { + bus_value_ttl = 0xa2000; + // One cycle pipeline delay on the MOS8580; delay write. + write_pipeline = 1; + } + else { + bus_value_ttl = 0x1d00; + // No pipeline delay on the MOS6581; write immediately. + write(); + } +} + + +// ---------------------------------------------------------------------------- +// Write registers. +// ---------------------------------------------------------------------------- +void SID::write() +{ + switch (write_address) { + case 0x00: + voice[0].wave.writeFREQ_LO(bus_value); + break; + case 0x01: + voice[0].wave.writeFREQ_HI(bus_value); + break; + case 0x02: + voice[0].wave.writePW_LO(bus_value); + break; + case 0x03: + voice[0].wave.writePW_HI(bus_value); + break; + case 0x04: + voice[0].writeCONTROL_REG(bus_value); + break; + case 0x05: + voice[0].envelope.writeATTACK_DECAY(bus_value); + break; + case 0x06: + voice[0].envelope.writeSUSTAIN_RELEASE(bus_value); + break; + case 0x07: + voice[1].wave.writeFREQ_LO(bus_value); + break; + case 0x08: + voice[1].wave.writeFREQ_HI(bus_value); + break; + case 0x09: + voice[1].wave.writePW_LO(bus_value); + break; + case 0x0a: + voice[1].wave.writePW_HI(bus_value); + break; + case 0x0b: + voice[1].writeCONTROL_REG(bus_value); + break; + case 0x0c: + voice[1].envelope.writeATTACK_DECAY(bus_value); + break; + case 0x0d: + voice[1].envelope.writeSUSTAIN_RELEASE(bus_value); + break; + case 0x0e: + voice[2].wave.writeFREQ_LO(bus_value); + break; + case 0x0f: + voice[2].wave.writeFREQ_HI(bus_value); + break; + case 0x10: + voice[2].wave.writePW_LO(bus_value); + break; + case 0x11: + voice[2].wave.writePW_HI(bus_value); + break; + case 0x12: + voice[2].writeCONTROL_REG(bus_value); + break; + case 0x13: + voice[2].envelope.writeATTACK_DECAY(bus_value); + break; + case 0x14: + voice[2].envelope.writeSUSTAIN_RELEASE(bus_value); + break; + case 0x15: + filter.writeFC_LO(bus_value); + break; + case 0x16: + filter.writeFC_HI(bus_value); + break; + case 0x17: + filter.writeRES_FILT(bus_value); + break; + case 0x18: + filter.writeMODE_VOL(bus_value); + break; + default: + break; + } + + // Tell clock() that the pipeline is empty. + write_pipeline = 0; +} + + +// ---------------------------------------------------------------------------- +// Constructor. +// ---------------------------------------------------------------------------- +SID::State::State() +{ + int i; + + for (i = 0; i < 0x20; i++) { + sid_register[i] = 0; + } + + bus_value = 0; + bus_value_ttl = 0; + write_pipeline = 0; + write_address = 0; + voice_mask = 0xff; + + for (i = 0; i < 3; i++) { + accumulator[i] = 0; + shift_register[i] = 0x7fffff; + shift_register_reset[i] = 0; + shift_pipeline[i] = 0; + pulse_output[i] = 0; + floating_output_ttl[i] = 0; + + rate_counter[i] = 0; + rate_counter_period[i] = 9; + exponential_counter[i] = 0; + exponential_counter_period[i] = 1; + envelope_counter[i] = 0; + envelope_state[i] = EnvelopeGenerator::RELEASE; + hold_zero[i] = true; + envelope_pipeline[i] = 0; + } +} + + +// ---------------------------------------------------------------------------- +// Read state. +// ---------------------------------------------------------------------------- +SID::State SID::read_state() +{ + State state; + int i, j; + + for (i = 0, j = 0; i < 3; i++, j += 7) { + WaveformGenerator& wave = voice[i].wave; + EnvelopeGenerator& envelope = voice[i].envelope; + state.sid_register[j + 0] = wave.freq & 0xff; + state.sid_register[j + 1] = wave.freq >> 8; + state.sid_register[j + 2] = wave.pw & 0xff; + state.sid_register[j + 3] = wave.pw >> 8; + state.sid_register[j + 4] = + (wave.waveform << 4) + | (wave.test ? 0x08 : 0) + | (wave.ring_mod ? 0x04 : 0) + | (wave.sync ? 0x02 : 0) + | (envelope.gate ? 0x01 : 0); + state.sid_register[j + 5] = (envelope.attack << 4) | envelope.decay; + state.sid_register[j + 6] = (envelope.sustain << 4) | envelope.release; + } + + state.sid_register[j++] = filter.fc & 0x007; + state.sid_register[j++] = filter.fc >> 3; + state.sid_register[j++] = (filter.res << 4) | filter.filt; + state.sid_register[j++] = filter.mode | filter.vol; + + // These registers are superfluous, but are included for completeness. + for (; j < 0x1d; j++) { + state.sid_register[j] = read(j); + } + for (; j < 0x20; j++) { + state.sid_register[j] = 0; + } + + state.bus_value = bus_value; + state.bus_value_ttl = bus_value_ttl; + state.write_pipeline = write_pipeline; + state.write_address = write_address; + state.voice_mask = filter.voice_mask; + + for (i = 0; i < 3; i++) { + state.accumulator[i] = voice[i].wave.accumulator; + state.shift_register[i] = voice[i].wave.shift_register; + state.shift_register_reset[i] = voice[i].wave.shift_register_reset; + state.shift_pipeline[i] = voice[i].wave.shift_pipeline; + state.pulse_output[i] = voice[i].wave.pulse_output; + state.floating_output_ttl[i] = voice[i].wave.floating_output_ttl; + + state.rate_counter[i] = voice[i].envelope.rate_counter; + state.rate_counter_period[i] = voice[i].envelope.rate_period; + state.exponential_counter[i] = voice[i].envelope.exponential_counter; + state.exponential_counter_period[i] = voice[i].envelope.exponential_counter_period; + state.envelope_counter[i] = voice[i].envelope.envelope_counter; + state.envelope_state[i] = voice[i].envelope.state; + state.hold_zero[i] = voice[i].envelope.hold_zero; + state.envelope_pipeline[i] = voice[i].envelope.envelope_pipeline; + } + + return state; +} + + +// ---------------------------------------------------------------------------- +// Write state. +// ---------------------------------------------------------------------------- +void SID::write_state(const State& state) +{ + int i; + + for (i = 0; i <= 0x18; i++) { + write(i, state.sid_register[i]); + } + + bus_value = state.bus_value; + bus_value_ttl = state.bus_value_ttl; + write_pipeline = state.write_pipeline; + write_address = state.write_address; + filter.set_voice_mask(state.voice_mask); + + for (i = 0; i < 3; i++) { + voice[i].wave.accumulator = state.accumulator[i]; + voice[i].wave.shift_register = state.shift_register[i]; + voice[i].wave.shift_register_reset = state.shift_register_reset[i]; + voice[i].wave.shift_pipeline = state.shift_pipeline[i]; + voice[i].wave.pulse_output = state.pulse_output[i]; + voice[i].wave.floating_output_ttl = state.floating_output_ttl[i]; + + voice[i].envelope.rate_counter = state.rate_counter[i]; + voice[i].envelope.rate_period = state.rate_counter_period[i]; + voice[i].envelope.exponential_counter = state.exponential_counter[i]; + voice[i].envelope.exponential_counter_period = state.exponential_counter_period[i]; + voice[i].envelope.envelope_counter = state.envelope_counter[i]; + voice[i].envelope.state = state.envelope_state[i]; + voice[i].envelope.hold_zero = state.hold_zero[i]; + voice[i].envelope.envelope_pipeline = state.envelope_pipeline[i]; + } +} + + +// ---------------------------------------------------------------------------- +// Mask for voices routed into the filter / audio output stage. +// Used to physically connect/disconnect EXT IN, and for test purposed +// (voice muting). +// ---------------------------------------------------------------------------- +void SID::set_voice_mask(reg4 mask) +{ + filter.set_voice_mask(mask); +} + + +// ---------------------------------------------------------------------------- +// Enable filter. +// ---------------------------------------------------------------------------- +void SID::enable_filter(bool enable) +{ + filter.enable_filter(enable); +} + + +// ---------------------------------------------------------------------------- +// Adjust the DAC bias parameter of the filter. +// This gives user variable control of the exact CF -> center frequency +// mapping used by the filter. +// The setting is currently only effective for 6581. +// ---------------------------------------------------------------------------- +void SID::adjust_filter_bias(double dac_bias) { + filter.adjust_filter_bias(dac_bias); +} + + +// ---------------------------------------------------------------------------- +// Enable external filter. +// ---------------------------------------------------------------------------- +void SID::enable_external_filter(bool enable) +{ + extfilt.enable_filter(enable); +} + + +// ---------------------------------------------------------------------------- +// I0() computes the 0th order modified Bessel function of the first kind. +// This function is originally from resample-1.5/filterkit.c by J. O. Smith. +// ---------------------------------------------------------------------------- +double SID::I0(double x) +{ + // Max error acceptable in I0. + const double I0e = 1e-6; + + double sum, u, halfx, temp; + int n; + + sum = u = n = 1; + halfx = x/2.0; + + do { + temp = halfx/n++; + u *= temp*temp; + sum += u; + } while (u >= I0e*sum); + + return sum; +} + + +// ---------------------------------------------------------------------------- +// Setting of SID sampling parameters. +// +// Use a clock freqency of 985248Hz for PAL C64, 1022730Hz for NTSC C64. +// The default end of passband frequency is pass_freq = 0.9*sample_freq/2 +// for sample frequencies up to ~ 44.1kHz, and 20kHz for higher sample +// frequencies. +// +// For resampling, the ratio between the clock frequency and the sample +// frequency is limited as follows: +// 125*clock_freq/sample_freq < 16384 +// E.g. provided a clock frequency of ~ 1MHz, the sample frequency can not +// be set lower than ~ 8kHz. A lower sample frequency would make the +// resampling code overfill its 16k sample ring buffer. +// +// The end of passband frequency is also limited: +// pass_freq <= 0.9*sample_freq/2 + +// E.g. for a 44.1kHz sampling rate the end of passband frequency is limited +// to slightly below 20kHz. This constraint ensures that the FIR table is +// not overfilled. +// ---------------------------------------------------------------------------- +bool SID::set_sampling_parameters(double clock_freq, sampling_method method, + double sample_freq, double pass_freq, + double filter_scale) +{ + // Check resampling constraints. + if (method == SAMPLE_RESAMPLE || method == SAMPLE_RESAMPLE_FASTMEM) + { + // Check whether the sample ring buffer would overfill. + if (FIR_N*clock_freq/sample_freq >= RINGSIZE) { + return false; + } + + // The default passband limit is 0.9*sample_freq/2 for sample + // frequencies below ~ 44.1kHz, and 20kHz for higher sample frequencies. + if (pass_freq < 0) { + pass_freq = 20000; + if (2*pass_freq/sample_freq >= 0.9) { + pass_freq = 0.9*sample_freq/2; + } + } + // Check whether the FIR table would overfill. + else if (pass_freq > 0.9*sample_freq/2) { + return false; + } + + // The filter scaling is only included to avoid clipping, so keep + // it sane. + if (filter_scale < 0.9 || filter_scale > 1.0) { + return false; + } + } + + clock_frequency = clock_freq; + sampling = method; + + cycles_per_sample = + cycle_count(clock_freq/sample_freq*(1 << FIXP_SHIFT) + 0.5); + + sample_offset = 0; + sample_prev = 0; + sample_now = 0; + + // FIR initialization is only necessary for resampling. + if (method != SAMPLE_RESAMPLE && method != SAMPLE_RESAMPLE_FASTMEM) + { + delete[] sample; + delete[] fir; + sample = 0; + fir = 0; + return true; + } + + // Allocate sample buffer. + if (!sample) { + sample = new short[RINGSIZE*2]; + } + // Clear sample buffer. + for (int j = 0; j < RINGSIZE*2; j++) { + sample[j] = 0; + } + sample_index = 0; + + const double pi = 3.1415926535897932385; + + // 16 bits -> -96dB stopband attenuation. + const double A = -20*log10(1.0/(1 << 16)); + // A fraction of the bandwidth is allocated to the transition band, + double dw = (1 - 2*pass_freq/sample_freq)*pi*2; + // The cutoff frequency is midway through the transition band (nyquist) + double wc = pi; + + // For calculation of beta and N see the reference for the kaiserord + // function in the MATLAB Signal Processing Toolbox: + // http://www.mathworks.com/access/helpdesk/help/toolbox/signal/kaiserord.html + const double beta = 0.1102*(A - 8.7); + const double I0beta = I0(beta); + + // The filter order will maximally be 124 with the current constraints. + // N >= (96.33 - 7.95)/(2.285*0.1*pi) -> N >= 123 + // The filter order is equal to the number of zero crossings, i.e. + // it should be an even number (sinc is symmetric about x = 0). + int N = int((A - 7.95)/(2.285*dw) + 0.5); + N += N & 1; + + double f_samples_per_cycle = sample_freq/clock_freq; + double f_cycles_per_sample = clock_freq/sample_freq; + + // The filter length is equal to the filter order + 1. + // The filter length must be an odd number (sinc is symmetric about x = 0). + int fir_N_new = int(N*f_cycles_per_sample) + 1; + fir_N_new |= 1; + + // We clamp the filter table resolution to 2^n, making the fixed point + // sample_offset a whole multiple of the filter table resolution. + int res = method == SAMPLE_RESAMPLE ? + FIR_RES : FIR_RES_FASTMEM; + int n = (int)ceil(log(res/f_cycles_per_sample)/log(2.0f)); + int fir_RES_new = 1 << n; + + /* Determine if we need to recalculate table, or whether we can reuse earlier cached copy. + * This pays off on slow hardware such as current Android devices. + */ + if (fir && fir_RES_new == fir_RES && fir_N_new == fir_N && beta == fir_beta && f_cycles_per_sample == fir_f_cycles_per_sample && fir_filter_scale == filter_scale) { + return true; + } + fir_RES = fir_RES_new; + fir_N = fir_N_new; + fir_beta = beta; + fir_f_cycles_per_sample = f_cycles_per_sample; + fir_filter_scale = filter_scale; + + // Allocate memory for FIR tables. + delete[] fir; + fir = new short[fir_N*fir_RES]; + + // Calculate fir_RES FIR tables for linear interpolation. + for (int i = 0; i < fir_RES; i++) { + int fir_offset = i*fir_N + fir_N/2; + double j_offset = double(i)/fir_RES; + // Calculate FIR table. This is the sinc function, weighted by the + // Kaiser window. + for (int j = -fir_N/2; j <= fir_N/2; j++) { + double jx = j - j_offset; + double wt = wc*jx/f_cycles_per_sample; + double temp = jx/(fir_N/2); + double Kaiser = + fabs(temp) <= 1 ? I0(beta*sqrt(1 - temp*temp))/I0beta : 0; + double sincwt = + fabs(wt) >= 1e-6 ? sin(wt)/wt : 1; + double val = + (1 << FIR_SHIFT)*filter_scale*f_samples_per_cycle*wc/pi*sincwt*Kaiser; + fir[fir_offset + j] = (short)round(val); + } + } + + return true; +} + + +// ---------------------------------------------------------------------------- +// Adjustment of SID sampling frequency. +// +// In some applications, e.g. a C64 emulator, it can be desirable to +// synchronize sound with a timer source. This is supported by adjustment of +// the SID sampling frequency. +// +// NB! Adjustment of the sampling frequency may lead to noticeable shifts in +// frequency, and should only be used for interactive applications. Note also +// that any adjustment of the sampling frequency will change the +// characteristics of the resampling filter, since the filter is not rebuilt. +// ---------------------------------------------------------------------------- +void SID::adjust_sampling_frequency(double sample_freq) +{ + cycles_per_sample = + cycle_count(clock_frequency/sample_freq*(1 << FIXP_SHIFT) + 0.5); +} + + +// ---------------------------------------------------------------------------- +// SID clocking - delta_t cycles. +// ---------------------------------------------------------------------------- +void SID::clock(cycle_count delta_t) +{ + int i; + + // Pipelined writes on the MOS8580. + if (unlikely(write_pipeline) && likely(delta_t > 0)) { + // Step one cycle by a recursive call to ourselves. + write_pipeline = 0; + clock(1); + write(); + delta_t -= 1; + } + + if (unlikely(delta_t <= 0)) { + return; + } + + // Age bus value. + bus_value_ttl -= delta_t; + if (unlikely(bus_value_ttl <= 0)) { + bus_value = 0; + bus_value_ttl = 0; + } + + // Clock amplitude modulators. + for (i = 0; i < 3; i++) { + voice[i].envelope.clock(delta_t); + } + + // Clock and synchronize oscillators. + // Loop until we reach the current cycle. + cycle_count delta_t_osc = delta_t; + while (delta_t_osc) { + cycle_count delta_t_min = delta_t_osc; + + // Find minimum number of cycles to an oscillator accumulator MSB toggle. + // We have to clock on each MSB on / MSB off for hard sync to operate + // correctly. + for (i = 0; i < 3; i++) { + WaveformGenerator& wave = voice[i].wave; + + // It is only necessary to clock on the MSB of an oscillator that is + // a sync source and has freq != 0. + if (likely(!(wave.sync_dest->sync && wave.freq))) { + continue; + } + + reg16 freq = wave.freq; + reg24 accumulator = wave.accumulator; + + // Clock on MSB off if MSB is on, clock on MSB on if MSB is off. + reg24 delta_accumulator = + (accumulator & 0x800000 ? 0x1000000 : 0x800000) - accumulator; + + cycle_count delta_t_next = delta_accumulator/freq; + if (likely(delta_accumulator%freq)) { + ++delta_t_next; + } + + if (unlikely(delta_t_next < delta_t_min)) { + delta_t_min = delta_t_next; + } + } + + // Clock oscillators. + for (i = 0; i < 3; i++) { + voice[i].wave.clock(delta_t_min); + } + + // Synchronize oscillators. + for (i = 0; i < 3; i++) { + voice[i].wave.synchronize(); + } + + delta_t_osc -= delta_t_min; + } + + // Calculate waveform output. + for (i = 0; i < 3; i++) { + voice[i].wave.set_waveform_output(delta_t); + } + + // Clock filter. + filter.clock(delta_t, + voice[0].output(), voice[1].output(), voice[2].output()); + + // Clock external filter. + extfilt.clock(delta_t, filter.output()); +} + + +// ---------------------------------------------------------------------------- +// SID clocking with audio sampling. +// Fixed point arithmetics are used. +// +// The example below shows how to clock the SID a specified amount of cycles +// while producing audio output: +// +// while (delta_t) { +// bufindex += sid.clock(delta_t, buf + bufindex, buflength - bufindex); +// write(dsp, buf, bufindex*2); +// bufindex = 0; +// } +// +// ---------------------------------------------------------------------------- +int SID::clock(cycle_count& delta_t, short* buf, int n, int interleave) +{ + switch (sampling) { + default: + case SAMPLE_FAST: + return clock_fast(delta_t, buf, n, interleave); + case SAMPLE_INTERPOLATE: + return clock_interpolate(delta_t, buf, n, interleave); + case SAMPLE_RESAMPLE: + return clock_resample(delta_t, buf, n, interleave); + case SAMPLE_RESAMPLE_FASTMEM: + return clock_resample_fastmem(delta_t, buf, n, interleave); + } +} + + +// ---------------------------------------------------------------------------- +// SID clocking with audio sampling - delta clocking picking nearest sample. +// ---------------------------------------------------------------------------- +int SID::clock_fast(cycle_count& delta_t, short* buf, int n, + int interleave) +{ + int s; + + for (s = 0; s < n; s++) { + cycle_count next_sample_offset = sample_offset + cycles_per_sample + (1 << (FIXP_SHIFT - 1)); + cycle_count delta_t_sample = next_sample_offset >> FIXP_SHIFT; + + if (delta_t_sample > delta_t) { + delta_t_sample = delta_t; + } + + clock(delta_t_sample); + + if ((delta_t -= delta_t_sample) == 0) { + sample_offset -= delta_t_sample << FIXP_SHIFT; + break; + } + + sample_offset = (next_sample_offset & FIXP_MASK) - (1 << (FIXP_SHIFT - 1)); + buf[s*interleave] = output(); + } + + return s; +} + + +// ---------------------------------------------------------------------------- +// SID clocking with audio sampling - cycle based with linear sample +// interpolation. +// +// Here the chip is clocked every cycle. This yields higher quality +// sound since the samples are linearly interpolated, and since the +// external filter attenuates frequencies above 16kHz, thus reducing +// sampling noise. +// ---------------------------------------------------------------------------- +int SID::clock_interpolate(cycle_count& delta_t, short* buf, int n, + int interleave) +{ + int s; + + for (s = 0; s < n; s++) { + cycle_count next_sample_offset = sample_offset + cycles_per_sample; + cycle_count delta_t_sample = next_sample_offset >> FIXP_SHIFT; + + if (delta_t_sample > delta_t) { + delta_t_sample = delta_t; + } + + for (int i = delta_t_sample; i > 0; i--) { + clock(); + if (unlikely(i <= 2)) { + sample_prev = sample_now; + sample_now = output(); + } + } + + if ((delta_t -= delta_t_sample) == 0) { + sample_offset -= delta_t_sample << FIXP_SHIFT; + break; + } + + sample_offset = next_sample_offset & FIXP_MASK; + + buf[s*interleave] = + sample_prev + (sample_offset*(sample_now - sample_prev) >> FIXP_SHIFT); + } + + return s; +} + + +// ---------------------------------------------------------------------------- +// SID clocking with audio sampling - cycle based with audio resampling. +// +// This is the theoretically correct (and computationally intensive) audio +// sample generation. The samples are generated by resampling to the specified +// sampling frequency. The work rate is inversely proportional to the +// percentage of the bandwidth allocated to the filter transition band. +// +// This implementation is based on the paper "A Flexible Sampling-Rate +// Conversion Method", by J. O. Smith and P. Gosset, or rather on the +// expanded tutorial on the "Digital Audio Resampling Home Page": +// http://www-ccrma.stanford.edu/~jos/resample/ +// +// By building shifted FIR tables with samples according to the +// sampling frequency, the implementation below dramatically reduces the +// computational effort in the filter convolutions, without any loss +// of accuracy. The filter convolutions are also vectorizable on +// current hardware. +// +// Further possible optimizations are: +// * An equiripple filter design could yield a lower filter order, see +// http://www.mwrf.com/Articles/ArticleID/7229/7229.html +// * The Convolution Theorem could be used to bring the complexity of +// convolution down from O(n*n) to O(n*log(n)) using the Fast Fourier +// Transform, see http://en.wikipedia.org/wiki/Convolution_theorem +// * Simply resampling in two steps can also yield computational +// savings, since the transition band will be wider in the first step +// and the required filter order is thus lower in this step. +// Laurent Ganier has found the optimal intermediate sampling frequency +// to be (via derivation of sum of two steps): +// 2 * pass_freq + sqrt [ 2 * pass_freq * orig_sample_freq +// * (dest_sample_freq - 2 * pass_freq) / dest_sample_freq ] +// +// NB! the result of right shifting negative numbers is really +// implementation dependent in the C++ standard. +// ---------------------------------------------------------------------------- +int SID::clock_resample(cycle_count& delta_t, short* buf, int n, + int interleave) +{ + int s; + + for (s = 0; s < n; s++) { + cycle_count next_sample_offset = sample_offset + cycles_per_sample; + cycle_count delta_t_sample = next_sample_offset >> FIXP_SHIFT; + + if (delta_t_sample > delta_t) { + delta_t_sample = delta_t; + } + + for (int i = 0; i < delta_t_sample; i++) { + clock(); + sample[sample_index] = sample[sample_index + RINGSIZE] = output(); + ++sample_index &= RINGMASK; + } + + if ((delta_t -= delta_t_sample) == 0) { + sample_offset -= delta_t_sample << FIXP_SHIFT; + break; + } + + sample_offset = next_sample_offset & FIXP_MASK; + + int fir_offset = sample_offset*fir_RES >> FIXP_SHIFT; + int fir_offset_rmd = sample_offset*fir_RES & FIXP_MASK; + short* fir_start = fir + fir_offset*fir_N; + short* sample_start = sample + sample_index - fir_N - 1 + RINGSIZE; + + // Convolution with filter impulse response. + int v1 = 0; + for (int j = 0; j < fir_N; j++) { + v1 += sample_start[j]*fir_start[j]; + } + + // Use next FIR table, wrap around to first FIR table using + // next sample. + if (unlikely(++fir_offset == fir_RES)) { + fir_offset = 0; + ++sample_start; + } + fir_start = fir + fir_offset*fir_N; + + // Convolution with filter impulse response. + int v2 = 0; + for (int k = 0; k < fir_N; k++) { + v2 += sample_start[k]*fir_start[k]; + } + + // Linear interpolation. + // fir_offset_rmd is equal for all samples, it can thus be factorized out: + // sum(v1 + rmd*(v2 - v1)) = sum(v1) + rmd*(sum(v2) - sum(v1)) + int v = v1 + (fir_offset_rmd*(v2 - v1) >> FIXP_SHIFT); + + v >>= FIR_SHIFT; + + // Saturated arithmetics to guard against 16 bit sample overflow. + const int half = 1 << 15; + if (v >= half) { + v = half - 1; + } + else if (v < -half) { + v = -half; + } + + buf[s*interleave] = v; + } + + return s; +} + + +// ---------------------------------------------------------------------------- +// SID clocking with audio sampling - cycle based with audio resampling. +// ---------------------------------------------------------------------------- +int SID::clock_resample_fastmem(cycle_count& delta_t, short* buf, int n, + int interleave) +{ + int s; + + for (s = 0; s < n; s++) { + cycle_count next_sample_offset = sample_offset + cycles_per_sample; + cycle_count delta_t_sample = next_sample_offset >> FIXP_SHIFT; + + if (delta_t_sample > delta_t) { + delta_t_sample = delta_t; + } + + for (int i = 0; i < delta_t_sample; i++) { + clock(); + sample[sample_index] = sample[sample_index + RINGSIZE] = output(); + ++sample_index &= RINGMASK; + } + + if ((delta_t -= delta_t_sample) == 0) { + sample_offset -= delta_t_sample << FIXP_SHIFT; + break; + } + + sample_offset = next_sample_offset & FIXP_MASK; + + int fir_offset = sample_offset*fir_RES >> FIXP_SHIFT; + short* fir_start = fir + fir_offset*fir_N; + short* sample_start = sample + sample_index - fir_N + RINGSIZE; + + // Convolution with filter impulse response. + int v = 0; + for (int j = 0; j < fir_N; j++) { + v += sample_start[j]*fir_start[j]; + } + + v >>= FIR_SHIFT; + + // Saturated arithmetics to guard against 16 bit sample overflow. + const int half = 1 << 15; + if (v >= half) { + v = half - 1; + } + else if (v < -half) { + v = -half; + } + + buf[s*interleave] = v; + } + + return s; +} + +} // namespace reSID diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f9/f9d85f12cc9f6f2a1002964766e77d4b6b0b2de6.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f9/f9d85f12cc9f6f2a1002964766e77d4b6b0b2de6.svn-base new file mode 100644 index 000000000..55f357354 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/f9/f9d85f12cc9f6f2a1002964766e77d4b6b0b2de6.svn-base @@ -0,0 +1,12 @@ +.PHONY: all clean + +# Uncomment to enable parallel processing +#FLAG_OPENMP = -fopenmp + +all: combined + +clean: + $(RM) combined + +%: %.cpp + $(CXX) $(CXXFLAGS) $(FLAG_OPENMP) -std=c++11 $< -o $@ diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fa/fa5740dce5c3b67b311caade66cc50b3cedf3f31.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fa/fa5740dce5c3b67b311caade66cc50b3cedf3f31.svn-base new file mode 100644 index 000000000..8ac37f1d7 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fa/fa5740dce5c3b67b311caade66cc50b3cedf3f31.svn-base @@ -0,0 +1,61 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "SidConfig.h" + +#include "mixer.h" + +#include "sidcxx11.h" + +SidConfig::SidConfig() : + defaultC64Model(PAL), + forceC64Model(false), + defaultSidModel(MOS6581), + forceSidModel(false), + playback(MONO), + frequency(DEFAULT_SAMPLING_FREQ), + secondSidAddress(0), + thirdSidAddress(0), + sidEmulation(nullptr), + leftVolume(libsidplayfp::Mixer::VOLUME_MAX), + rightVolume(libsidplayfp::Mixer::VOLUME_MAX), + powerOnDelay(DEFAULT_POWER_ON_DELAY), + samplingMethod(RESAMPLE_INTERPOLATE), + fastSampling(false) +{} + +bool SidConfig::compare(const SidConfig &config) +{ + return defaultC64Model != config.defaultC64Model + || forceC64Model != config.forceC64Model + || defaultSidModel != config.defaultSidModel + || forceSidModel != config.forceSidModel + || playback != config.playback + || frequency != config.frequency + || secondSidAddress != config.secondSidAddress + || thirdSidAddress != config.thirdSidAddress + || sidEmulation != config.sidEmulation + || leftVolume != config.leftVolume + || rightVolume != config.rightVolume + || samplingMethod != config.samplingMethod + || fastSampling != config.fastSampling; +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fb/fb0ba0b962563bf65f3419cadf2eebfc16daf398.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fb/fb0ba0b962563bf65f3419cadf2eebfc16daf398.svn-base new file mode 100644 index 000000000..9c9e9de43 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fb/fb0ba0b962563bf65f3419cadf2eebfc16daf398.svn-base @@ -0,0 +1,68 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "sidbuilder.h" + +#include + +#include "sidemu.h" + +#include "sidcxx11.h" + +libsidplayfp::sidemu *sidbuilder::lock(libsidplayfp::EventScheduler *env, SidConfig::sid_model_t model) +{ + m_status = true; + + for (emuset_t::iterator it=sidobjs.begin(); it != sidobjs.end(); ++it) + { + libsidplayfp::sidemu *sid = (*it); + if (sid->lock(env)) + { + sid->model(model); + return sid; + } + } + + // Unable to locate free SID + m_status = false; + m_errorBuffer.assign(name()).append(" ERROR: No available SIDs to lock"); + return nullptr; +} + +void sidbuilder::unlock(libsidplayfp::sidemu *device) +{ + emuset_t::iterator it = sidobjs.find(device); + if (it != sidobjs.end()) + { + (*it)->unlock(); + } +} + +template +void Delete(T s) { delete s; } + +void sidbuilder::remove() +{ + std::for_each(sidobjs.begin(), sidobjs.end(), Delete); + + sidobjs.clear(); +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fb/fb5df060f5ad8ac33b09ed041a46d4d55c0940d2.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fb/fb5df060f5ad8ac33b09ed041a46d4d55c0940d2.svn-base new file mode 100644 index 000000000..6b76e6692 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fb/fb5df060f5ad8ac33b09ed041a46d4d55c0940d2.svn-base @@ -0,0 +1,57 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright (C) 2011-2015 Leandro Nini + * Copyright (C) 2009 Antti S. Lankila + * Copyright (C) 2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef EVENTCALLBACK_H +#define EVENTCALLBACK_H + +#include "Event.h" + +#include "sidcxx11.h" + + +namespace libsidplayfp +{ + +template< class This > +class EventCallback final : public Event +{ +private: + typedef void (This::*Callback) (); + +private: + This &m_this; + Callback const m_callback; + +private: + void event() override { (m_this.*m_callback)(); } + +public: + EventCallback(const char* const name, This &object, Callback callback) : + Event(name), + m_this(object), + m_callback(callback) + {} +}; + +} + +#endif // EVENTCALLBACK_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/fe3e548083fa1b0b03e664b87807a64aee73ed29.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/fe3e548083fa1b0b03e664b87807a64aee73ed29.svn-base new file mode 100644 index 000000000..853e47987 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/fe3e548083fa1b0b03e664b87807a64aee73ed29.svn-base @@ -0,0 +1,445 @@ +/* + * This file is part of sidplayfp, a console SID player. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include "player.h" + +#include +#include + +#include +#include + +using std::cout; +using std::cerr; +using std::endl; +using std::dec; +using std::hex; +using std::flush; +using std::setw; +using std::setfill; + +#include +#include + + +// Display console menu +void ConsolePlayer::menu () +{ + if (m_quietLevel > 1) + return; + + const SidInfo &info = m_engine.info (); + const SidTuneInfo *tuneInfo = m_tune.getInfo(); + + // cerr << (char) 12 << '\f'; // New Page + if ((m_iniCfg.console ()).ansi) + { + cerr << '\x1b' << "[40m"; // Background black + cerr << '\x1b' << "[2J"; // Clear screen + cerr << '\x1b' << "[0;0H"; // Move cursor to 0,0 + } + + consoleTable (tableStart); + consoleTable (tableMiddle); + consoleColour (red, true); + cerr << " SID"; + consoleColour (blue, true); + cerr << "PLAYFP"; + consoleColour (white, true); + cerr << " - Music Player and C64 SID Chip Emulator" << endl; + consoleTable (tableMiddle); + consoleColour (white, false); + { + cerr << setw(19) << "Sidplayfp" << " V" << VERSION << ", "; + cerr << (char) toupper (*info.name()); + cerr << info.name() + 1 << " V" << info.version() << endl; + } + + const unsigned int n = tuneInfo->numberOfInfoStrings(); + if (n) + { + consoleTable (tableSeparator); + + consoleTable (tableMiddle); + consoleColour (cyan, true); + cerr << " Title : "; + consoleColour (magenta, true); + cerr << tuneInfo->infoString(0) << endl; + if (n>1) + { + consoleTable (tableMiddle); + consoleColour (cyan, true); + cerr << " Author : "; + consoleColour (magenta, true); + cerr << tuneInfo->infoString(1) << endl; + consoleTable (tableMiddle); + consoleColour (cyan, true); + cerr << " Released : "; + consoleColour (magenta, true); + cerr << tuneInfo->infoString(2) << endl; + } + } + + for (unsigned int i = 0; i < tuneInfo->numberOfCommentStrings(); i++) + { + consoleTable (tableMiddle); + consoleColour (cyan, true); + cerr << " Comment : "; + consoleColour (magenta, true); + cerr << tuneInfo->commentString(i) << endl; + } + + consoleTable (tableSeparator); + + if (m_verboseLevel) + { + consoleTable (tableMiddle); + consoleColour (green, true); + cerr << " File format : "; + consoleColour (white, true); + cerr << tuneInfo->formatString() << endl; + consoleTable (tableMiddle); + consoleColour (green, true); + cerr << " Filename(s) : "; + consoleColour (white, true); + cerr << tuneInfo->dataFileName() << endl; + // Second file is only sometimes present + if (tuneInfo->infoFileName()) + { + consoleTable (tableMiddle); + consoleColour (green, true); + cerr << " : "; + consoleColour (white, true); + cerr << tuneInfo->infoFileName() << endl; + } + consoleTable (tableMiddle); + consoleColour (green, true); + cerr << " Condition : "; + consoleColour (white, true); + cerr << m_tune.statusString() << endl; + +#if HAVE_TSID == 1 + if (!m_tsid) + { + consoleTable (tableMiddle); + consoleColour (green, true); + cerr << " TSID Error : "; + consoleColour (white, true); + cerr << m_tsid.getError () << endl; + } +#endif // HAVE_TSID + } + + consoleTable (tableMiddle); + consoleColour (green, true); + cerr << " Playlist : "; + consoleColour (white, true); + + { // This will be the format used for playlists + int i = 1; + if (!m_track.single) + { + i = m_track.selected; + i -= (m_track.first - 1); + if (i < 1) + i += m_track.songs; + } + cerr << i << '/' << m_track.songs; + cerr << " (tune " << tuneInfo->currentSong() << '/' + << tuneInfo->songs() << '[' + << tuneInfo->startSong() << "])"; + } + + if (m_track.loop) + cerr << " [LOOPING]"; + cerr << endl; + + if (m_verboseLevel) + { + consoleTable (tableMiddle); + consoleColour (green, true); + cerr << " Song Speed : "; + consoleColour (white, true); + cerr << info.speedString() << endl; + } + + consoleTable (tableMiddle); + consoleColour (green, true); + cerr << " Song Length : "; + consoleColour (white, true); + if (m_timer.stop) + cerr << setw(2) << setfill('0') << ((m_timer.stop / 60) % 100) + << ':' << setw(2) << setfill('0') << (m_timer.stop % 60); + else if (m_timer.valid) + cerr << "FOREVER"; + else + cerr << "UNKNOWN"; + if (m_timer.start) + { // Show offset + cerr << " (+" << setw(2) << setfill('0') << ((m_timer.start / 60) % 100) + << ':' << setw(2) << setfill('0') << (m_timer.start % 60) << ")"; + } + cerr << endl; + + if (m_verboseLevel) + { + consoleTable (tableSeparator); + + consoleTable (tableMiddle); + consoleColour (yellow, true); + cerr << " Addresses : " << hex; + cerr.setf(std::ios::uppercase); + consoleColour (white, false); + // Display PSID Driver location + cerr << "DRIVER = "; + if (info.driverAddr() == 0) + cerr << "NOT PRESENT"; + else + { + cerr << "$" << setw(4) << setfill('0') << info.driverAddr(); + cerr << "-$" << setw(4) << setfill('0') << info.driverAddr() + + (info.driverLength() - 1); + } + if (tuneInfo->playAddr() == 0xffff) + cerr << ", SYS = $" << setw(4) << setfill('0') << tuneInfo->initAddr(); + else + cerr << ", INIT = $" << setw(4) << setfill('0') << tuneInfo->initAddr(); + cerr << endl; + consoleTable (tableMiddle); + consoleColour (yellow, true); + cerr << " : "; + consoleColour (white, false); + cerr << "LOAD = $" << setw(4) << setfill('0') << tuneInfo->loadAddr(); + cerr << "-$" << setw(4) << setfill('0') << tuneInfo->loadAddr() + + (tuneInfo->c64dataLen() - 1); + if (tuneInfo->playAddr() != 0xffff) + cerr << ", PLAY = $" << setw(4) << setfill('0') << tuneInfo->playAddr(); + cerr << dec << endl; + cerr.unsetf(std::ios::uppercase); + + consoleTable (tableMiddle); + consoleColour (yellow, true); + cerr << " SID Details : "; + consoleColour (white, false); + cerr << "Filter = " + << ((m_filter.enabled == true) ? "Yes" : "No"); + cerr << ", Model = "; +#if LIBSIDPLAYFP_VERSION_MAJ > 1 || LIBSIDPLAYFP_VERSION_MIN >= 8 + cerr << getModel(tuneInfo->sidModel(0)); +#else + cerr << getModel(tuneInfo->sidModel1()); +#endif + cerr << endl; +#if LIBSIDPLAYFP_VERSION_MAJ > 1 || LIBSIDPLAYFP_VERSION_MIN >= 8 + if (tuneInfo->sidChips() > 1) +#else + if (tuneInfo->isStereo()) +#endif + { + consoleTable (tableMiddle); + consoleColour (yellow, true); + cerr << " : "; + consoleColour (white, false); +#if LIBSIDPLAYFP_VERSION_MAJ > 1 || LIBSIDPLAYFP_VERSION_MIN >= 8 + cerr << "2nd SID = $" << hex << tuneInfo->sidChipBase(1) << dec; + cerr << ", Model = " << getModel(tuneInfo->sidModel(1)); +#else + cerr << "2nd SID = $" << hex << tuneInfo->sidChipBase2() << dec; + cerr << ", Model = " << getModel(tuneInfo->sidModel2()); +#endif + cerr << endl; +#if LIBSIDPLAYFP_VERSION_MAJ > 1 || LIBSIDPLAYFP_VERSION_MIN >= 8 + if (tuneInfo->sidChips() > 2) + { + consoleTable (tableMiddle); + consoleColour (yellow, true); + cerr << " : "; + consoleColour (white, false); + cerr << "3rd SID = $" << hex << tuneInfo->sidChipBase(2) << dec; + cerr << ", Model = " << getModel(tuneInfo->sidModel(2)); + cerr << endl; + } +#endif + } + + if (m_verboseLevel > 1) + { + consoleTable (tableMiddle); + consoleColour (yellow, true); + cerr << " Delay : "; + consoleColour (white, false); + cerr << info.powerOnDelay() << " (cycles at poweron)" << endl; + } + } + + const char* romDesc = info.kernalDesc(); + + consoleTable (tableSeparator); + + consoleTable (tableMiddle); + consoleColour (magenta, true); + cerr << " Kernal ROM : "; + if (strlen(romDesc) == 0) + { + consoleColour (red, false); + cerr << "None - Some tunes may not play!"; + } + else + { + consoleColour (white, false); + cerr << romDesc; + } + cerr << endl; + + romDesc = info.basicDesc(); + + consoleTable (tableMiddle); + consoleColour (magenta, true); + cerr << " BASIC ROM : "; + if (strlen(romDesc) == 0) + { + consoleColour (red, false); + cerr << "None - Basic tunes will not play!"; + } + else + { + consoleColour (white, false); + cerr << romDesc; + } + cerr << endl; + + romDesc = info.chargenDesc(); + + consoleTable (tableMiddle); + consoleColour (magenta, true); + cerr << " Chargen ROM : "; + if (strlen(romDesc) == 0) + { + consoleColour (red, false); + cerr << "None"; + } + else + { + consoleColour (white, false); + cerr << romDesc; + } + cerr << endl; + + consoleTable (tableEnd); + + if (m_driver.file) + cerr << "Creating audio file, please wait..."; + else + cerr << "Playing, press ESC to stop..."; + + // Get all the text to the screen so music playback + // is not disturbed. + if ( !m_quietLevel ) + cerr << "00:00"; + cerr << flush; +} + +// Set colour of text on console +void ConsolePlayer::consoleColour (player_colour_t colour, bool bold) +{ + if ((m_iniCfg.console ()).ansi) + { + const char *mode = ""; + + switch (colour) + { + case black: mode = "30"; break; + case red: mode = "31"; break; + case green: mode = "32"; break; + case yellow: mode = "33"; break; + case blue: mode = "34"; break; + case magenta: mode = "35"; break; + case cyan: mode = "36"; break; + case white: mode = "37"; break; + } + + if (bold) + cerr << '\x1b' << "[1;40;" << mode << 'm'; + else + cerr << '\x1b' << "[0;40;" << mode << 'm'; + } +} + +// Display menu outline +void ConsolePlayer::consoleTable (player_table_t table) +{ + const unsigned int tableWidth = 54; + + consoleColour (white, true); + switch (table) + { + case tableStart: + cerr << (m_iniCfg.console ()).topLeft << setw(tableWidth) + << setfill ((m_iniCfg.console ()).horizontal) << "" + << (m_iniCfg.console ()).topRight; + break; + + case tableMiddle: + cerr << setw(tableWidth + 1) << setfill(' ') << "" + << (m_iniCfg.console ()).vertical << '\r' + << (m_iniCfg.console ()).vertical; + return; + + case tableSeparator: + cerr << (m_iniCfg.console ()).junctionRight << setw(tableWidth) + << setfill ((m_iniCfg.console ()).horizontal) << "" + << (m_iniCfg.console ()).junctionLeft; + break; + + case tableEnd: + cerr << (m_iniCfg.console ()).bottomLeft << setw(tableWidth) + << setfill ((m_iniCfg.console ()).horizontal) << "" + << (m_iniCfg.console ()).bottomRight; + break; + } + + // Move back to begining of row and skip first char + cerr << "\n"; +} + + +// Restore Ansi Console to defaults +void ConsolePlayer::consoleRestore () +{ + if ((m_iniCfg.console ()).ansi) + cerr << '\x1b' << "[0m"; +} + +const char* ConsolePlayer::getModel (SidTuneInfo::model_t model) +{ + switch (model) + { + default: + case SidTuneInfo::SIDMODEL_UNKNOWN: + return "UNKNOWN"; + case SidTuneInfo::SIDMODEL_6581: + return "6581"; + case SidTuneInfo::SIDMODEL_8580: + return "8580"; + case SidTuneInfo::SIDMODEL_ANY: + return "ANY"; + } +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/fe798081fc70f901c992ccf690b310d40bbfc4f6.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/fe798081fc70f901c992ccf690b310d40bbfc4f6.svn-base new file mode 100644 index 000000000..897712d16 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/fe798081fc70f901c992ccf690b310d40bbfc4f6.svn-base @@ -0,0 +1,72 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2013 Leandro Nini + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef MD5_GCRYPT_H +#define MD5_GCRYPT_H + +#define GCRYPT_NO_MPI_MACROS +#define GCRYPT_NO_DEPRECATED + +#include "iMd5.h" + +#include "sidcxx11.h" + +#include + +namespace libsidplayfp +{ + +class md5Gcrypt final : public iMd5 +{ +private: + gcry_md_hd_t hd; + +public: + md5Gcrypt() + { + if (gcry_check_version(GCRYPT_VERSION) == 0) + throw md5Error(); + + // Disable secure memory. + if (gcry_control(GCRYCTL_DISABLE_SECMEM, 0) != 0) + throw md5Error(); + + // Tell Libgcrypt that initialization has completed. + if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0) != 0) + throw md5Error(); + + if (gcry_md_open(&hd, GCRY_MD_MD5, 0) != 0) + throw md5Error(); + } + + ~md5Gcrypt() { gcry_md_close(hd); } + + void append(const void* data, int nbytes) override { gcry_md_write(hd, data, nbytes); } + + void finish() override { gcry_md_final(hd); } + + const unsigned char* getDigest() override { return gcry_md_read(hd, 0); } + + void reset() override { gcry_md_reset(hd); } +}; + +} + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/feb1d4ec7ca9205ee333dd74cb187a10324a235f.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/feb1d4ec7ca9205ee333dd74cb187a10324a235f.svn-base new file mode 100644 index 000000000..b6f9c3941 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/fe/feb1d4ec7ca9205ee333dd74cb187a10324a235f.svn-base @@ -0,0 +1,66 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2012-2013 Leandro Nini + * Copyright 2010 Antti Lankila + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef COLORRAMBANK_H +#define COLORRAMBANK_H + +#include +#include + +#include "Bank.h" + +#include "sidcxx11.h" + +namespace libsidplayfp +{ + +/** + * Color RAM. + * + * 1K x 4-bit Static RAM that stores text screen color information. + * + * Located at $D800-$DBFF (last 24 bytes are unused) + */ +class ColorRAMBank final : public Bank +{ +private: + uint8_t ram[0x400]; + +public: + void reset() + { + memset(ram, 0, sizeof(ram)); + } + + void poke(uint_least16_t address, uint8_t value) override + { + ram[address & 0x3ff] = value & 0xf; + } + + uint8_t peek(uint_least16_t address) override + { + return ram[address & 0x3ff]; + } +}; + +} + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ff/ffb80bef01244cfd0d71d53bdb7f2972621f5b09.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ff/ffb80bef01244cfd0d71d53bdb7f2972621f5b09.svn-base new file mode 100644 index 000000000..85efcf39f --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ff/ffb80bef01244cfd0d71d53bdb7f2972621f5b09.svn-base @@ -0,0 +1,114 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef FLAGS_H +#define FLAGS_H + +#include + +namespace libsidplayfp +{ + +/** + * Processor Status Register + */ +class Flags +{ +private: + bool C; ///< Carry + bool Z; ///< Zero + bool I; ///< Interrupt disabled + bool D; ///< Decimal + bool B; ///< Break + bool V; ///< Overflow + bool N; ///< Negative + +public: + inline void reset() + { + C = Z = I = D = V = N = false; + B = true; + } + + /** + * Set N and Z flag values. + * + * @param value to set flags from + */ + inline void setNZ(uint8_t value) + { + Z = value == 0; + N = value & 0x80; + } + + /** + * Get status register value. + */ + inline uint8_t get() + { + uint8_t sr = 0x20; + + if (C) sr |= 0x01; + if (Z) sr |= 0x02; + if (I) sr |= 0x04; + if (D) sr |= 0x08; + if (B) sr |= 0x10; + if (V) sr |= 0x40; + if (N) sr |= 0x80; + + return sr; + } + + /** + * Set status register value. + */ + inline void set(uint8_t sr) + { + C = sr & 0x01; + Z = sr & 0x02; + I = sr & 0x04; + D = sr & 0x08; + B = sr & 0x10; + V = sr & 0x40; + N = sr & 0x80; + } + + inline bool getN() const { return N; } + inline bool getC() const { return C; } + inline bool getD() const { return D; } + inline bool getZ() const { return Z; } + inline bool getV() const { return V; } + inline bool getI() const { return I; } + inline bool getB() const { return B; } + + inline void setN(bool f) { N = f; } + inline void setC(bool f) { C = f; } + inline void setD(bool f) { D = f; } + inline void setZ(bool f) { Z = f; } + inline void setV(bool f) { V = f; } + inline void setI(bool f) { I = f; } + inline void setB(bool f) { B = f; } +}; + +} + +#endif diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ff/ffc6d6686bf5526cc2cf4b0ba309b7572bd4964b.svn-base b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ff/ffc6d6686bf5526cc2cf4b0ba309b7572bd4964b.svn-base new file mode 100644 index 000000000..c1a7a9102 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/.svn/pristine/ff/ffc6d6686bf5526cc2cf4b0ba309b7572bd4964b.svn-base @@ -0,0 +1,175 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2000-2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef SIDCONFIG_H +#define SIDCONFIG_H + +#include + +#include "sidplayfp/siddefs.h" + + +class sidbuilder; + +/** + * SidConfig + * + * An instance of this class is used to transport emulator settings + * to and from the interface class. + */ +class SID_EXTERN SidConfig +{ +public: + /// Playback mode + typedef enum + { + MONO = 1, + STEREO + } playback_t; + + /// SID chip model + typedef enum + { + MOS6581, + MOS8580 + } sid_model_t; + + /// C64 model + typedef enum + { + PAL, + NTSC, + OLD_NTSC, + DREAN + } c64_model_t; + + /// Sampling method + typedef enum + { + INTERPOLATE, + RESAMPLE_INTERPOLATE + } sampling_method_t; + +public: + /** + * Maximum power on delay. + * - Delays <= MAX produce constant results + * - Delays > MAX produce random results + */ + SID_DEPRECATED static const uint_least16_t MAX_POWER_ON_DELAY = 0x1FFF; + SID_DEPRECATED static const uint_least16_t DEFAULT_POWER_ON_DELAY = MAX_POWER_ON_DELAY + 1; + + static const uint_least32_t DEFAULT_SAMPLING_FREQ = 44100; + +public: + /** + * Intended c64 model when unknown or forced. + * - PAL + * - NTSC + * - OLD_NTSC + * - DREAN + */ + c64_model_t defaultC64Model; + + /** + * Force the model to #defaultC64Model ignoring tune's clock setting. + */ + bool forceC64Model; + + /** + * Intended sid model when unknown or forced. + * - MOS6581 + * - MOS8580 + */ + sid_model_t defaultSidModel; + + /** + * Force the sid model to #defaultSidModel. + */ + bool forceSidModel; + + /** + * Playbak mode. + * - MONO + * - STEREO + */ + playback_t playback; + + /** + * Sampling frequency. + */ + uint_least32_t frequency; + + /** + * Extra SID chips addresses. + */ + //@{ + uint_least16_t secondSidAddress; + uint_least16_t thirdSidAddress; + //@} + + /** + * Pointer to selected emulation, + * reSIDfp, reSID or hardSID. + */ + sidbuilder *sidEmulation; + + /** + * Left channel volume. + */ + uint_least32_t leftVolume; + + /** + * Right channel volume. + */ + uint_least32_t rightVolume; + + /** + * Power on delay cycles. + */ + SID_DEPRECATED uint_least16_t powerOnDelay; + + /** + * Sampling method. + * - INTERPOLATE + * - RESAMPLE_INTERPOLATE + */ + sampling_method_t samplingMethod; + + /** + * Faster low-quality emulation, + * available only for reSID. + */ + bool fastSampling; + + /** + * Compare two config objects. + * + * @return true if different + */ + bool compare(const SidConfig &config); + +public: + SidConfig(); +}; + +#endif // SIDCONFIG_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/.svn/wc.db b/Frameworks/libsidplay/sidplay-residfp-code/.svn/wc.db index 0332dd89f4c4df3b0e7c2997f63156ede4d20cbe..18faf98cea817b39b56c84ecb1c30cf48a2efb7b 100644 GIT binary patch delta 94613 zcmc${2YeJ&9tXbj-fVC5gq8%PLz0=D-Ps*l2)#%XX%fop>?|NH^ll88#CD3JKF>Q9 z&R$TkMNcf8o~LKSj-m*9_5z+~Z~yO`Nj4i?HUCaN?C#9G_j_et`IYbQ_s)K_^Vz!! zcXV=v2RR&$t(O!H<-dyG_w7raT}J4FyWcM>nBr*{z5q`hr|b;uDDZ`^3tt^(;Y-37 z+#TI9GhBcN8*9hnv!s^)UR|>WpOrP^@wvRFXy+~0&N>A@1HmN0*UHeQ(1_5-!DPr6 zd@1~7ct_~2aQE=+;8l0`*flgLBE@F*P+uDL;MXdJE+%Y;PD|X5Jz?A!&03!>Dm+mc zyYmAYb%yY>7u!CIST}pJZ%-xBVYs)2=j^e1kuLYp<7!gTWj!TFWiuL)^<*-kM|4F^ zMRh3|O(e{?l!&EM)Q^0MRpQUp&Qj-k;ZJ$|_nM>)6s~^~U8!vDKI9rTW6vMa&{>rN8zq>KcPS z6n&1QO>~vHY{fdWD54gXtX{Xgbj`BL(rJrRr>|XZ4%b(kC5uXM2N~$=j_TpRSq)Bh zP(wAOKc=-l*Zb($YvS~2CE4$U4(5IIJFPi>n0l&EIr4)e-Mlr4+^xYtYG@C6(s6pT zEV9;=1szd5efFlQr;X#puW?i-nzwxE;^gYZsmi7L#&jhMzDR@2>Reu(Xr>o_n_&5` zn}3)Vbj^B=#O2t~yh!UEo-$?HxRK4eNceZ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T5;)a|5VuP`3nJ- z=kfX~I|RBJhXKvONtSQHV)9fdABo# - * Copyright 2007-2010 Antti Lankila - * - * 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 2 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, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ - -#include -#include -#include -#include -#include -#include -#include -#include - -#include "parameters.h" - -static double randomNextDouble() -{ - return static_cast(rand()) / static_cast(RAND_MAX); -} - -static float GetRandomValue() -{ - const float t = 1.f - (float) randomNextDouble() * 0.9f; - return (randomNextDouble() > 0.5) ? 1.f / t : t; -} - -static void Optimize(const std::vector &reference, int wave, char chip) -{ - Parameters bestparams; - if (chip == 'D') - { - switch (wave) - { - case 3: - // current score 2740 - bestparams.bias = 0.987103f; - bestparams.pulsestrength = 0.f; - bestparams.topbit = 0.f; - bestparams.distance = 37.294f; - bestparams.stmix = 0.783281f; - break; - case 5: - // current score 18404 - bestparams.bias = 0.888048f; - bestparams.pulsestrength = 2.26606f; - bestparams.topbit = 0.99697f; - bestparams.distance = 0.0422943f; - bestparams.stmix = 0.f; - break; - case 6: - // current score 18839 - bestparams.bias = 0.886823f; - bestparams.pulsestrength = 2.35161f; - bestparams.topbit = 1.77758f; - bestparams.distance = 0.0236612f; - bestparams.stmix = 0.f; - break; - case 7: - // current score 428 - bestparams.bias = 0.928903f; - bestparams.pulsestrength = 1.4555f; - bestparams.topbit = 0.f; - bestparams.distance = 0.0791919f; - bestparams.stmix = 0.905484f; - break; - } - } - if (chip == 'E') - { - switch (wave) - { - case 3: - // current score 721 - bestparams.bias = 0.957552f; - bestparams.pulsestrength = 0.f; - bestparams.topbit = 0.f; - bestparams.distance = 1.80014f; - bestparams.stmix = 0.698112f; - break; - case 5: - // current score 5552 - bestparams.bias = 0.916105f; - bestparams.pulsestrength = 1.93374f; - bestparams.topbit = 1.00139f; - bestparams.distance = 0.0211841f; - bestparams.stmix = 0.f; - break; - case 6: - // current score 12 - bestparams.bias = 0.935096f; - bestparams.pulsestrength = 2.64471f; - bestparams.topbit = 0.f; - bestparams.distance = 0.00538012f; - bestparams.stmix = 0.f; - break; - case 7: - // current score 120 - bestparams.bias = 0.900499f; - bestparams.pulsestrength = 0.f; - bestparams.topbit = 0.f; - bestparams.distance = 0.f; - bestparams.stmix = 1.f; - break; - } - } - if (chip == 'G') - { - switch (wave) - { - case 3: - // current score 1741 - bestparams.bias = 0.880592f; - bestparams.pulsestrength = 0.f; - bestparams.topbit = 0.f; - bestparams.distance = 0.327589f; - bestparams.stmix = 0.611491f; - break; - case 5: - // current score 11418 - bestparams.bias = 0.892438f; - bestparams.pulsestrength = 2.00995f; - bestparams.topbit = 1.00392f; - bestparams.distance = 0.0298894f; - bestparams.stmix = 0.f; - break; - case 6: - // current score 21096 - bestparams.bias = 0.863292f; - bestparams.pulsestrength = 1.69239f; - bestparams.topbit = 1.12637f; - bestparams.distance = 0.0335683f; - bestparams.stmix = 0.f; - break; - case 7: - // current score 78 - bestparams.bias = 0.930481f; - bestparams.pulsestrength = 1.42322f; - bestparams.topbit = 0.f; - bestparams.distance = 0.0481732f; - bestparams.stmix = 0.752611f; - break; - } - } - if (chip == 'V') - { - switch (wave) - { - case 3: - // current score 5339 - bestparams.bias = 0.979807f; - bestparams.pulsestrength = 0.f; - bestparams.topbit = 0.990736f; - bestparams.distance = 9.22678f; - bestparams.stmix = 0.824563f; - break; - case 5: - // current score 18507 - bestparams.bias = 0.909646f; - bestparams.pulsestrength = 2.03944f; - bestparams.topbit = 0.958471f; - bestparams.distance = 0.175597f; - bestparams.stmix = 0.f; - break; - case 6: - // current score 16763 - bestparams.bias = 0.918338f; - bestparams.pulsestrength = 2.41154f; - bestparams.topbit = 0.927047f; - bestparams.distance = 0.171891f; - bestparams.stmix = 0.f; - break; - case 7: - // current score 3199 - bestparams.bias = 0.984532f; - bestparams.pulsestrength = 1.53602f; - bestparams.topbit = 0.961933f; - bestparams.distance = 3.46871f; - bestparams.stmix = 0.803955f; - break; - } - } - if (chip == 'W') - { - switch (wave) - { - case 3: - // current score 6648 - bestparams.bias = 0.986102f; - bestparams.pulsestrength = 0.f; // 458120 - bestparams.topbit = 0.995344f; - bestparams.distance = 8.64964f; - bestparams.stmix = 0.957502f; - break; - case 5: - // current score 24634 - bestparams.bias = 0.906838f; - bestparams.pulsestrength = 2.23245f; - bestparams.topbit = 0.958234f; - bestparams.distance = 0.205228f; - bestparams.stmix = 0.0475253f; - break; - case 6: - // current score 22693 - bestparams.bias = 0.889691f; - bestparams.pulsestrength = 1.64253f; - bestparams.topbit = 0.977121f; - bestparams.distance = 0.293443f; - bestparams.stmix = 0.f; // 4.65769e-013 - break; - case 7: - // current score 5182 - bestparams.bias = 0.956644f; - bestparams.pulsestrength = 1.50249f; - bestparams.topbit = 0.943326f; - bestparams.distance = 0.520891f; - bestparams.stmix = 0.956507f; - break; - } - } - - int bestscore = bestparams.Score(wave, reference, true, 4096 * 255); - std::cout << "# initial score " << bestscore << std::endl << std::endl; - - Parameters p; - for (;;) - { - bool changed = false; - while (! changed) - { - for (int i = Parameters::BIAS; i <= Parameters::STMIX; i++) - { - const float oldValue = bestparams.GetValue(i); - float newValue = oldValue; - if (randomNextDouble() > 0.5) - { - newValue *= GetRandomValue(); - - if ((i == Parameters::STMIX) && (newValue > 1.f)) - { - newValue = 1.f; - } - } - - p.SetValue(i, newValue); - changed = changed || oldValue != newValue; - } - } - const int score = p.Score(wave, reference, false, bestscore); - /* accept if improvement */ - if (score <= bestscore) - { - bestparams = p; - p.reset(); - bestscore = score; - std::cout << "# current score " << score << std::endl << bestparams.toString() << std::endl << std::endl; - } - } -} - -static std::vector split(const std::string &s, char delim) -{ - std::vector elems; - std::istringstream ss(s); - std::string item; - while (std::getline(ss, item, delim)) - { - elems.push_back(item); - } - return elems; -} - -static std::vector ReadChip(int wave, char chip) -{ - std::cout << "Reading chip: " << chip << std::endl; - std::vector result; - - std::ostringstream fileName; - fileName << "sidwaves/WAVE" << wave << ".CSV"; - std::ifstream ifs(fileName.str().c_str(), std::ifstream::in); - std::string line; - while (getline(ifs, line).good()) - { - std::vector values = split(line, ','); - result.push_back(atoi(values[chip - 'A'].c_str())); - } - return result; -} - -int main(int argc, const char* argv[]) -{ - if (argc != 3) - { - std::cout << "Usage " << argv[0] << " " << std::endl; - exit(-1); - } - - const int wave = atoi(argv[1]); - assert(wave == 3 || wave == 5 || wave == 6 || wave == 7); - - const char chip = argv[2][0]; - assert(chip >= 'A' && chip <= 'Z'); - - std::vector reference = ReadChip(wave, chip); - -#ifndef NDEBUG - for (std::vector::iterator it = reference.begin(); it != reference.end(); ++it) - std::cout << (*it) << std::endl; -#endif - - srand(time(0)); - - Optimize(reference, wave, chip); -} +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2013-2016 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "parameters.h" + + +static const float EPSILON = 1e-3; + +#ifdef __MINGW32__ +// MinGW's std::random_device is a PRNG seeded with a constant value +// so we use system time as a random seed. +#include +inline long getSeed() +{ + using namespace std::chrono; + const auto now_ms = time_point_cast(system_clock::now()); + return now_ms.time_since_epoch().count(); +} +#else +inline long getSeed() +{ + return std::random_device{}(); +} +#endif + +static std::default_random_engine prng(getSeed()); +static std::normal_distribution<> normal_dist(1.0, 0.001); +static std::normal_distribution<> normal_dist2(0.5, 0.2); + +static double GetRandomValue() +{ + return normal_dist(prng); +} + +static float GetNewRandomValue() +{ + return static_cast(normal_dist2(prng)); +} + +static void Optimize(const ref_vector_t &reference, int wave, char chip) +{ + Parameters bestparams; + + /* + * The score here reported is the acoustic error. + * In parentheses the number of mispredicted bits + * on a total of 32768. + */ + switch (chip) + { + // 6581 R2 + case 'B': + switch (wave) + { + case 3: // ST + // current score 152 (57) + bestparams.threshold = 0.988547385f; + bestparams.topbit = 0.f; + bestparams.distance1 = 5.58014059f; + bestparams.distance2 = 5.4269886f; + bestparams.stmix = 0.806023061f; + break; + case 5: // PT + // current score 2872 (154) + bestparams.threshold = 0.984531879f; + bestparams.pulsestrength = 3.03670526f; + bestparams.distance1 = 0.99342072f; + bestparams.distance2 = 1.11435139f; + break; + case 6: // PS + // current score 0 + bestparams.threshold = 0.906437993f; + bestparams.pulsestrength = 2.11317873f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.130663797f; + bestparams.distance2 = 0.0835102722f; + break; + case 7: // PST + // current score 0 + bestparams.threshold = 0.924151242f; + bestparams.pulsestrength = 1.16428149f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.920196056f; + bestparams.distance2 = 1.07491302f; + bestparams.stmix = 0.793505609f; + break; + } + break; + // 6581 R2 (odd) + case 'C': + switch (wave) + { + case 3: + // current score 2948 (446) + bestparams.threshold = 0.881458f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.93176f; + 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; + 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; + break; + case 7: + // current score 850 (60) + bestparams.threshold = 0.919113517f; + bestparams.pulsestrength = 1.62892509f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.21794045f; + bestparams.distance2 = 1.2279855f; + bestparams.stmix = 0.896797657f; + break; + } + break; + // 6581 R2 (odd) + case 'D': + switch (wave) + { + case 3: + // current score 1958 (302) + bestparams.threshold = 0.861116648f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.582165f; + bestparams.distance2 = 2.23844433f; + 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; + 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; + break; + case 7: + // current score 258 (64) + bestparams.threshold = 0.91076839f; + bestparams.pulsestrength = 1.2814858f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.17647922f; + bestparams.distance2 = 1.18998444f; + bestparams.stmix = 0.771969795f; + break; + } + break; + // 6581 R2 + case 'E': + switch (wave) + { + case 3: + // current score 297 (98) + bestparams.threshold = 0.989183f; + bestparams.topbit = 0.f; + bestparams.distance1 = 5.75852f; + bestparams.stmix = 0.800831f; + break; + case 5: + // current score 3348 (146) + bestparams.threshold = 0.91292721f; + bestparams.pulsestrength = 1.83235359f; + bestparams.distance1 = 1.12143898f; + bestparams.distance2 = 1.12768865f; + break; + case 6: + // current score 8 (6) + bestparams.threshold = 0.91496712f; + bestparams.pulsestrength = 2.28155446f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.122848086f; + bestparams.distance2 = 0.0706237406f; + break; + case 7: + // current score 0 + bestparams.threshold = 0.970328987f; + bestparams.pulsestrength = 1.75902855f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.21010804f; + bestparams.distance2 = 1.269436f; + bestparams.stmix = 0.983422756f; + break; + } + break; + // 6581 R2 + case 'F': + switch (wave) + { + case 3: + // current score 240 (64) + bestparams.threshold = 0.99254179f; + bestparams.topbit = 0.001f; + bestparams.distance1 = 7.18324232f; + bestparams.distance2 = 6.00581455f; + bestparams.stmix = 0.841992021f; + break; + case 5: + // current score 3008 (57) + bestparams.threshold = 0.959230483f; + bestparams.pulsestrength = 2.74101543f; + bestparams.distance1 = 1.00775206f; + bestparams.distance2 = 1.11247838f; + break; + case 6: + // current score 432 (12) + bestparams.threshold = 0.902768612f; + bestparams.pulsestrength = 2.06190324f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.150018558f; + 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; + break; + } + break; + // 6581 R2 (odd) + case 'G': + switch (wave) + { + case 3: + // current score 1689 (280) + bestparams.threshold = 0.90251f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.9147f; + bestparams.distance2 = 1.6747f; + bestparams.stmix = 0.62376f; + break; + case 5: + // current score 6128 (130) + bestparams.threshold = 0.93088f; + bestparams.pulsestrength = 2.4843f; + bestparams.distance1 = 1.0353f; + 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; + break; + case 7: + // current score 64 (2) + bestparams.threshold = 0.91f; + bestparams.pulsestrength = 1.192f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.0169f; + bestparams.distance2 = 1.2f; + bestparams.stmix = 0.637f; + break; + } + break; + // 6581 R2 + case 'H': + switch (wave) + { + case 3: + // current score 254 (82) + bestparams.threshold = 0.962954f; + bestparams.topbit = 0.f; + bestparams.distance1 = 2.65459f; + bestparams.stmix = 0.598044f; + break; + case 5: + // current score 2744 (91) + bestparams.threshold = 0.919414461f; + bestparams.pulsestrength = 1.49266505f; + bestparams.distance1 = 1.12526083f; + bestparams.distance2 = 1.15659571f; + break; + case 6: + // current score 360 (30) + bestparams.threshold = 0.941394627f; + bestparams.pulsestrength = 2.23991108f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.149554357f; + bestparams.distance2 = 0.150783867f; + break; + case 7: + // current score 0 + bestparams.threshold = 0.98f; + bestparams.pulsestrength = 2.f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.1f; + bestparams.stmix = 0.91f; + break; + } + break; + // 6581 R2 + case 'I': + switch (wave) + { + case 3: + // current score 184 (68) + bestparams.threshold = 0.982668161f; + bestparams.topbit = 0.001f; + bestparams.distance1 = 4.43093681f; + bestparams.distance2 = 4.43528938f; + bestparams.stmix = 0.775906205f; + break; + case 5: + // current score 6847 (171) + bestparams.threshold = 0.943752468f; + bestparams.pulsestrength = 2.28453493f; + bestparams.distance1 = 1.03244841f; + bestparams.distance2 = 1.17106056f; + break; + case 6: + // current score 422 (17) + bestparams.threshold = 0.894735754f; + bestparams.pulsestrength = 1.81871581f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.0912446976f; + bestparams.distance2 = 0.101162158f; + break; + case 7: + // current score 16 (6) + bestparams.threshold = 0.942962408f; + bestparams.pulsestrength = 1.57235372f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.1614747f; + bestparams.distance2 = 1.22249365f; + bestparams.stmix = 0.581929862f; + break; + } + break; + // 6581 R2 + case 'J': + switch (wave) + { + case 3: + // current score 148 (61) + bestparams.threshold = 0.979544f; + bestparams.topbit = 0.f; + bestparams.distance1 = 3.98271f; + bestparams.stmix = 0.775023f; + break; + case 5: + // current score 1540 (102) + bestparams.threshold = 0.9079f; + bestparams.pulsestrength = 1.72749f; + bestparams.distance1 = 1.12017f; + bestparams.distance2 = 1.10793f; + break; + case 6: + // current score 0 + bestparams.threshold = 0.905734479f; + bestparams.pulsestrength = 1.99118233f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.0996442288f; + bestparams.distance2 = 0.0730706826f; + break; + case 7: + // current score 0 + bestparams.threshold = 0.95248f; + bestparams.pulsestrength = 1.51f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.07153f; + bestparams.distance2 = 1.09353f; + bestparams.stmix = 1.f; + break; + } + break; + // 6581 R2 + case 'K': + switch (wave) + { + case 3: + // current score 1299 (150) + bestparams.threshold = 0.931232035f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.78504324f; + bestparams.distance2 = 2.21891737f; + bestparams.stmix = 0.692269444f; + break; + case 5: + // current score 8086 (386) + bestparams.threshold = 1.f; + bestparams.pulsestrength = 3.06605577f; + bestparams.distance1 = 0.981742382f; + bestparams.distance2 = 1.1532563f; + break; + case 6: + // current score 2608 (140) + bestparams.threshold = 0.898440778f; + bestparams.pulsestrength = 1.99839222f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.108322836f; + 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; + break; + } + break; + // 6581 R2 + case 'L': + switch (wave) + { + case 3: + // current score 1356 (109) + bestparams.threshold = 0.983135f; + bestparams.topbit = 0.f; + bestparams.distance1 = 4.62089f; + bestparams.stmix = 0.778836f; + break; + case 5: + // current score 6098 (134) + bestparams.threshold = 0.924762011f; + bestparams.pulsestrength = 2.37176347f; + bestparams.distance1 = 1.04673755f; + bestparams.distance2 = 1.16099727f; + break; + case 6: + // current score 1534 (107) + bestparams.threshold = 0.927221477f; + bestparams.pulsestrength = 2.94884133f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.0910025164f; + bestparams.distance2 = 0.132933453f; + break; + case 7: + // current score 102 (16) + bestparams.threshold = 0.941179f; + bestparams.pulsestrength = 1.65307f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.22544f; + bestparams.stmix = 0.748047f; + break; + } + break; + // 6581 R2 + case 'M': + switch (wave) + { + case 3: + // current score 352 (106) + bestparams.threshold = 0.938881f; + bestparams.topbit = 0.f; + bestparams.distance1 = 2.07118f; + bestparams.stmix = 0.579197f; + break; + case 5: + // current score 2434 (139) + bestparams.threshold = 0.906191885f; + bestparams.pulsestrength = 1.59146726f; + bestparams.distance1 = 1.127689f; + bestparams.distance2 = 1.1314106f; + break; + case 6: + // current score 0 + bestparams.threshold = 0.893231869f; + bestparams.pulsestrength = 1.70082629f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.111504503f; + bestparams.distance2 = 0.0748674423f; + break; + case 7: + // current score 0 + bestparams.threshold = 0.979779f; + bestparams.pulsestrength = 2.03635f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.30189f; + bestparams.stmix = 0.923735f; + break; + } + break; + // 6581 R2 + case 'N': + switch (wave) + { + case 3: + // current score 662 (104) + bestparams.threshold = 0.981390178f; + bestparams.topbit = 0.f; + bestparams.distance1 = 4.37947226f; + bestparams.distance2 = 4.3854661f; + bestparams.stmix = 0.772289276f; + break; + case 5: + // current score 4656 (74) + bestparams.threshold = 0.945089161f; + bestparams.pulsestrength = 2.48777676f; + bestparams.distance1 = 1.02335358f; + bestparams.distance2 = 1.14071643f; + break; + case 6: + // current score 584 (18) + bestparams.threshold = 0.90864867f; + bestparams.pulsestrength = 2.22691917f; + bestparams.topbit = -0.008f; // ??? + bestparams.distance1 = 0.120167315f; + bestparams.distance2 = 0.119318768f; + break; + case 7: + // current score 2 (2) + bestparams.threshold = 0.911848485f; + bestparams.pulsestrength = 1.17097521f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.991214871f; + bestparams.distance2 = 1.10500252f; + bestparams.stmix = 0.591298461f; + break; + } + break; + // 6581 R3 + case 'O': + switch (wave) + { + case 3: + // current score 1100 (118) + bestparams.threshold = 0.967385352f; + bestparams.topbit = 0.f; + bestparams.distance1 = 3.22246957f; + bestparams.distance2 = 3.13088274f; + bestparams.stmix = 0.739427269f; + break; + case 5: + // current score 6052 (99) + bestparams.threshold = 0.929785728f; + bestparams.pulsestrength = 2.30605006f; + bestparams.distance1 = 1.03718281f; + bestparams.distance2 = 1.1534183f; + break; + case 6: + // current score 1012 (54) + bestparams.threshold = 0.919249177f; + bestparams.pulsestrength = 2.58188939f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.131623372f; + 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; + break; + } + break; + // 6581 R3 + case 'P': + switch (wave) + { + case 3: + // current score 1814 (121) + bestparams.threshold = 0.981729865f; + bestparams.topbit = 0.001f; + bestparams.distance1 = 4.67945051f; + bestparams.distance2 = 4.70896149f; + bestparams.stmix = 0.791615963f; + break; + case 5: + // current score 3748 (113) + bestparams.threshold = 0.915575624f; + bestparams.pulsestrength = 2.57049465f; + bestparams.distance1 = 1.03338766f; + bestparams.distance2 = 1.08230126f; + break; + case 6: + // current score 269 (74) + bestparams.threshold = 0.944703519f; + bestparams.pulsestrength = 4.04210186f; + bestparams.topbit = -0.001f; // ??? + bestparams.distance1 = 0.0535937659f; + 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; + break; + } + break; + // 6581 R3 + case 'Q': + switch (wave) + { + case 3: + // current score 488 (90) + bestparams.threshold = 0.982932f; + bestparams.topbit = 0.f; + bestparams.distance1 = 4.59079f; + bestparams.stmix = 0.778088f; + break; + case 5: + // current score 3740 (63) + bestparams.threshold = 1.f; + bestparams.pulsestrength = 3.62465143f; + bestparams.distance1 = 0.986276627f; + bestparams.distance2 = 1.09922075f; + break; + case 6: + // current score 748 (58) + bestparams.threshold = 0.912882149f; + bestparams.pulsestrength = 2.45562696f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.128567815f; + bestparams.distance2 = 0.148435056f; + break; + case 7: + // current score 38 (14) + bestparams.threshold = 0.901118755f; + bestparams.pulsestrength = 0.904124081f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.05176663f; + bestparams.distance2 = 1.10776162f; + bestparams.stmix = 0.618260384f; + break; + } + break; + // 6581 R4AR + case 'R': + switch (wave) + { + case 3: + // current score 2070 (341) + bestparams.threshold = 0.888629317f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.94586849f; + bestparams.distance2 = 2.01927376f; + bestparams.stmix = 0.600944996f; + break; + case 5: + // current score 7211 (272) + bestparams.threshold = 0.928046405f; + bestparams.pulsestrength = 2.5883441f; + bestparams.distance1 = 1.01187634f; + bestparams.distance2 = 1.15885961f; + break; + case 6: + // current score 23276 (420) + bestparams.threshold = 0.872620344f; + bestparams.pulsestrength = 2.25908351f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.11984051f; + bestparams.distance2 = 0.0987310335f; + break; + case 7: + // current score 274 (30) + bestparams.threshold = 0.91457653f; + bestparams.pulsestrength = 1.32809377f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.11845613f; + bestparams.distance2 = 1.16926301f; + bestparams.stmix = 0.791111946f; + break; + } + break; + // 6581 R4AR + case 'S': + switch (wave) + { + case 3: + // current score 1724 (124) + bestparams.threshold = 0.973066f; + bestparams.topbit = 0.f; + bestparams.distance1 = 3.57771f; + bestparams.stmix = 0.747192f; + break; + case 5: + // current score 6264 (226) + bestparams.threshold = 0.900257707f; + bestparams.pulsestrength = 1.89190149f; + bestparams.distance1 = 1.05784476f; + bestparams.distance2 = 1.1705128f; + break; + case 6: + // current score 2006 (131) + bestparams.threshold = 0.917820513f; + bestparams.pulsestrength = 2.8137641f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.133098751f; + 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; + break; + } + break; + // 6581 R4AR + case 'T': + switch (wave) + { + case 3: + // current score 290 (101) + bestparams.threshold = 0.965168953f; + bestparams.topbit = 0.f; + bestparams.distance1 = 3.04781175f; + bestparams.distance2 = 3.81387138f; + bestparams.stmix = 0.609185994f; + break; + case 5: + // current score 6138 (221) + bestparams.threshold = 0.991526306f; + bestparams.pulsestrength = 2.80080104f; + bestparams.distance1 = 0.993945718f; + bestparams.distance2 = 1.19684732f; + break; + case 6: + // current score 610 (15) + bestparams.threshold = 0.9087286f; + bestparams.pulsestrength = 2.26664352f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.158760354f; + bestparams.distance2 = 0.108530171f; + break; + case 7: + // current score 0 + bestparams.threshold = 0.949945092f; + bestparams.pulsestrength = 1.60713959f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.01901114f; + bestparams.distance2 = 1.03737819f; + bestparams.stmix = 0.994224012f; + break; + } + break; + // 6581 R4AR + case 'U': + switch (wave) + { + case 3: + // current score 294 (94) + bestparams.threshold = 0.983248f; + bestparams.topbit = 0.f; + bestparams.distance1 = 4.63783f; + bestparams.stmix = 0.779401f; + break; + case 5: + // current score 6454 (259) + bestparams.threshold = 0.99398762f; + bestparams.pulsestrength = 3.14190888f; + bestparams.distance1 = 0.999676824f; + bestparams.distance2 = 1.16238594f; + break; + case 6: + // current score 840 (42) + bestparams.threshold = 0.903786302f; + bestparams.pulsestrength = 2.10020733f; + bestparams.topbit = 0.f; + bestparams.distance1 = 0.142474398f; + bestparams.distance2 = 0.139588535f; + break; + case 7: + // current score 6 (4) + bestparams.threshold = 0.925804496f; + bestparams.pulsestrength = 1.36537039f; + bestparams.topbit = 0.f; + bestparams.distance1 = 1.1688062f; + bestparams.distance2 = 1.32638979f; + bestparams.stmix = 0.509957671f; + break; + } + break; + // 8580 + case 'V': + switch (wave) + { + case 3: + // current score 1380 (169) + bestparams.threshold = 0.9632f; + bestparams.topbit = 0.975f; + bestparams.distance1 = 1.7467f; + bestparams.distance2 = 2.36132f; + bestparams.stmix = 0.975395f; + break; + case 5: + // current score 7981 (204) + bestparams.threshold = 0.93303f; + bestparams.pulsestrength = 1.7025f; + bestparams.distance1 = 1.0868f; + bestparams.distance2 = 1.43527f; + break; + case 6: + // current score 9596 (324) + bestparams.threshold = 0.958310068f; + bestparams.pulsestrength = 1.95269263f; + bestparams.topbit = 0.992986143f; + bestparams.distance1 = 0.00773835462f; + 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; + break; + } + break; + // 6582 + case 'W': + switch (wave) + { + case 3: + // current score 2201 (242) + bestparams.threshold = 0.948997259f; + bestparams.topbit = 0.982420206f; + bestparams.distance1 = 2.0006547f; + bestparams.distance2 = 2.03388166f; + bestparams.stmix = 0.992275f; + break; + case 5: + // current score 8646 (214) + bestparams.threshold = 0.936479628f; + bestparams.pulsestrength = 1.86489666f; + bestparams.distance1 = 1.08213437f; + bestparams.distance2 = 1.47512901f; + break; + case 6: + // current score 12409 (501) + bestparams.threshold = 0.921457112f; + bestparams.pulsestrength = 1.63515782f; + bestparams.topbit = 0.99865073f; + bestparams.distance1 = 0.0453318208f; + 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; + break; + } + break; + default: + break; + } + + if (bestparams.distance2 == 0.f) + bestparams.distance2 = bestparams.distance1; + + const bool is8580 = chip >= 'V'; + + // Calculate current score + score_t bestscore = bestparams.Score(wave, is8580, reference, true, 4096 * 255); + std::cout << "# initial score " << bestscore << std::endl << bestparams.toString() << std::endl << std::endl; + if (bestscore.audible_error == 0) + exit(0); + + /* + * Start the Monte Carlo loop: we randomly alter parameters + * and calculate the new score until we find the best fitting + * waveform compared to the sampled data. + */ + Parameters p = bestparams; + for (;;) + { + // loop until at least one parameter has changed + bool changed = false; + while (!changed) + { + for (Param_t i = Param_t::THRESHOLD; i <= Param_t::STMIX; i++) + { + // PULSESTRENGTH only affects pulse + if ((i==Param_t::PULSESTRENGTH) && ((wave & 0x04) != 0x04)) + { + continue; + } + + // STMIX only affects saw/triangle mix + if ((i==Param_t::STMIX) && ((wave & 0x03) != 0x03)) + { + continue; + } + + // TOPBIT only affects saw + if ((i==Param_t::TOPBIT) && ((wave & 0x02) != 0x02)) + { + continue; + } + + // change a parameter with 50% proability + if (GetRandomValue() > 1.) + { + const float oldValue = bestparams.GetValue(i); + + //std::cout << newValue << " -> "; + float newValue = static_cast(GetRandomValue()*oldValue); + //float newValue = oldValue + GetRandomValue(); + //std::cout << newValue << std::endl; + + // try to avoid too small values + if (newValue < EPSILON) + newValue += GetNewRandomValue(); + + // check for parameters limits + if ((i == Param_t::STMIX || i == Param_t::THRESHOLD) && (newValue > 1.f) + /*|| (i == Param_t::DISTANCE) && (newValue < 1.f)*/) + { + newValue = 1.f; + } + + p.SetValue(i, newValue); + changed = changed || oldValue != newValue; + } + } + } + + // check new score + const score_t score = p.Score(wave, is8580, reference, false, bestscore.audible_error); + if (bestscore.isBetter(score)) + { + // accept if improvement + std::cout << "# current score " << score << std::endl << p.toString() << std::endl << std::endl; + if (score.audible_error == 0) + exit(0); + //p.reset(); + bestparams = p; + bestscore = score; + } + else if (score.audible_error == bestscore.audible_error) + { + // print the rate of wrong bits + std::cout << score.wrongBitsRate() << std::endl; + + // no improvement but use new parameters as base to increase the "entropy" + bestparams = p; + } + } +} + +/** + * Split a file into lines. + */ +static std::vector split(const std::string &s, char delim) +{ + std::vector elems; + std::istringstream ss(s); + std::string item; + while (std::getline(ss, item, delim)) + { + elems.push_back(item); + } + return elems; +} + +/** + * Read sampled values for specific waveform and chip. + */ +static ref_vector_t ReadChip(int wave, char chip) +{ + std::cout << "Reading chip: " << chip << std::endl; + + std::ostringstream fileName; + fileName << "sidwaves/WAVE" << wave << ".CSV"; + std::ifstream ifs(fileName.str().c_str(), std::ifstream::in); + std::string line; + ref_vector_t result; + while (getline(ifs, line).good()) + { + std::vector values = split(line, ','); + result.push_back(atoi(values[chip - 'A'].c_str())); + } + return result; +} + +int main(int argc, const char* argv[]) +{ + if (argc != 3) + { + std::cout << "Usage " << argv[0] << " " << std::endl; + exit(-1); + } + + const int wave = atoi(argv[1]); + assert(wave == 3 || wave == 5 || wave == 6 || wave == 7); + + const char chip = argv[2][0]; + assert(chip >= 'A' && chip <= 'Z'); + + ref_vector_t reference = ReadChip(wave, chip); + +#ifndef NDEBUG + for (ref_vector_t::iterator it = reference.begin(); it != reference.end(); ++it) + std::cout << (*it) << std::endl; +#endif + + srand(time(0)); + + Optimize(reference, wave, chip); +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/combined-waveforms/parameters.h b/Frameworks/libsidplay/sidplay-residfp-code/combined-waveforms/parameters.h index fe5b19280..0598d95d9 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/combined-waveforms/parameters.h +++ b/Frameworks/libsidplay/sidplay-residfp-code/combined-waveforms/parameters.h @@ -1,7 +1,7 @@ /* * This file is part of libsidplayfp, a SID player engine. * - * Copyright 2013 Leandro Nini + * Copyright 2013-2016 Leandro Nini * Copyright 2007-2010 Antti Lankila * * This program is free software; you can redistribute it and/or modify @@ -22,82 +22,152 @@ #ifndef PARAMETERS_H #define PARAMETERS_H +#include + #include #include #include +#include + +typedef std::numeric_limits flt; + +// Model parameters +enum class Param_t +{ + THRESHOLD, + PULSESTRENGTH, + TOPBIT, + DISTANCE1, + DISTANCE2, + STMIX +}; +// define the postfix increment operator to allow looping over enum +inline Param_t& operator++(Param_t& x, int) +{ + return x = static_cast(static_cast::type>(x) + 1); +} + +typedef std::vector ref_vector_t; + +struct score_t +{ + unsigned int audible_error; + unsigned int wrong_bits; + + score_t() : + audible_error(0), + wrong_bits(0) + {} + + std::string wrongBitsRate() const + { + std::ostringstream o; + o << wrong_bits << "/" << 4096*8; + return o.str(); + } + + bool isBetter(const score_t& newScore) const + { + return (newScore.audible_error < audible_error) + || ((newScore.audible_error == audible_error) + && (newScore.wrong_bits < wrong_bits)); + } +}; + +std::ostream & operator<<(std::ostream & os, const score_t & foo) +{ + os.precision(2); + os << foo.audible_error << " (" << std::fixed << foo.wrongBitsRate() << ")"; + return os; +} class Parameters { -public: - enum +private: + typedef float (*distance_t)(float, int); + +private: + // Distance functions + static float exponentialDistance(float distance, int i) { - BIAS, - PULSESTRENGTH, - TOPBIT, - DISTANCE, - STMIX - }; + return pow(distance, -i); + } + + static float linearDistance(float distance, int i) + { + return 1.f / (1.f + i * distance); + } + + static float quadraticDistance(float distance, int i) + { + return 1.f / (1.f + (i*i) * distance); + } public: - float bias, pulsestrength, topbit, distance, stmix; + float threshold, pulsestrength, topbit, distance1, distance2, stmix; public: Parameters() { reset(); } void reset() { - bias = 0.f; + threshold = 0.f; pulsestrength = 0.f; topbit = 0.f; - distance = 0.f; + distance1 = 0.f; + distance2 = 0.f; stmix = 0.f; } - float GetValue(int i) + float GetValue(Param_t i) { switch (i) { - case BIAS: return bias; - case PULSESTRENGTH: return pulsestrength; - case TOPBIT: return topbit; - case DISTANCE: return distance; - case STMIX: return stmix; + case Param_t::THRESHOLD: return threshold; + case Param_t::PULSESTRENGTH: return pulsestrength; + case Param_t::TOPBIT: return topbit; + case Param_t::DISTANCE1: return distance1; + case Param_t::DISTANCE2: return distance2; + case Param_t::STMIX: return stmix; } } - void SetValue(int i, float v) + void SetValue(Param_t i, float v) { switch (i) { - case BIAS: bias = v; break; - case PULSESTRENGTH: pulsestrength = v; break; - case TOPBIT: topbit = v; break; - case DISTANCE: distance = v; break; - case STMIX: stmix = v; break; + case Param_t::THRESHOLD: threshold = v; break; + case Param_t::PULSESTRENGTH: pulsestrength = v; break; + case Param_t::TOPBIT: topbit = v; break; + case Param_t::DISTANCE1: distance1 = v; break; + case Param_t::DISTANCE2: distance2 = v; break; + case Param_t::STMIX: stmix = v; break; } } std::string toString() { std::ostringstream ss; - ss << "bias = " << bias << std::endl; + ss.precision(flt::max_digits10); + ss << "threshold = " << threshold << std::endl; ss << "pulsestrength = " << pulsestrength << std::endl; ss << "topbit = " << topbit << std::endl; - ss << "distance = " << distance << std::endl; + ss << "distance1 = " << distance1 << std::endl; + ss << "distance2 = " << distance2 << std::endl; ss << "stmix = " << stmix << std::endl; return ss.str(); } private: - void SimulateMix(float bitarray[12], float wa[], bool HasPulse) + void SimulateMix(float bitarray[12], float wa[], bool HasPulse) const { float tmp[12]; - for (int sb = 0; sb < 12; sb ++) + for (int sb = 0; sb < 12; sb++) { float n = 0.f; float avg = 0.f; - for (int cb = 0; cb < 12; cb ++) + for (int cb = 0; cb < 12; cb++) { const float weight = wa[sb - cb + 12]; avg += bitarray[cb] * weight; @@ -105,110 +175,195 @@ private: } if (HasPulse) { - const float weight = wa[sb - 12 + 12]; + const float weight = wa[sb]; avg += pulsestrength * weight; n += weight; } tmp[sb] = (bitarray[sb] + avg / n) * 0.5f; } - for (int i = 0; i < 12; i ++) + for (int i = 0; i < 12; i++) bitarray[i] = tmp[i]; } - int GetScore8(float bitarray[12]) + /** + * Get the upper 8 bits of the predicted value. + */ + unsigned int GetScore8(float bitarray[12]) const { - int result = 0; - for (int cb = 0; cb < 8; cb ++) + unsigned int result = 0; + for (int cb = 0; cb < 8; cb++) { - if (bitarray[4+cb] > bias) + if (bitarray[4+cb] > threshold) result |= 1 << cb; } return result; } - static int ScoreResult(int a, int b) + /** + * Calculate audible error. + */ + static unsigned int ScoreResult(unsigned int a, unsigned int b) { - // audible error - int v = a ^ b; - return v; -/* int c = 0; - while (v != 0) + return a ^ b; + } + + /** + * Count number of mispredicted bits. + */ + static unsigned int WrongBits(unsigned int v) + { + // Brian Kernighan's method, goes through as many iterations as there are set bits + unsigned int c = 0; + for (; v; c++) { - v &= v - 1; - c ++; + v &= v - 1; } return c; -*/ + } + + float getAnalogValue(float bitarray[12]) const + { + float analogval = 0.f; + for (unsigned int i = 0; i < 12; i++) + { + float val = (bitarray[i] - threshold) * 512 + 0.5f; + if (val < 0.f) + val = 0.f; + else if (val > 1.f) + val = 1.f; + analogval += ldexp(val, i); + } + return analogval / 16.f; } public: - int Score(int wave, const std::vector &reference, bool print, int bestscore) + score_t Score(int wave, bool is8580, const ref_vector_t &reference, bool print, unsigned int bestscore) { - int score = 0; - float wa[12 + 12 + 1]; - for (int i = 0; i <= 12; i ++) + /* + * Calculate the weight as a function of distance. + * The quadratic model (1.f + (i*i) * distance) gives better results for + * waveforms 6 for 8580 model. + * The linear model (1.f + i * distance) is quite good for waveform 6 for 6581. + * Waveform 5 shows mixed results for both 6581 and 8580. + * Furthermore the cross-bits effect seems to be asymmetric. + * TODO: try to come up with a generic distance function to + * cover all scenarios... + */ + const distance_t distFunc = (wave & 1) == 1 ? exponentialDistance : is8580 ? quadraticDistance : linearDistance; + + float wa[12 * 2 + 1]; + wa[12] = 1.f; + for (int i = 12; i > 0; i--) { - wa[12-i] = wa[12+i] = 1.0f / (1.0f + i * i * distance); + wa[12-i] = distFunc(distance1, i); + wa[12+i] = distFunc(distance2, i); } - for (int j = 4095; j >= 0; j --) + + score_t score; + + bool done = false; + + // loop over the 4096 oscillator values + #pragma omp parallel for ordered + for (unsigned int j = 0; j < 4096; j++) { - /* S */ - float bitarray[12]; - for (int i = 0; i < 12; i ++) - bitarray[i] = (j & (1 << i)) != 0 ? 1.f : 0.f; - - /* T */ - if ((wave & 3) == 1) + #pragma omp flush(done) + if (!done) { - const bool top = (j & 2048) != 0; - for (int i = 11; i > 0; i --) + float bitarray[12]; + + // Saw + for (unsigned int i = 0; i < 12; i++) { - bitarray[i] = top ? 1.f - bitarray[i-1] : bitarray[i-1]; + bitarray[i] = (j & (1 << i)) != 0 ? 1.f : 0.f; } - bitarray[0] = 0.f; - } - /* ST */ - if ((wave & 3) == 3) - { - bitarray[0] *= stmix; - for (int i = 1; i < 12; i ++) + // If Saw is not selected the bits are XORed + if ((wave & 2) == 0) { - bitarray[i] = bitarray[i-1] * (1.f - stmix) + bitarray[i] * stmix; + const bool top = (j & 2048) != 0; + for (int i = 11; i > 0; i--) + { + bitarray[i] = top ? 1.f - bitarray[i-1] : bitarray[i-1]; + } + bitarray[0] = 0.f; } - } - bitarray[11] *= topbit; - - SimulateMix(bitarray, wa, wave > 4); - - const int simval = GetScore8(bitarray); - const int refval = reference[j]; - score += ScoreResult(simval, refval); - - if (print) - { - float analogval = 0.f; - for (int i = 0; i < 12; i ++) + // If both Saw and Triangle are selected the bits are interconnected + // + // @NOTE: on the 8580 the triangle selector transistors, with the exception + // of the lowest four bits, are half the width of the other selectors. + // How does this affects combined waveforms? + else if ((wave & 3) == 3) { - float val = (bitarray[i] - bias) * 512 + 0.5f; - if (val < 0.f) - val = 0.f; - else if (val > 1.f) - val = 1.f; - analogval += val * (1 << i); +#if 1 + bitarray[0] *= stmix; + const float compl_stmix = 1.f - stmix; + for (int i = 1; i < 12; i++) + { + /* + * Enabling the S waveform pulls the XOR circuit selector transistor down + * (which would normally make the descending ramp of the triangle waveform), + * so ST does not actually have a sawtooth and triangle waveform combined, + * but merely combines two sawtooths, one rising double the speed the other. + * + * http://www.lemon64.com/forum/viewtopic.php?t=25442&postdays=0&postorder=asc&start=165 + */ + bitarray[i] = bitarray[i] * stmix + bitarray[i-1] * compl_stmix; + } +#else + const float compl_stmix = 1.f - stmix; + for (int i = 11; i > 0; i--) + { + bitarray[i] = bitarray[i] * stmix + bitarray[i-1] * compl_stmix; + } + bitarray[0] *= stmix; +#endif } - analogval /= 16.f; - std::cout << j << " " - << refval << " " - << simval << " " - << analogval << " " - << std::endl; - } - if (score > bestscore) - { - return score; + // topbit for Saw + if ((wave & 2) == 2) + { + // Why does this happen? + // For 6581 this is mostly 0 while for 8580 it's near 1 + // A few 'odd' 6581 chips show a strangely high value + // for Pulse-Saw combination + bitarray[11] *= topbit; + } + + SimulateMix(bitarray, wa, wave > 4); + + // Calculate score + const unsigned int simval = GetScore8(bitarray); + const unsigned int refval = reference[j]; + const unsigned int error = ScoreResult(simval, refval); + #pragma omp atomic + score.audible_error += error; + #pragma omp atomic + score.wrong_bits += WrongBits(error); + + if (print) + { + #pragma omp ordered + std::cout << j << " " + << refval << " " + << simval << " " + << (simval ^ refval) << " " +#if 0 + << getAnalogValue(bitarray) << " " +#endif + << std::endl; + } + + // halt if we already are worst than the best score + if (score.audible_error > bestscore) + { + done = true; + #pragma omp flush(done) +#ifndef _OPENMP + return score; +#endif + } } } return score; diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/AUTHORS b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/AUTHORS index 0e3c99dc6..6480a05ea 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/AUTHORS +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/AUTHORS @@ -6,7 +6,7 @@ system in order to play SID music better. Copyright (c) 2000 Simon White Copyright (c) 2007-2010 Antti Lankila -Copyright (c) 2010-2014 Leandro Nini +Copyright (c) 2010-2016 Leandro Nini This version of the freely available libsidplayfp emulator engine source code contains the following contributed or derived work. In the order they first @@ -22,6 +22,8 @@ supplied contributions or code was derived from their work: backporting from jsidplay2 LaLa - stilview André Fachat - reloc65 + Jarno Paananen - HardSID UNIX builder + Thibaut VARENE - exSID driver and builder VIC II, CIA and cpu-port emulation is based on VICE code. diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/Doxyfile.in b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/Doxyfile.in index f8553481b..443f67d47 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/Doxyfile.in +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/Doxyfile.in @@ -733,9 +733,7 @@ WARN_LOGFILE = # spaces. # Note: If this tag is empty the current directory is searched. -INPUT = @srcdir@/sidplayfp \ - @srcdir@/utils \ - @srcdir@/builders \ +INPUT = @srcdir@/src \ @srcdir@/docs # This tag can be used to specify the character encoding of the source files diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/Makefile.am b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/Makefile.am index c3c4d39a4..f5b85931e 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/Makefile.am +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/Makefile.am @@ -9,6 +9,7 @@ DISTCHECK_CONFIGURE_FLAGS = --enable-tests if MINGW32 + W32_CPPFLAGS = -DWIN32_LEAN_AND_MEAN W32_LDFLAGS = -no-undefined endif @@ -21,13 +22,19 @@ AM_CPPFLAGS = -I $(top_builddir)/src/builders/residfp-builder \ -I $(top_builddir)/src/builders/resid-builder \ -I $(top_builddir)/src/builders/resid-builder/resid \ -I $(top_builddir)/src \ +-I $(top_builddir)/src/sidtune \ -I $(top_srcdir)/src \ +${W32_CPPFLAGS} \ +$(EXSID_CFLAGS) \ +$(FTDI_CFLAGS) \ @debug_flags@ #========================================================= EXTRA_DIST = \ docs/mainpage.dox \ src/psiddrv.a65 \ +src/sidtune/sidplayer1.a65 \ +src/sidtune/sidplayer2.a65 \ src/builders/residfp-builder/residfp/AUTHORS \ src/builders/residfp-builder/residfp/COPYING \ src/builders/residfp-builder/residfp/README \ @@ -61,6 +68,10 @@ if HARDSID noinst_LTLIBRARIES += src/builders/hardsid-builder/libsidplayfp-hardsid.la endif +if EXSID_SUPPORT + noinst_LTLIBRARIES += src/builders/exsid-builder/libsidplayfp-exsid.la +endif + #========================================================= # libsidplayfp @@ -76,6 +87,8 @@ src/utils/MD5/MD5_Defs.h endif src_libsidplayfp_la_SOURCES = \ +src/Event.h \ +src/EventCallback.h \ src/EventScheduler.cpp \ src/EventScheduler.h \ src/player.cpp \ @@ -105,7 +118,6 @@ src/c64/c64sid.h \ src/c64/c64vic.h \ src/c64/c64.cpp \ src/c64/c64.h \ -src/c64/component.h \ src/c64/mmu.cpp \ src/c64/mmu.h \ src/c64/Banks/ColorRAMBank.h \ @@ -127,8 +139,10 @@ src/c64/CPU/mos6510.h \ src/c64/CPU/mos6510debug.cpp \ src/c64/CPU/mos6510debug.h \ src/c64/CPU/opcodes.h \ +src/c64/CIA/interrupt.h \ src/c64/CIA/mos6526.cpp \ src/c64/CIA/mos6526.h \ +src/c64/CIA/SerialPort.h \ src/c64/CIA/timer.cpp \ src/c64/CIA/timer.h \ src/c64/CIA/tod.cpp \ @@ -136,7 +150,9 @@ src/c64/CIA/tod.h \ src/sidplayfp/sidplayfp.cpp \ src/sidplayfp/sidbuilder.cpp \ src/sidplayfp/SidConfig.cpp \ +src/sidplayfp/SidInfo.cpp \ src/sidplayfp/SidTune.cpp \ +src/sidplayfp/SidTuneInfo.cpp \ src/sidtune/MUS.cpp \ src/sidtune/MUS.h \ src/sidtune/p00.cpp \ @@ -145,7 +161,8 @@ src/sidtune/prg.cpp \ src/sidtune/prg.h \ src/sidtune/PSID.cpp \ src/sidtune/PSID.h \ -src/sidtune/sidplayer.bin \ +src/sidtune/sidplayer1.bin \ +src/sidtune/sidplayer2.bin \ src/sidtune/SidTuneBase.cpp \ src/sidtune/SidTuneBase.h \ src/sidtune/SidTuneCfg.h \ @@ -156,6 +173,7 @@ src/sidtune/SmartPtr.h \ src/utils/iMd5.h \ src/utils/iniParser.cpp \ src/utils/iniParser.h \ +src/utils/md5Factory.cpp \ src/utils/md5Factory.h \ src/utils/SidDatabase.cpp \ $(MD5SRC) @@ -166,7 +184,6 @@ src_libsidplayfp_ladir = $(includedir)/sidplayfp src_libsidplayfp_la_HEADERS = \ src/sidplayfp/siddefs.h \ -src/sidplayfp/event.h \ src/sidplayfp/SidConfig.h \ src/sidplayfp/SidInfo.h \ src/sidplayfp/SidTuneInfo.h \ @@ -181,13 +198,18 @@ src/sidplayfp/sidversion.h src_libsidplayfp_la_LIBADD = \ src/builders/residfp-builder/libsidplayfp-residfp.la \ src/builders/resid-builder/libsidplayfp-resid.la \ -$(LIBGCRYPT_LIBS) +$(GCRYPT_LIBS) if HARDSID src_libsidplayfp_la_LIBADD += src/builders/hardsid-builder/libsidplayfp-hardsid.la endif -src_libsidplayfp_la_CPPFLAGS = $(LIBGCRYPT_CFLAGS) $(AM_CPPFLAGS) +if EXSID_SUPPORT + src_libsidplayfp_la_LIBADD += src/builders/exsid-builder/libsidplayfp-exsid.la \ + $(EXSID_LIBS) +endif + +src_libsidplayfp_la_CPPFLAGS = $(GCRYPT_CFLAGS) $(AM_CPPFLAGS) #========================================================= # residfp @@ -266,7 +288,7 @@ src/builders/resid-builder/resid/wave8580__ST.dat noinst_SCRIPTS = src/builders/resid-builder/resid/samp2src.pl -%.dat: %.h +.dat.h: $(PERL) $(srcdir)/src/builders/resid-builder/resid/samp2src.pl $* $< $@ #========================================================= @@ -313,6 +335,29 @@ src/builders/hardsid-builder/hardsid-builder.cpp \ src/builders/hardsid-builder/hardsid-emu.h endif + +if EXSID_SUPPORT + +if EXSID_DRIVER + exsid_src = \ +src/builders/exsid-builder/driver/exSID.c \ +src/builders/exsid-builder/driver/exSID.h \ +src/builders/exsid-builder/driver/exSID_defs.h \ +src/builders/exsid-builder/driver/exSID_ftdiwrap.c \ +src/builders/exsid-builder/driver/exSID_ftdiwrap.h +endif + +src_builders_exsid_builder_libsidplayfp_exsid_ladir = $(includedir)/sidplayfp/builders +src_builders_exsid_builder_libsidplayfp_exsid_la_HEADERS = \ +src/builders/exsid-builder/exsid.h + +src_builders_exsid_builder_libsidplayfp_exsid_la_SOURCES = \ +src/builders/exsid-builder/exsid-builder.cpp \ +src/builders/exsid-builder/exsid-emu.cpp \ +src/builders/exsid-builder/exsid-emu.h \ +$(exsid_src) +endif + #========================================================= # libstilview src_libstilview_la_SOURCES = \ @@ -366,12 +411,14 @@ pkgconfig_DATA = libsidplayfp.pc libstilview.pc BUILT_SOURCES = \ $(noinst_DATA:.dat=.h) \ -src/psiddrv.bin +src/psiddrv.bin \ +src/sidtune/sidplayer1.bin \ +src/sidtune/sidplayer2.bin #========================================================= # Recreate psiddrv.bin, needs xa65 -DISTCLEANFILES = $(BUILT_SOURCES) +MAINTAINERCLEANFILES = $(BUILT_SOURCES) .a65.bin: o65file=`echo $@ | sed 's/bin/o65/'`;\ diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/NEWS b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/NEWS index 62bc51e17..2a8dd573c 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/NEWS +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/NEWS @@ -1,3 +1,40 @@ +1.7.2 2015-05-10 +* Fix interpolation outside bounds in reSIDfp +* Remove redundant code in PSID loader + + + +1.7.1 2015-03-28 +* Fix reported number of channels +* Install psid driver before placing tune, fixes BASIC tunes and /MUSICIANS/L/Legg_Stephen/Steigar.sid +* Apply volume to channels, not to chips output + + + +1.7.0 2015-01-25 +* Add an interface to access tune data +* Remove generated files only for maintainer-clean target (bug #14) +* Rework Makefile rules for generated files +* Silence some warnings +* Other minor changes in reSIDfp +* Merge minor changes from zxtune fork + + + +1.6.2 2014-12-08 +* Fix a typo that broke MUSICIANS/M/Mixer/Vicious_SID_2-15638Hz.sid +* Fix a regression in badline handling. Restores correct timing in /MUSICIANS/S/Swallow/Wonderland_XII-Digi_part_?.sid +* Other minor fixes in VIC II emulation + + + +1.6.1 2014-11-30 +* Fix an undefined behaviour in SidDatabase +* Remove an unused variable in reSIDfp +* Set different SID bus TTL value for 8580 + + + 1.6.0 2014-10-11 * Make PSID loader adhere to spec when handling 2nd SID address * Improve PAL/NTSC switch handling diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/README b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/README index e527f0fe4..1860fb10a 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/README +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/README @@ -10,7 +10,7 @@ C64 system and the SID chips. Copyright (c) 2000-2001 Simon White Copyright (c) 2007-2010 Antti Lankila -Copyright (c) 2010-2014 Leandro Nini +Copyright (c) 2010-2016 Leandro Nini ----------------------------------------------------------------------------- @@ -64,6 +64,9 @@ disabled by default enables unit tests. Requires libUnitTest++ installed. Use "make check" to launch the testsuite disabled by default +--enable-hardsid +enables hardsid support, still untested + If doxygen is installed and detected by the configure script the documentation can be built by invoking "make doc". diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/TODO b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/TODO index fee0da344..f5a3b989b 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/TODO +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/TODO @@ -16,3 +16,5 @@ someday/maybe: * implement support for mus data embedded in psid files * test hardsid support * raise an error on HLT instructions execution + +* fix building on Cygwin diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/configure.ac b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/configure.ac index 702583264..ca4a1b1fc 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/configure.ac +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/configure.ac @@ -7,7 +7,7 @@ AC_INIT([libsidplayfp], [lib_version], [], [], [http://sourceforge.net/projects/ AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) AC_CONFIG_SRCDIR([src/sidplayfp/sidplayfp.cpp]) -AC_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADER([src/config.h]) AM_INIT_AUTOMAKE LIB_MAJOR=lib_major @@ -18,17 +18,11 @@ AC_SUBST([LIB_MINOR]) AC_SUBST([LIB_LEVEL]) AC_CANONICAL_HOST -case "$host" in - *linux*|*-k*bsd*-gnu|*mingw*) - hardsid=yes - ;; -esac -case "$host" in - *mingw32* ) - MINGW32=yes - ;; -esac -AM_CONDITIONAL([HARDSID], [test "x$hardsid" = "xyes"]) + +AS_CASE([$host_os], + [mingw*], [MINGW32=yes], + [MINGW32=no] +) AM_CONDITIONAL([MINGW32], [test "x$MINGW32" = "xyes"]) dnl Initialize libtool. @@ -49,7 +43,12 @@ AM_CONDITIONAL([HAVE_VISIBILITY], [test "x$has_visibility" = xyes]) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_BIGENDIAN -AC_CHECK_SIZEOF(int, 4) +AC_CHECK_SIZEOF([short]) +AC_CHECK_SIZEOF([int]) + +AS_IF([test $ac_cv_sizeof_short -ne 2], + [AC_MSG_ERROR([size of short must be 16 bit])] +) AS_IF([test $ac_cv_sizeof_int -lt 4], [AC_MSG_ERROR([only 32 bit or better CPUs are supported])] @@ -79,11 +78,7 @@ AC_CHECK_DECL( )] ) -AM_PATH_LIBGCRYPT(, [have_libgcrypt="yes"]) - -if test "x$have_libgcrypt" = "xyes" ; then - AC_DEFINE([HAVE_LIBGCRYPT], [1], [Define to 1 if you have libgcrypt]) -fi +AX_LIB_GCRYPT([auto]) AM_CONDITIONAL([LIBGCRYPT], [test "x$have_libgcrypt" = "xyes"]) @@ -125,6 +120,12 @@ AS_IF([test "x$enable_debug" = "xno"], AC_SUBST([debug_flags]) +AC_ARG_ENABLE([hardsid], + AS_HELP_STRING([--enable-hardsid],[enable hardsid builder [default=no]]) +) + +AM_CONDITIONAL([HARDSID], [test "x$enable_hardsid" = "xyes"]) + AC_ARG_ENABLE([inline], AS_HELP_STRING([--enable-inline],[enable inlining of functions [default=yes]]) @@ -180,6 +181,14 @@ AS_IF([test "$enable_branch_hints" != no], [AC_SUBST([RESID_BRANCH_HINTS], [0])] ) +AC_CACHE_CHECK([for log1p], [resid_cv_log1p], + [AC_TRY_COMPILE([#include ], [ log1p(1); ], + resid_cv_log1p=yes, resid_cv_log1p=no)]) + +AS_IF([test "$resid_cv_log1p" = no], + [AC_SUBST([RESID_HAVE_LOG1P], [0])], + [AC_SUBST([RESID_HAVE_LOG1P], [1])]) + AC_CACHE_CHECK([for __builtin_expect], [resid_cv_builtin_expect], [AC_COMPILE_IFELSE([AC_LANG_SOURCE([int main() { __builtin_expect(0, 0); }])], @@ -220,6 +229,7 @@ AS_IF([test "x$enable_testsuite" != xno], AM_CONDITIONAL([TESTSUITE], [test "x$enable_testsuite" != xno]) +# FIXME use pkgconfig AC_ARG_ENABLE([tests], [AS_HELP_STRING([--enable-tests], [enable unit tests [default=no]] @@ -228,7 +238,7 @@ AC_ARG_ENABLE([tests], AC_CHECK_HEADERS([UnitTest++/UnitTest++.h], [], AC_MSG_ERROR([UnitTest++.h header not found])) AS_IF( [test "x${ac_cv_header_UnitTestpp_UnitTestpp_h}" = xyes], - AC_CHECK_LIB([UnitTest++], [main], [], AC_MSG_ERROR([UnitTest++ library not found])) + AC_CHECK_LIB([UnitTest++], [main], [unittest_libs=-lUnitTest++], AC_MSG_ERROR([UnitTest++ library not found])) ) [am_unittest=true] ], @@ -236,6 +246,7 @@ AC_ARG_ENABLE([tests], ) AM_CONDITIONAL([ENABLE_TEST], [test x$am_unittest = xtrue]) +AC_SUBST([unittest_libs]) AC_SUBST(RESID_HAVE_BOOL) AC_SUBST(RESID_INLINING) @@ -243,6 +254,42 @@ AC_SUBST(RESID_INLINE) AC_SUBST(LIBSIDPLAYVERSION) AC_SUBST(LIBSTILVIEWVERSION) +# exSID support requires either libexsid or one of libfdti1 or libftd2xx +PKG_CHECK_MODULES([EXSID], + [libexsid >= 1.0], + [AC_DEFINE([HAVE_EXSID], 1, [Define to 1 if you have libexsid (-lexsid).]) + build_exsid_builder=yes], + [AC_MSG_WARN([$EXSID_PKG_ERRORS] [- using internal driver]) + AS_IF([test "x$MINGW32" != "xyes"], + AC_SEARCH_LIBS([dlopen], [dl dld], [], + [AC_MSG_ERROR([unable to find the dlopen() function])] + ) + ) + AC_CHECK_HEADERS([ftd2xx.h], + [AC_DEFINE([HAVE_FTD2XX], 1, [Define to 1 if you have ftd2xx.h]) + build_exsid_builder=yes + build_exsid_driver=yes], + [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]) + build_exsid_builder=yes + build_exsid_driver=yes + 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]) + +AM_CONDITIONAL([EXSID_SUPPORT], [ test "x${build_exsid_builder}" = xyes]) +AM_CONDITIONAL([EXSID_DRIVER], [ test "x${build_exsid_driver}" = xyes]) + +eval loadable_shrext=$shrext_cmds +AC_DEFINE_UNQUOTED([SHLIBEXT], ["${loadable_shrext}"], [Shared library extension]) + + AC_CONFIG_FILES([ Makefile diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/docs/mainpage.dox b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/docs/mainpage.dox index b6283e935..fbef363fa 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/docs/mainpage.dox +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/docs/mainpage.dox @@ -10,7 +10,7 @@ and the surrounding C64 system in order to play SID music better.
Copyright (c) 2000-2001 Simon White
Copyright (c) 2007-2010 Antti Lankila
-Copyright (c) 2010-2014 Leandro Nini <drfiemost@users.sourceforge.net>
+Copyright (c) 2010-2016 Leandro Nini <drfiemost@users.sourceforge.net>

STILView (or more precisely, the STIL class written in C++) is intended to be @@ -21,7 +21,7 @@ that is currently being played in the emulator. It requires HVSC v2.6 earlier versions to a limited extent. Copyright (C) 1998, 2002 LaLa
-Copyright (C) 2012-2013 Leandro Nini <drfiemost@users.sourceforge.net>
+Copyright (C) 2012-2016 Leandro Nini <drfiemost@users.sourceforge.net>

Home page:
diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/ax_check_compile_flag.m4 b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/ax_check_compile_flag.m4 index c3a8d695a..ca3639715 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/ax_check_compile_flag.m4 +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/ax_check_compile_flag.m4 @@ -4,7 +4,7 @@ # # SYNOPSIS # -# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS]) +# AX_CHECK_COMPILE_FLAG(FLAG, [ACTION-SUCCESS], [ACTION-FAILURE], [EXTRA-FLAGS], [INPUT]) # # DESCRIPTION # @@ -19,6 +19,8 @@ # the flags: "CFLAGS EXTRA-FLAGS FLAG". This can for example be used to # force the compiler to issue an error when a bad flag is given. # +# INPUT gives an alternative input source to AC_COMPILE_IFELSE. +# # NOTE: Implementation based on AX_CFLAGS_GCC_OPTION. Please keep this # macro in sync with AX_CHECK_{PREPROC,LINK}_FLAG. # @@ -53,19 +55,19 @@ # modified version of the Autoconf Macro, you may extend this special # exception to the GPL to apply to your modified version as well. -#serial 2 +#serial 4 AC_DEFUN([AX_CHECK_COMPILE_FLAG], -[AC_PREREQ(2.59)dnl for _AC_LANG_PREFIX +[AC_PREREQ(2.64)dnl for _AC_LANG_PREFIX and AS_VAR_IF AS_VAR_PUSHDEF([CACHEVAR],[ax_cv_check_[]_AC_LANG_ABBREV[]flags_$4_$1])dnl AC_CACHE_CHECK([whether _AC_LANG compiler accepts $1], CACHEVAR, [ ax_check_save_flags=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$[]_AC_LANG_PREFIX[]FLAGS $4 $1" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], + AC_COMPILE_IFELSE([m4_default([$5],[AC_LANG_PROGRAM()])], [AS_VAR_SET(CACHEVAR,[yes])], [AS_VAR_SET(CACHEVAR,[no])]) _AC_LANG_PREFIX[]FLAGS=$ax_check_save_flags]) -AS_IF([test x"AS_VAR_GET(CACHEVAR)" = xyes], +AS_VAR_IF(CACHEVAR,yes, [m4_default([$2], :)], [m4_default([$3], :)]) AS_VAR_POPDEF([CACHEVAR])dnl diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/ax_lib_gcrypt.m4 b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/ax_lib_gcrypt.m4 new file mode 100644 index 000000000..2c363040c --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/ax_lib_gcrypt.m4 @@ -0,0 +1,108 @@ +# =========================================================================== +# http://www.gnu.org/software/autoconf-archive/ax_lib_gcrypt.html +# =========================================================================== +# +# SYNOPSIS +# +# AX_LIB_GCRYPT([yes|no|auto]) +# +# DESCRIPTION +# +# Searches for the 'gcrypt' library with the --with... option. +# +# If found, define HAVE_GCRYPT and macro GCRYPT_LIBS and GCRYPT_CFLAGS. +# Also defines GCRYPT_WITH_ for the algorithms found available. +# Possible algorithms are: AES ARCFOUR BLOWFISH CAST5 DES IDEA RFC2268 +# SERPENT TWOFISH CRC HAVAL MD2 MD4 MD5 RMD160 SHA0 SHA1 SHA224 SHA256 +# SHA384 SHA512 TIGER WHIRLPOOL DSA ELGAMAL RSA +# +# The argument is used if no --with...-gcrypt option is set. Value "yes" +# requires the configuration by default. Value "no" does not require it by +# default. Value "auto" configures the library only if available. +# +# See also AX_LIB_BEECRYPT and AX_LIB_CRYPTO. +# +# LICENSE +# +# Copyright (c) 2009 Fabien Coelho +# +# Copying and distribution of this file, with or without modification, are +# permitted in any medium without royalty provided the copyright notice +# and this notice are preserved. This file is offered as-is, without any +# warranty. + +#serial 9 + +# AX_CHECK_GCRYPT_ALGO([algo]) +# generate convenient defines for each algorithm +AC_DEFUN([AX_CHECK_GCRYPT_ALGO],[ + AC_REQUIRE([AC_PROG_EGREP]) + AC_MSG_CHECKING([for $1 in gcrypt]) + if echo $gcrypt_algos | $EGREP -i ":.*( $1 | $1$)" > /dev/null ; then + AC_DEFINE([GCRYPT_WITH_$1],[1],[Algorithm $1 in gcrypt library]) + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi +]) + +# AX_LIB_GCRYPT([yes|no|auto]) +AC_DEFUN([AX_LIB_GCRYPT],[ + AC_MSG_CHECKING([whether gcrypt is enabled]) + AC_ARG_WITH([gcrypt],[ --with-gcrypt require gcrypt library + --without-gcrypt disable gcrypt library],[ + AC_MSG_RESULT([$withval]) + ac_with_gcrypt=$withval + ],[ + AC_MSG_RESULT($1) + ac_with_gcrypt=$1 + ]) + if test "$ac_with_gcrypt" = "yes" -o "$ac_with_gcrypt" = "auto" ; then + AM_PATH_LIBGCRYPT([1.2.0],[ + AC_DEFINE([HAVE_GCRYPT],[1],[Gcrypt library is available]) + HAVE_GCRYPT=1 + # checking for available algorithms... + gcrypt_algos=`$LIBGCRYPT_CONFIG --algorithms` + # ciphers + # this does not work with a "for" loop: nothing generated in config.h:-( +# AX_CHECK_GCRYPT_ALGO([AES]) +# AX_CHECK_GCRYPT_ALGO([ARCFOUR]) +# AX_CHECK_GCRYPT_ALGO([BLOWFISH]) +# AX_CHECK_GCRYPT_ALGO([CAST5]) +# AX_CHECK_GCRYPT_ALGO([DES]) +# AX_CHECK_GCRYPT_ALGO([IDEA]) +# AX_CHECK_GCRYPT_ALGO([RFC2268]) +# AX_CHECK_GCRYPT_ALGO([SERPENT]) +# AX_CHECK_GCRYPT_ALGO([TWOFISH]) + # digests +# AX_CHECK_GCRYPT_ALGO([CRC]) +# AX_CHECK_GCRYPT_ALGO([HAVAL]) +# AX_CHECK_GCRYPT_ALGO([MD2]) +# AX_CHECK_GCRYPT_ALGO([MD4]) + AX_CHECK_GCRYPT_ALGO([MD5]) +# AX_CHECK_GCRYPT_ALGO([RMD160]) +# AX_CHECK_GCRYPT_ALGO([SHA0]) +# AX_CHECK_GCRYPT_ALGO([SHA1]) +# AX_CHECK_GCRYPT_ALGO([SHA224]) +# AX_CHECK_GCRYPT_ALGO([SHA256]) +# AX_CHECK_GCRYPT_ALGO([SHA384]) +# AX_CHECK_GCRYPT_ALGO([SHA512]) +# AX_CHECK_GCRYPT_ALGO([TIGER]) +# AX_CHECK_GCRYPT_ALGO([WHIRLPOOL]) + # others +# AX_CHECK_GCRYPT_ALGO([DSA]) +# AX_CHECK_GCRYPT_ALGO([ELGAMAL]) +# AX_CHECK_GCRYPT_ALGO([RSA]) + # conclusion + GCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` + GCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` + AC_SUBST(GCRYPT_CFLAGS) + AC_SUBST(GCRYPT_LIBS) + ],[ + # complain only if explicitely required + if test "$ac_with_gcrypt" = "yes" ; then + AC_MSG_ERROR([cannot configure required gcrypt library]) + fi + ]) + fi +]) diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/sid_cxx_compile_stdcxx_11.m4 b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/sid_cxx_compile_stdcxx_11.m4 index 38ae6cdd7..150c4b7ef 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/sid_cxx_compile_stdcxx_11.m4 +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/m4/sid_cxx_compile_stdcxx_11.m4 @@ -7,12 +7,15 @@ # Copyright (c) 2012 Zack Weinberg # Copyright (c) 2013 Roy Stogner # Copyright (c) 2014 Alexey Sokolov +# Copyright (c) 2014, 2015 Google Inc. # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. +#serial 7 + m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ template struct check @@ -38,6 +41,25 @@ m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ auto d = a; auto l = [](){}; + + // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae + // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function because of this + namespace test_template_alias_sfinae { + struct foo {}; + + template + using member = typename T::member_type; + + template + void func(...) {} + + template + void func(member*) {} + + void test() { + func(0); + } + } ]]) AC_DEFUN([SID_CXX_COMPILE_STDCXX_11], [dnl @@ -56,14 +78,14 @@ AC_DEFUN([SID_CXX_COMPILE_STDCXX_11], [dnl cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_-std=c++11]) AC_CACHE_CHECK(whether $CXX supports C++11 features with -std=c++11, $cachevar, - [ac_save_CXXFLAGS="$CXXFLAGS" - CXXFLAGS="$CXXFLAGS -std=c++11" + [ac_save_CXX="$CXX" + CXX="$CXX -std=c++11" AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], [eval $cachevar=yes], [eval $cachevar=no]) - CXXFLAGS="$ac_save_CXXFLAGS"]) + CXX="$ac_save_CXX"]) if eval test x\$$cachevar = xyes; then - CXXFLAGS="$CXXFLAGS -std=c++11" + CXX="$CXX -std=c++11" ac_success=yes break fi diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/Event.h b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/Event.h new file mode 100644 index 000000000..ba484e3cb --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/Event.h @@ -0,0 +1,75 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright 2011-2015 Leandro Nini + * Copyright 2007-2010 Antti Lankila + * Copyright 2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#ifndef EVENT_H +#define EVENT_H + +#include + + +namespace libsidplayfp +{ + +typedef int_fast64_t event_clock_t; + + +/** + * An Event object that can be inserted in the Event Scheduler. + */ +class Event +{ + friend class EventScheduler; + +private: + /// The next event in sequence. + Event *next; + + /// The clock this event fires. + event_clock_t triggerTime; + + /// Describe event for humans. + const char * const m_name; + +public: + /** + * Events are used for delayed execution. Name is + * not used by code, but is useful for debugging. + * + * @param name Descriptive string of the event. + */ + Event(const char * const name) : + m_name(name) {} + + /** + * Event code to be executed. Events are allowed to safely + * reschedule themselves with the EventScheduler during + * invocations. + */ + virtual void event() = 0; + +protected: + ~Event() {} +}; + +} + +#endif // EVENT_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventCallback.h b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventCallback.h new file mode 100644 index 000000000..6b76e6692 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventCallback.h @@ -0,0 +1,57 @@ +/* + * This file is part of libsidplayfp, a SID player engine. + * + * Copyright (C) 2011-2015 Leandro Nini + * Copyright (C) 2009 Antti S. Lankila + * Copyright (C) 2001 Simon White + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#ifndef EVENTCALLBACK_H +#define EVENTCALLBACK_H + +#include "Event.h" + +#include "sidcxx11.h" + + +namespace libsidplayfp +{ + +template< class This > +class EventCallback final : public Event +{ +private: + typedef void (This::*Callback) (); + +private: + This &m_this; + Callback const m_callback; + +private: + void event() override { (m_this.*m_callback)(); } + +public: + EventCallback(const char* const name, This &object, Callback callback) : + Event(name), + m_this(object), + m_callback(callback) + {} +}; + +} + +#endif // EVENTCALLBACK_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventScheduler.cpp b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventScheduler.cpp index 2f193fe95..e4ba1e9b5 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventScheduler.cpp +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventScheduler.cpp @@ -23,6 +23,9 @@ #include "EventScheduler.h" +namespace libsidplayfp +{ + void EventScheduler::reset() { firstEvent = nullptr; @@ -57,3 +60,5 @@ bool EventScheduler::isPending(Event &event) const } return false; } + +} diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventScheduler.h b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventScheduler.h index c365644dc..2f4e233b5 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventScheduler.h +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/EventScheduler.h @@ -1,7 +1,7 @@ /* * This file is part of libsidplayfp, a SID player engine. * - * Copyright (C) 2011-2014 Leandro Nini + * Copyright (C) 2011-2015 Leandro Nini * Copyright (C) 2009 Antti S. Lankila * Copyright (C) 2001 Simon White * @@ -23,48 +23,48 @@ #ifndef EVENTSCHEDULER_H #define EVENTSCHEDULER_H -#include "sidplayfp/event.h" +#include "Event.h" #include "sidcxx11.h" -template< class This > -class EventCallback: public Event +namespace libsidplayfp { -private: - typedef void (This::*Callback) (); -private: - This &m_this; - Callback const m_callback; - -private: - void event() override { (m_this.*m_callback)(); } - -public: - EventCallback(const char * const name, This &_this, Callback callback) : - Event(name), - m_this(_this), - m_callback(callback) {} -}; +/** + * C64 system runs actions at system clock high and low + * states. The PHI1 corresponds to the auxiliary chip activity + * and PHI2 to CPU activity. For any clock, PHI1s are before + * PHI2s. + */ +typedef enum +{ + EVENT_CLOCK_PHI1 = 0, + EVENT_CLOCK_PHI2 = 1 +} event_phase_t; /** - * Fast EventScheduler implementation + * Fast EventScheduler, which maintains a linked list of Events. + * This scheduler takes neglible time even when it is used to + * schedule events for nearly every clock. * - * @author Antti S. Lankila + * Events occur on an internal clock which is 2x the visible clock. + * The visible clock is divided to two phases called phi1 and phi2. + * + * The phi1 clocks are used by VIC and CIA chips, phi2 clocks by CPU. + * + * Scheduling an event for a phi1 clock when system is in phi2 causes the + * event to be moved to the next phi1 cycle. Correspondingly, requesting + * a phi1 time when system is in phi2 returns the value of the next phi1. */ -class EventScheduler: public EventContext +class EventScheduler { private: - /** - * The first event of the chain. - */ + /// The first event of the chain. Event *firstEvent; - /** - * EventScheduler's current clock. - */ + /// EventScheduler's current clock. event_clock_t currentTime; private: @@ -89,28 +89,46 @@ private: } } -protected: - void schedule(Event &event, event_clock_t cycles, - event_phase_t phase) override - { - // this strange formulation always selects the next available slot regardless of specified phase. - event.triggerTime = (cycles << 1) + currentTime + ((currentTime & 1) ^ phase); - schedule(event); - } - - void schedule(Event &event, event_clock_t cycles) override - { - event.triggerTime = (cycles << 1) + currentTime; - schedule(event); - } - - void cancel(Event &event) override; - public: EventScheduler() : firstEvent(nullptr), currentTime(0) {} + /** + * Add event to pending queue. + * + * At PHI2, specify cycles=0 and Phase=PHI1 to fire on the very next PHI1. + * + * @param event the event to add + * @param cycles how many cycles from now to fire + * @param phase the phase when to fire the event + */ + void schedule(Event &event, unsigned int cycles, event_phase_t phase) + { + // this strange formulation always selects the next available slot regardless of specified phase. + event.triggerTime = currentTime + ((currentTime & 1) ^ phase) + (cycles << 1); + schedule(event); + } + + /** + * Add event to pending queue in the same phase as current event. + * + * @param event the event to add + * @param cycles how many cycles from now to fire + */ + void schedule(Event &event, unsigned int cycles) + { + event.triggerTime = currentTime + (cycles << 1); + schedule(event); + } + + /** + * Cancel event if pending. + * + * @param event the event to cancel + */ + void cancel(Event &event); + /** * Cancel all pending events and reset time. */ @@ -129,20 +147,43 @@ public: /** * Check if an event is in the queue. + * + * @param event the event + * @return true when pending */ - bool isPending(Event &event) const override; + bool isPending(Event &event) const; - event_clock_t getTime(event_phase_t phase) const override + /** + * Get time with respect to a specific clock phase. + * + * @param phase the phase + * @return the time according to specified phase. + */ + event_clock_t getTime(event_phase_t phase) const { return (currentTime + (phase ^ 1)) >> 1; } - event_clock_t getTime(event_clock_t clock, event_phase_t phase) const override + /** + * Get clocks since specified clock in given phase. + * + * @param clock the time to compare to + * @param phase the phase to comapre to + * @return the time between specified clock and now + */ + event_clock_t getTime(event_clock_t clock, event_phase_t phase) const { return getTime(phase) - clock; } - event_phase_t phase() const override { return static_cast(currentTime & 1); } + /** + * Return current clock phase. + * + * @return The current phase + */ + event_phase_t phase() const { return static_cast(currentTime & 1); } }; +} + #endif // EVENTSCHEDULER_H diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/SidInfoImpl.h b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/SidInfoImpl.h index f4ceea732..9e50e7693 100644 --- a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/SidInfoImpl.h +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/SidInfoImpl.h @@ -1,7 +1,7 @@ /* * This file is part of libsidplayfp, a SID player engine. * - * Copyright 2011-2014 Leandro Nini + * Copyright 2011-2015 Leandro Nini * Copyright 2007-2010 Antti Lankila * Copyright 2000 Simon White * @@ -39,17 +39,17 @@ #endif #ifndef PACKAGE_NAME -# define PACKAGE_NAME PACKAGE +# define PACKAGE_NAME PACKAGE #endif #ifndef PACKAGE_VERSION -# define PACKAGE_VERSION VERSION +# define PACKAGE_VERSION VERSION #endif /** * The implementation of the SidInfo interface. */ -class SidInfoImpl : public SidInfo +class SidInfoImpl final : public SidInfo { public: const std::string m_name; @@ -78,7 +78,7 @@ public: SidInfoImpl() : m_name(PACKAGE_NAME), m_version(PACKAGE_VERSION), - m_maxsids(Mixer::MAX_SIDS), + m_maxsids(libsidplayfp::Mixer::MAX_SIDS), m_channels(1), m_driverAddr(0), m_driverLength(0) @@ -86,7 +86,7 @@ public: m_credits.push_back(PACKAGE_NAME " V" PACKAGE_VERSION " Engine:\n" "\tCopyright (C) 2000 Simon White\n" "\tCopyright (C) 2007-2010 Antti Lankila\n" - "\tCopyright (C) 2010-2014 Leandro Nini\n" + "\tCopyright (C) 2010-2015 Leandro Nini\n" "\t" PACKAGE_URL "\n"); } diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/COPYING b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/COPYING new file mode 100644 index 000000000..d159169d1 --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 2 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, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/ChangeLog b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/ChangeLog new file mode 100644 index 000000000..f9b9ce68b --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/ChangeLog @@ -0,0 +1,16 @@ +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 diff --git a/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/Doxyfile.in b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/Doxyfile.in new file mode 100644 index 000000000..0b5a0135f --- /dev/null +++ b/Frameworks/libsidplay/sidplay-residfp-code/libsidplayfp/src/builders/exsid-builder/driver/Doxyfile.in @@ -0,0 +1,2353 @@ +# Doxyfile 1.8.8 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project. +# +# All text after a double hash (##) is considered a comment and is placed in +# front of the TAG it is preceding. +# +# All text after a single hash (#) is considered a comment and will be ignored. +# The format is: +# TAG = value [value, ...] +# For lists, items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (\" \"). + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all text +# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv +# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# for the list of possible encodings. +# The default value is: UTF-8. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by +# double-quotes, unless you are using Doxywizard) that should identify the +# project for which the documentation is generated. This name is used in the +# title of most generated pages and in a few other places. +# The default value is: My Project. + +PROJECT_NAME = @PACKAGE_NAME@ + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. This +# could be handy for archiving the generated documentation or if some version +# control system is used. + +PROJECT_NUMBER = @PACKAGE_VERSION@ + +# Using the PROJECT_BRIEF tag one can provide an optional one line description +# for a project that appears at the top of each page and should give viewer a +# quick idea about the purpose of the project. Keep the description short. + +PROJECT_BRIEF = + +# With the PROJECT_LOGO tag one can specify an logo or icon that is included in +# the documentation. The maximum height of the logo should not exceed 55 pixels +# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo +# to the output directory. + +PROJECT_LOGO = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path +# into which the generated documentation will be written. If a relative path is +# entered, it will be relative to the location where doxygen was started. If +# left blank the current directory will be used. + +OUTPUT_DIRECTORY = @builddir@/docs + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- +# directories (in 2 levels) under the output directory of each output format and +# will distribute the generated files over these directories. Enabling this +# option can be useful when feeding doxygen a huge amount of source files, where +# putting all generated files in the same directory would otherwise causes +# performance problems for the file system. +# The default value is: NO. + +CREATE_SUBDIRS = NO + +# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII +# characters to appear in the names of generated files. If set to NO, non-ASCII +# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode +# U+3044. +# The default value is: NO. + +ALLOW_UNICODE_NAMES = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, +# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), +# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, +# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), +# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, +# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, +# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, +# Ukrainian and Vietnamese. +# The default value is: English. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member +# descriptions after the members that are listed in the file and class +# documentation (similar to Javadoc). Set to NO to disable this. +# The default value is: YES. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief +# description of a member or function before the detailed description +# +# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. +# The default value is: YES. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator that is +# used to form the text in various listings. Each string in this list, if found +# as the leading text of the brief description, will be stripped from the text +# and the result, after processing the whole list, is used as the annotated +# text. Otherwise, the brief description is used as-is. If left blank, the +# following values are used ($name is automatically replaced with the name of +# the entity):The $name class, The $name widget, The $name file, is, provides, +# specifies, contains, represents, a, an and the. + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# doxygen will generate a detailed section even if there is only a brief +# description. +# The default value is: NO. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. +# The default value is: NO. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path +# before files name in the file list and in the header files. If set to NO the +# shortest path that makes the file name unique will be used +# The default value is: YES. + +FULL_PATH_NAMES = NO + +# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. +# Stripping is only done if one of the specified strings matches the left-hand +# part of the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the path to +# strip. +# +# Note that you can specify absolute paths here, but also relative paths, which +# will be relative from the directory where doxygen is started. +# This tag requires that the tag FULL_PATH_NAMES is set to YES. + +STRIP_FROM_PATH = + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the +# path mentioned in the documentation of a class, which tells the reader which +# header file to include in order to use a class. If left blank only the name of +# the header file containing the class definition is used. Otherwise one should +# specify the list of include paths that are normally passed to the compiler +# using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but +# less readable) file names. This can be useful is your file systems doesn't +# support long names like on DOS, Mac, or CD-ROM. +# The default value is: NO. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the +# first line (until the first dot) of a Javadoc-style comment as the brief +# description. If set to NO, the Javadoc-style will behave just like regular Qt- +# style comments (thus requiring an explicit @brief command for a brief +# description.) +# The default value is: NO. + +JAVADOC_AUTOBRIEF = YES + +# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first +# line (until the first dot) of a Qt-style comment as the brief description. If +# set to NO, the Qt-style will behave just like regular Qt-style comments (thus +# requiring an explicit \brief command for a brief description.) +# The default value is: NO. + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a +# multi-line C++ special comment block (i.e. a block of //! or /// comments) as +# a brief description. This used to be the default behavior. The new default is +# to treat a multi-line C++ comment block as a detailed description. Set this +# tag to YES if you prefer the old behavior instead. +# +# Note that setting this tag to YES also means that rational rose comments are +# not recognized any more. +# The default value is: NO. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the +# documentation from any documented member that it re-implements. +# The default value is: YES. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a +# new page for each member. If set to NO, the documentation of a member will be +# part of the file/class/namespace that contains it. +# The default value is: NO. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen +# uses this value to replace tabs by spaces in code fragments. +# Minimum value: 1, maximum value: 16, default value: 4. + +TAB_SIZE = 8 + +# This tag can be used to specify a number of aliases that act as commands in +# the documentation. An alias has the form: +# name=value +# For example adding +# "sideeffect=@par Side Effects:\n" +# will allow you to put the command \sideeffect (or @sideeffect) in the +# documentation, which will result in a user-defined paragraph with heading +# "Side Effects:". You can put \n's in the value part of an alias to insert +# newlines. + +ALIASES = + +# This tag can be used to specify a number of word-keyword mappings (TCL only). +# A mapping has the form "name=value". For example adding "class=itcl::class" +# will allow you to use the command class in the itcl::class meaning. + +TCL_SUBST = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources +# only. Doxygen will then generate output that is more tailored for C. For +# instance, some of the names that are used will be different. The list of all +# members will be omitted, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_FOR_C = YES + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or +# Python sources only. Doxygen will then generate output that is more tailored +# for that language. For instance, namespaces will be presented as packages, +# qualified scopes will look different, etc. +# The default value is: NO. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources. Doxygen will then generate output that is tailored for Fortran. +# The default value is: NO. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for VHDL. +# The default value is: NO. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it +# parses. With this tag you can assign which parser to use for a given +# extension. Doxygen has a built-in mapping, but you can override or extend it +# using this tag. The format is ext=language, where ext is a file extension, and +# language is one of the parsers supported by doxygen: IDL, Java, Javascript, +# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: +# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: +# Fortran. In the later case the parser tries to guess whether the code is fixed +# or free formatted code, this is the default for Fortran type files), VHDL. For +# instance to make doxygen treat .inc files as Fortran files (default is PHP), +# and .f files as C (default is Fortran), use: inc=Fortran f=C. +# +# Note For files without extension you can use no_extension as a placeholder. +# +# Note that for custom extensions you also need to set FILE_PATTERNS otherwise +# the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments +# according to the Markdown format, which allows for more readable +# documentation. See http://daringfireball.net/projects/markdown/ for details. +# The output of markdown processing is further processed by doxygen, so you can +# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in +# case of backward compatibilities issues. +# The default value is: YES. + +MARKDOWN_SUPPORT = YES + +# When enabled doxygen tries to link words that correspond to documented +# classes, or namespaces to their corresponding documentation. Such a link can +# be prevented in individual cases by by putting a % sign in front of the word +# or globally by setting AUTOLINK_SUPPORT to NO. +# The default value is: YES. + +AUTOLINK_SUPPORT = YES + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should set this +# tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); +# versus func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. +# The default value is: NO. + +BUILTIN_STL_SUPPORT = YES + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. +# The default value is: NO. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: +# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen +# will parse them like normal C++ but will assume all classes use public instead +# of private inheritance when no explicit protection keyword is present. +# The default value is: NO. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate +# getter and setter methods for a property. Setting this option to YES will make +# doxygen to replace the get and set methods by a property in the documentation. +# This will only work if the methods are indeed getting or setting a simple +# type. If this is not the case, or you want to show the methods anyway, you +# should set this option to NO. +# The default value is: YES. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. +# The default value is: NO. + +DISTRIBUTE_GROUP_DOC = YES + +# Set the SUBGROUPING tag to YES to allow class member groups of the same type +# (for instance a group of public functions) to be put as a subgroup of that +# type (e.g. under the Public Functions section). Set it to NO to prevent +# subgrouping. Alternatively, this can be done per class using the +# \nosubgrouping command. +# The default value is: YES. + +SUBGROUPING = YES + +# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions +# are shown inside the group in which they are included (e.g. using \ingroup) +# instead of on a separate page (for HTML and Man pages) or section (for LaTeX +# and RTF). +# +# Note that this feature does not work in combination with +# SEPARATE_MEMBER_PAGES. +# The default value is: NO. + +INLINE_GROUPED_CLASSES = NO + +# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions +# with only public data fields or simple typedef fields will be shown inline in +# the documentation of the scope in which they are defined (i.e. file, +# namespace, or group documentation), provided this scope is documented. If set +# to NO, structs, classes, and unions are shown on a separate page (for HTML and +# Man pages) or section (for LaTeX and RTF). +# The default value is: NO. + +INLINE_SIMPLE_STRUCTS = NO + +# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or +# enum is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically be +# useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. +# The default value is: NO. + +TYPEDEF_HIDES_STRUCT = NO + +# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This +# cache is used to resolve symbols given their name and scope. Since this can be +# an expensive process and often the same symbol appears multiple times in the +# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small +# doxygen will become slower. If the cache is too large, memory is wasted. The +# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range +# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 +# symbols. At the end of a run doxygen will report the cache usage and suggest +# the optimal cache size from a speed point of view. +# Minimum value: 0, maximum value: 9, default value: 0. + +LOOKUP_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. Private +# class members and static file members will be hidden unless the +# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. +# Note: This will also disable the warnings about undocumented members that are +# normally produced when WARNINGS is set to YES. +# The default value is: NO. + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will +# be included in the documentation. +# The default value is: NO. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal +# scope will be included in the documentation. +# The default value is: NO. + +EXTRACT_PACKAGE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file will be +# included in the documentation. +# The default value is: NO. + +EXTRACT_STATIC = NO + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined +# locally in source files will be included in the documentation. If set to NO +# only classes defined in header files are included. Does not have any effect +# for Java sources. +# The default value is: YES. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local methods, +# which are defined in the implementation section but not in the interface are +# included in the documentation. If set to NO only methods in the interface are +# included. +# The default value is: NO. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base name of +# the file that contains the anonymous namespace. By default anonymous namespace +# are hidden. +# The default value is: NO. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all +# undocumented members inside documented classes or files. If set to NO these +# members will be included in the various overviews, but no documentation +# section is generated. This option has no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. If set +# to NO these classes will be included in the various overviews. This option has +# no effect if EXTRACT_ALL is enabled. +# The default value is: NO. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend +# (class|struct|union) declarations. If set to NO these declarations will be +# included in the documentation. +# The default value is: NO. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any +# documentation blocks found inside the body of a function. If set to NO these +# blocks will be appended to the function's detailed documentation block. +# The default value is: NO. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation that is typed after a +# \internal command is included. If the tag is set to NO then the documentation +# will be excluded. Set it to YES to include the internal documentation. +# The default value is: NO. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file +# names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. +# The default value is: system dependent. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with +# their full class and namespace scopes in the documentation. If set to YES the +# scope will be hidden. +# The default value is: NO. + +HIDE_SCOPE_NAMES = NO + +# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of +# the files that are included by a file in the documentation of that file. +# The default value is: YES. + +SHOW_INCLUDE_FILES = YES + +# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each +# grouped member an include statement to the documentation, telling the reader +# which file to include in order to use the member. +# The default value is: NO. + +SHOW_GROUPED_MEMB_INC = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include +# files with double quotes in the documentation rather than with sharp brackets. +# The default value is: NO. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the +# documentation for inline members. +# The default value is: YES. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the +# (detailed) documentation of file and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. +# The default value is: YES. + +SORT_MEMBER_DOCS = YES + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief +# descriptions of file, namespace and class members alphabetically by member +# name. If set to NO the members will appear in declaration order. Note that +# this will also influence the order of the classes in the class list. +# The default value is: NO. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the +# (brief and detailed) documentation of class members so that constructors and +# destructors are listed first. If set to NO the constructors will appear in the +# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. +# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief +# member documentation. +# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting +# detailed member documentation. +# The default value is: NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy +# of group names into alphabetical order. If set to NO the group names will +# appear in their defined order. +# The default value is: NO. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by +# fully-qualified names, including namespaces. If set to NO, the class list will +# be sorted only by class name, not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the alphabetical +# list. +# The default value is: NO. + +SORT_BY_SCOPE_NAME = NO + +# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper +# type resolution of all parameters of a function it will reject a match between +# the prototype and the implementation of a member function even if there is +# only one candidate or it is obvious which candidate to choose by doing a +# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still +# accept a match between prototype and implementation in such cases. +# The default value is: NO. + +STRICT_PROTO_MATCHING = NO + +# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the +# todo list. This list is created by putting \todo commands in the +# documentation. +# The default value is: YES. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the +# test list. This list is created by putting \test commands in the +# documentation. +# The default value is: YES. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug +# list. This list is created by putting \bug commands in the documentation. +# The default value is: YES. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) +# the deprecated list. This list is created by putting \deprecated commands in +# the documentation. +# The default value is: YES. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional documentation +# sections, marked by \if ... \endif and \cond +# ... \endcond blocks. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the +# initial value of a variable or macro / define can have for it to appear in the +# documentation. If the initializer consists of more lines than specified here +# it will be hidden. Use a value of 0 to hide initializers completely. The +# appearance of the value of individual variables and macros / defines can be +# controlled using \showinitializer or \hideinitializer command in the +# documentation regardless of this setting. +# Minimum value: 0, maximum value: 10000, default value: 30. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at +# the bottom of the documentation of classes and structs. If set to YES the list +# will mention the files that were used to generate the documentation. +# The default value is: YES. + +SHOW_USED_FILES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This +# will remove the Files entry from the Quick Index and from the Folder Tree View +# (if specified). +# The default value is: YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces +# page. This will remove the Namespaces entry from the Quick Index and from the +# Folder Tree View (if specified). +# The default value is: YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command command input-file, where command is the value of the +# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided +# by doxygen. Whatever the program writes to standard output is used as the file +# version. For an example see the documentation. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed +# by doxygen. The layout file controls the global structure of the generated +# output files in an output format independent way. To create the layout file +# that represents doxygen's defaults, run doxygen with the -l option. You can +# optionally specify a file name after the option, if omitted DoxygenLayout.xml +# will be used as the name of the layout file. +# +# Note that if you run doxygen from a directory containing a file called +# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE +# tag is left empty. + +LAYOUT_FILE = + +# The CITE_BIB_FILES tag can be used to specify one or more bib files containing +# the reference definitions. This must be a list of .bib files. The .bib +# extension is automatically appended if omitted. This requires the bibtex tool +# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. +# For LaTeX the style of the bibliography can be controlled using +# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the +# search path. See also \cite for info how to create references. + +CITE_BIB_FILES = + +#--------------------------------------------------------------------------- +# Configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated to +# standard output by doxygen. If QUIET is set to YES this implies that the +# messages are off. +# The default value is: NO. + +QUIET = YES + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES +# this implies that the warnings are on. +# +# Tip: Turn warnings on while writing the documentation. +# The default value is: YES. + +WARNINGS = YES + +# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate +# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag +# will automatically be disabled. +# The default value is: YES. + +WARN_IF_UNDOCUMENTED = YES + +# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some parameters +# in a documented function, or documenting parameters that don't exist or using +# markup commands wrongly. +# The default value is: YES. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that +# are documented, but have no documentation for their parameters or return +# value. If set to NO doxygen will only warn about wrong or incomplete parameter +# documentation, but not about the absence of documentation. +# The default value is: NO. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that doxygen +# can produce. The string should contain the $file, $line, and $text tags, which +# will be replaced by the file and line number from which the warning originated +# and the warning text. Optionally the format may contain $version, which will +# be replaced by the version of the file (if it could be obtained via +# FILE_VERSION_FILTER) +# The default value is: $file:$line: $text. + +WARN_FORMAT = "$file:$line: $text" + +# The WARN_LOGFILE tag can be used to specify a file to which warning and error +# messages should be written. If left blank the output is written to standard +# error (stderr). + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# Configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag is used to specify the files and/or directories that contain +# documented source files. You may enter file names like myfile.cpp or +# directories like /usr/src/myproject. Separate the files or directories with +# spaces. +# Note: If this tag is empty the current directory is searched. + +INPUT = @srcdir@ \ + @srcdir@/docs + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses +# libiconv (or the iconv built into libc) for the transcoding. See the libiconv +# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# possible encodings. +# The default value is: UTF-8. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank the +# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, +# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, +# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, +# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, +# *.qsf, *.as and *.js. + +FILE_PATTERNS = + +# The RECURSIVE tag can be used to specify whether or not subdirectories should +# be searched for input files as well. +# The default value is: NO. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should be +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. +# +# Note that relative paths are relative to the directory from which doxygen is +# run. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or +# directories that are symbolic links (a Unix file system feature) are excluded +# from the input. +# The default value is: NO. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories for example use the pattern */test/* + +EXCLUDE_PATTERNS = + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test +# +# Note that the wildcards are matched against the file with absolute path, so to +# exclude all test directories use the pattern */test/* + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or directories +# that contain example code fragments that are included (see the \include +# command). + +EXAMPLE_PATH = @srcdir@/test + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and +# *.h) to filter out the source-files in the directories. If left blank all +# files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude commands +# irrespective of the value of the RECURSIVE tag. +# The default value is: NO. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or directories +# that contain images that are to be included in the documentation (see the +# \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command: +# +# +# +# where is the value of the INPUT_FILTER tag, and is the +# name of an input file. Doxygen will then use the output that the filter +# program writes to standard output. If FILTER_PATTERNS is specified, this tag +# will be ignored. +# +# Note that the filter must not add or remove lines; it is applied before the +# code is scanned, but not when the output code is generated. If lines are added +# or removed, the anchors will not be placed correctly. + +INPUT_FILTER = + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: pattern=filter +# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how +# filters are used. If the FILTER_PATTERNS tag is empty or if none of the +# patterns match the file name, INPUT_FILTER is applied. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER ) will also be used to filter the input files that are used for +# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). +# The default value is: NO. + +FILTER_SOURCE_FILES = NO + +# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file +# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and +# it is also possible to disable source filtering for a specific pattern using +# *.ext= (so without naming a filter). +# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. + +FILTER_SOURCE_PATTERNS = + +# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that +# is part of the input, its contents will be placed on the main page +# (index.html). This can be useful if you have a project on for instance GitHub +# and want to reuse the introduction page also for the doxygen output. + +USE_MDFILE_AS_MAINPAGE = + +#--------------------------------------------------------------------------- +# Configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will be +# generated. Documented entities will be cross-referenced with these sources. +# +# Note: To get rid of all source code in the generated output, make sure that +# also VERBATIM_HEADERS is set to NO. +# The default value is: NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body of functions, +# classes and enums directly into the documentation. +# The default value is: NO. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any +# special comment blocks from generated source code fragments. Normal C, C++ and +# Fortran comments will always remain visible. +# The default value is: YES. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES then for each documented +# function all documented functions referencing it will be listed. +# The default value is: NO. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES then for each documented function +# all documented entities called/used by that function will be listed. +# The default value is: NO. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set +# to YES, then the hyperlinks from functions in REFERENCES_RELATION and +# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will +# link to the documentation. +# The default value is: YES. + +REFERENCES_LINK_SOURCE = YES + +# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the +# source code will show a tooltip with additional information such as prototype, +# brief description and links to the definition and documentation. Since this +# will make the HTML file larger and loading of large files a bit slower, you +# can opt to disable this feature. +# The default value is: YES. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +SOURCE_TOOLTIPS = YES + +# If the USE_HTAGS tag is set to YES then the references to source code will +# point to the HTML generated by the htags(1) tool instead of doxygen built-in +# source browser. The htags tool is part of GNU's global source tagging system +# (see http://www.gnu.org/software/global/global.html). You will need version +# 4.8.6 or higher. +# +# To use it do the following: +# - Install the latest version of global +# - Enable SOURCE_BROWSER and USE_HTAGS in the config file +# - Make sure the INPUT points to the root of the source tree +# - Run doxygen as normal +# +# Doxygen will invoke htags (and that will in turn invoke gtags), so these +# tools must be available from the command line (i.e. in the search path). +# +# The result: instead of the source browser generated by doxygen, the links to +# source code will now point to the output of htags. +# The default value is: NO. +# This tag requires that the tag SOURCE_BROWSER is set to YES. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a +# verbatim copy of the header file for each class for which an include is +# specified. Set to NO to disable this. +# See also: Section \class. +# The default value is: YES. + +VERBATIM_HEADERS = YES + +# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the +# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the +# cost of reduced performance. This can be particularly helpful with template +# rich C++ code for which doxygen's built-in parser lacks the necessary type +# information. +# Note: The availability of this option depends on whether or not doxygen was +# compiled with the --with-libclang option. +# The default value is: NO. + +CLANG_ASSISTED_PARSING = NO + +# If clang assisted parsing is enabled you can provide the compiler with command +# line options that you would normally use when invoking the compiler. Note that +# the include paths will already be set by doxygen for the files and directories +# specified with INPUT and INCLUDE_PATH. +# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. + +CLANG_OPTIONS = + +#--------------------------------------------------------------------------- +# Configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all +# compounds will be generated. Enable this if the project contains a lot of +# classes, structs, unions or interfaces. +# The default value is: YES. + +ALPHABETICAL_INDEX = NO + +# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in +# which the alphabetical index list will be split. +# Minimum value: 1, maximum value: 20, default value: 5. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +COLS_IN_ALPHA_INDEX = 5 + +# In case all classes in a project start with a common prefix, all classes will +# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag +# can be used to specify a prefix (or a list of prefixes) that should be ignored +# while generating the index headers. +# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output +# The default value is: YES. + +GENERATE_HTML = YES + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a +# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of +# it. +# The default directory is: html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each +# generated HTML page (for example: .htm, .php, .asp). +# The default value is: .html. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a user-defined HTML header file for +# each generated HTML page. If the tag is left blank doxygen will generate a +# standard header. +# +# To get valid HTML the header file that includes any scripts and style sheets +# that doxygen needs, which is dependent on the configuration options used (e.g. +# the setting GENERATE_TREEVIEW). It is highly recommended to start with a +# default header using +# doxygen -w html new_header.html new_footer.html new_stylesheet.css +# YourConfigFile +# and then modify the file new_header.html. See also section "Doxygen usage" +# for information on how to generate the default header that doxygen normally +# uses. +# Note: The header is subject to change so you typically have to regenerate the +# default header when upgrading to a newer version of doxygen. For a description +# of the possible markers and block names see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_HEADER = + +# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each +# generated HTML page. If the tag is left blank doxygen will generate a standard +# footer. See HTML_HEADER for more information on how to generate a default +# footer and what special commands can be used inside the footer. See also +# section "Doxygen usage" for information on how to generate the default footer +# that doxygen normally uses. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_FOOTER = + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style +# sheet that is used by each HTML page. It can be used to fine-tune the look of +# the HTML output. If left blank doxygen will generate a default style sheet. +# See also section "Doxygen usage" for information on how to generate the style +# sheet that doxygen normally uses. +# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as +# it is more robust and this tag (HTML_STYLESHEET) will in the future become +# obsolete. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_STYLESHEET = + +# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined +# cascading style sheets that are included after the standard style sheets +# created by doxygen. Using this option one can overrule certain style aspects. +# This is preferred over using HTML_STYLESHEET since it does not replace the +# standard style sheet and is therefor more robust against future updates. +# Doxygen will copy the style sheet files to the output directory. +# Note: The order of the extra stylesheet files is of importance (e.g. the last +# stylesheet in the list overrules the setting of the previous ones in the +# list). For an example see the documentation. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_STYLESHEET = + +# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or +# other source files which should be copied to the HTML output directory. Note +# that these files will be copied to the base HTML output directory. Use the +# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these +# files. In the HTML_STYLESHEET file, use the file name only. Also note that the +# files will be copied as-is; there are no commands or markers available. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_EXTRA_FILES = + +# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen +# will adjust the colors in the stylesheet and background images according to +# this color. Hue is specified as an angle on a colorwheel, see +# http://en.wikipedia.org/wiki/Hue for more information. For instance the value +# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 +# purple, and 360 is red again. +# Minimum value: 0, maximum value: 359, default value: 220. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_HUE = 220 + +# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors +# in the HTML output. For a value of 0 the output will use grayscales only. A +# value of 255 will produce the most vivid colors. +# Minimum value: 0, maximum value: 255, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_SAT = 100 + +# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the +# luminance component of the colors in the HTML output. Values below 100 +# gradually make the output lighter, whereas values above 100 make the output +# darker. The value divided by 100 is the actual gamma applied, so 80 represents +# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not +# change the gamma. +# Minimum value: 40, maximum value: 240, default value: 80. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_COLORSTYLE_GAMMA = 80 + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting this +# to NO can help when comparing the output of multiple runs. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_TIMESTAMP = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_DYNAMIC_SECTIONS = NO + +# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries +# shown in the various tree structured indices initially; the user can expand +# and collapse entries dynamically later on. Doxygen will expand the tree to +# such a level that at most the specified number of entries are visible (unless +# a fully collapsed tree already exceeds this amount). So setting the number of +# entries 1 will produce a full collapsed tree by default. 0 is a special value +# representing an infinite number of entries and will result in a full expanded +# tree by default. +# Minimum value: 0, maximum value: 9999, default value: 100. +# This tag requires that the tag GENERATE_HTML is set to YES. + +HTML_INDEX_NUM_ENTRIES = 100 + +# If the GENERATE_DOCSET tag is set to YES, additional index files will be +# generated that can be used as input for Apple's Xcode 3 integrated development +# environment (see: http://developer.apple.com/tools/xcode/), introduced with +# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a +# Makefile in the HTML output directory. Running make will produce the docset in +# that directory and running make install will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at +# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html +# for more information. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_DOCSET = NO + +# This tag determines the name of the docset feed. A documentation feed provides +# an umbrella under which multiple documentation sets from a single provider +# (such as a company or product suite) can be grouped. +# The default value is: Doxygen generated docs. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# This tag specifies a string that should uniquely identify the documentation +# set bundle. This should be a reverse domain-name style string, e.g. +# com.mycompany.MyDocSet. Doxygen will append .docset to the name. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify +# the documentation publisher. This should be a reverse domain-name style +# string, e.g. com.mycompany.MyDocSet.documentation. +# The default value is: org.doxygen.Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_ID = org.doxygen.Publisher + +# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. +# The default value is: Publisher. +# This tag requires that the tag GENERATE_DOCSET is set to YES. + +DOCSET_PUBLISHER_NAME = Publisher + +# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three +# additional HTML index files: index.hhp, index.hhc, and index.hhk. The +# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop +# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on +# Windows. +# +# The HTML Help Workshop contains a compiler that can convert all HTML output +# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML +# files are now used as the Windows 98 help format, and will replace the old +# Windows help format (.hlp) on all Windows platforms in the future. Compressed +# HTML files also contain an index, a table of contents, and you can search for +# words in the documentation. The HTML workshop also contains a viewer for +# compressed HTML files. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_HTMLHELP = NO + +# The CHM_FILE tag can be used to specify the file name of the resulting .chm +# file. You can add a path in front of the file if the result should not be +# written to the html output directory. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_FILE = + +# The HHC_LOCATION tag can be used to specify the location (absolute path +# including file name) of the HTML help compiler ( hhc.exe). If non-empty +# doxygen will try to run the HTML help compiler on the generated index.hhp. +# The file has to be specified with full path. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +HHC_LOCATION = + +# The GENERATE_CHI flag controls if a separate .chi index file is generated ( +# YES) or that it should be included in the master .chm file ( NO). +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +GENERATE_CHI = NO + +# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) +# and project file content. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +CHM_INDEX_ENCODING = + +# The BINARY_TOC flag controls whether a binary table of contents is generated ( +# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it +# enables the Previous and Next buttons. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members to +# the table of contents of the HTML help documentation and to the tree view. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTMLHELP is set to YES. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and +# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that +# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help +# (.qch) of the generated HTML documentation. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify +# the file name of the resulting .qch file. The path specified is relative to +# the HTML output folder. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help +# Project output. For more information please see Qt Help Project / Namespace +# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_NAMESPACE = + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt +# Help Project output. For more information please see Qt Help Project / Virtual +# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- +# folders). +# The default value is: doc. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_VIRTUAL_FOLDER = doc + +# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom +# filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the +# custom filter to add. For more information please see Qt Help Project / Custom +# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- +# filters). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this +# project's filter section matches. Qt Help Project / Filter Attributes (see: +# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHP_SECT_FILTER_ATTRS = + +# The QHG_LOCATION tag can be used to specify the location of Qt's +# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the +# generated .qhp file. +# This tag requires that the tag GENERATE_QHP is set to YES. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be +# generated, together with the HTML files, they form an Eclipse help plugin. To +# install this plugin and make it available under the help contents menu in +# Eclipse, the contents of the directory containing the HTML and XML files needs +# to be copied into the plugins directory of eclipse. The name of the directory +# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. +# After copying Eclipse needs to be restarted before the help appears. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the Eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have this +# name. Each documentation set should have its own identifier. +# The default value is: org.doxygen.Project. +# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# If you want full control over the layout of the generated HTML pages it might +# be necessary to disable the index and replace it with your own. The +# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top +# of each HTML page. A value of NO enables the index and the value YES disables +# it. Since the tabs in the index contain the same information as the navigation +# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +DISABLE_INDEX = NO + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. If the tag +# value is set to YES, a side panel will be generated containing a tree-like +# index structure (just like the one that is generated for HTML Help). For this +# to work a browser that supports JavaScript, DHTML, CSS and frames is required +# (i.e. any modern browser). Windows users are probably better off using the +# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can +# further fine-tune the look of the index. As an example, the default style +# sheet generated by doxygen has an example that shows how to put an image at +# the root of the tree instead of the PROJECT_NAME. Since the tree basically has +# the same information as the tab index, you could consider setting +# DISABLE_INDEX to YES when enabling this option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +GENERATE_TREEVIEW = YES + +# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that +# doxygen will group on one line in the generated HTML documentation. +# +# Note that a value of 0 will completely suppress the enum values from appearing +# in the overview section. +# Minimum value: 0, maximum value: 20, default value: 4. +# This tag requires that the tag GENERATE_HTML is set to YES. + +ENUM_VALUES_PER_LINE = 4 + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used +# to set the initial width (in pixels) of the frame in which the tree is shown. +# Minimum value: 0, maximum value: 1500, default value: 250. +# This tag requires that the tag GENERATE_HTML is set to YES. + +TREEVIEW_WIDTH = 250 + +# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to +# external symbols imported via tag files in a separate window. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +EXT_LINKS_IN_WINDOW = NO + +# Use this tag to change the font size of LaTeX formulas included as images in +# the HTML documentation. When you change the font size after a successful +# doxygen run you need to manually remove any form_*.png images from the HTML +# output directory to force them to be regenerated. +# Minimum value: 8, maximum value: 50, default value: 10. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_FONTSIZE = 10 + +# Use the FORMULA_TRANPARENT tag to determine whether or not the images +# generated for formulas are transparent PNGs. Transparent PNGs are not +# supported properly for IE 6.0, but are supported on all modern browsers. +# +# Note that when changing this option you need to delete any form_*.png files in +# the HTML output directory before the changes have effect. +# The default value is: YES. +# This tag requires that the tag GENERATE_HTML is set to YES. + +FORMULA_TRANSPARENT = YES + +# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see +# http://www.mathjax.org) which uses client side Javascript for the rendering +# instead of using prerendered bitmaps. Use this if you do not have LaTeX +# installed or if you want to formulas look prettier in the HTML output. When +# enabled you may also need to install MathJax separately and configure the path +# to it using the MATHJAX_RELPATH option. +# The default value is: NO. +# This tag requires that the tag GENERATE_HTML is set to YES. + +USE_MATHJAX = NO + +# When MathJax is enabled you can set the default output format to be used for +# the MathJax output. See the MathJax site (see: +# http://docs.mathjax.org/en/latest/output.html) for more details. +# Possible values are: HTML-CSS (which is slower, but has the best +# compatibility), NativeMML (i.e. MathML) and SVG. +# The default value is: HTML-CSS. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_FORMAT = HTML-CSS + +# When MathJax is enabled you need to specify the location relative to the HTML +# output directory using the MATHJAX_RELPATH option. The destination directory +# should contain the MathJax.js script. For instance, if the mathjax directory +# is located at the same level as the HTML output directory, then +# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax +# Content Delivery Network so you can quickly see the result without installing +# MathJax. However, it is strongly recommended to install a local copy of +# MathJax from http://www.mathjax.org before deployment. +# The default value is: http://cdn.mathjax.org/mathjax/latest. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest + +# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax +# extension names that should be enabled during MathJax rendering. For example +# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_EXTENSIONS = + +# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces +# of code that will be used on startup of the MathJax code. See the MathJax site +# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an +# example see the documentation. +# This tag requires that the tag USE_MATHJAX is set to YES. + +MATHJAX_CODEFILE = + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for +# the HTML output. The underlying search engine uses javascript and DHTML and +# should work on any modern browser. Note that when using HTML help +# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) +# there is already a search function so this one should typically be disabled. +# For large projects the javascript based search engine can be slow, then +# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to +# search using the keyboard; to jump to the search box use + S +# (what the is depends on the OS and browser, but it is typically +# , /

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + name + + + + + name + url + + + + + name + slug + preference + + + + + name + slug + preference + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + PathToFileTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + name + slug + preference + + + + + name + slug + preference + + + + + name + slug + preference + + + + diff --git a/Preferences/PreferencePluginController.m b/Preferences/PreferencePluginController.m index 5fc5265a7..d6221cecc 100644 --- a/Preferences/PreferencePluginController.m +++ b/Preferences/PreferencePluginController.m @@ -16,7 +16,7 @@ self = [super init]; if (self) { - _plugins = [plugins retain]; + _plugins = plugins; _preferencePanes = [[NSMutableArray alloc] init]; } @@ -24,14 +24,6 @@ return self; } -- (void)dealloc -{ - [_plugins release]; - [_preferencePanes release]; - - [super dealloc]; -} - - (void)_searchForPlugins { for (NSBundle *plugin in _plugins) { diff --git a/Preferences/PreferencesController.m b/Preferences/PreferencesController.m index 9c4ce489d..3b15e5e18 100644 --- a/Preferences/PreferencesController.m +++ b/Preferences/PreferencesController.m @@ -26,19 +26,10 @@ // Set which panes are included, and their order. //[prefs setPanesOrder:[NSArray arrayWithObjects:@"General", @"Updating", @"A Non-Existent Preference Pane", nil]]; - [pluginController release]; } // Show the preferences window. [window show]; } - -- (void)dealloc -{ - [window release]; - - [super dealloc]; -} - @end diff --git a/Preferences/PreferencesWindow.m b/Preferences/PreferencesWindow.m index df407c12f..bf7471dc2 100644 --- a/Preferences/PreferencesWindow.m +++ b/Preferences/PreferencesWindow.m @@ -50,14 +50,6 @@ return self; } -- (void)dealloc -{ - [preferencePanes release]; - [toolbarItems release]; - - [super dealloc]; -} - - (NSString *)lastPaneDefaultsKey { return @"LastPreferencePane"; @@ -77,7 +69,6 @@ if (animate) { NSView *tempView = [[NSView alloc] initWithFrame:[[self contentView] frame]]; [self setContentView:tempView]; - [tempView release]; } NSRect newFrame = [self newFrameForNewContentView:view]; @@ -128,8 +119,6 @@ [item setAction:@selector(toolbarItemClicked:)]; // action called when item is clicked [toolbarItems setObject:item forKey:name]; - - [item release]; } NSString *bundleIdentifier = [[NSBundle mainBundle] bundleIdentifier]; @@ -142,7 +131,6 @@ [toolbar setSizeMode:NSToolbarSizeModeDefault]; [self setToolbar:toolbar]; - [toolbar release]; } diff --git a/Spotlight/SpotlightPlaylistEntry.m b/Spotlight/SpotlightPlaylistEntry.m index 62485810f..6a256e876 100644 --- a/Spotlight/SpotlightPlaylistEntry.m +++ b/Spotlight/SpotlightPlaylistEntry.m @@ -29,7 +29,7 @@ static NSDictionary *importKeys; NSArray *trackTransform = [NSArray arrayWithObjects:@"spotlightTrack", @"NumberToStringTransformer", nil]; - importKeys = [[NSDictionary dictionaryWithObjectsAndKeys: + importKeys = [NSDictionary dictionaryWithObjectsAndKeys: @"title", @"kMDItemTitle", @"album", @"kMDItemAlbum", trackTransform, @"kMDItemAudioTrackNumber", @@ -38,12 +38,12 @@ static NSDictionary *importKeys; @"length", @"kMDItemDurationSeconds", URLTransform, @"kMDItemPath", artistTransform, @"kMDItemAuthors", - nil]retain]; + nil]; } + (SpotlightPlaylistEntry *)playlistEntryWithMetadataItem:(NSMetadataItem *)metadataItem { - SpotlightPlaylistEntry *entry = [[[SpotlightPlaylistEntry alloc]init]autorelease]; + SpotlightPlaylistEntry *entry = [[SpotlightPlaylistEntry alloc]init]; // loop through the keys we want to extract for (NSString *mdKey in importKeys) { @@ -85,8 +85,6 @@ static NSDictionary *importKeys; { self.length = nil; self.spotlightTrack = nil; - - [super dealloc]; } diff --git a/Spotlight/SpotlightTransformers.m b/Spotlight/SpotlightTransformers.m index 6b5b5c15d..dc2eaf472 100644 --- a/Spotlight/SpotlightTransformers.m +++ b/Spotlight/SpotlightTransformers.m @@ -35,7 +35,6 @@ static SpotlightWindowController * searchController; - (void)dealloc { self.oldResults = nil; - [super dealloc]; } @synthesize oldResults; diff --git a/Spotlight/SpotlightWindowController.m b/Spotlight/SpotlightWindowController.m index 2810198f1..2709244b3 100644 --- a/Spotlight/SpotlightWindowController.m +++ b/Spotlight/SpotlightWindowController.m @@ -27,20 +27,20 @@ static NSPredicate * musicOnlyPredicate = nil; + (void)initialize { - musicOnlyPredicate = [[NSPredicate predicateWithFormat: - @"kMDItemContentTypeTree==\'public.audio\'"] retain]; + musicOnlyPredicate = [NSPredicate predicateWithFormat: + @"kMDItemContentTypeTree==\'public.audio\'"]; // Register value transformers - NSValueTransformer *pausingQueryTransformer = [[[PausingQueryTransformer alloc]init]autorelease]; + NSValueTransformer *pausingQueryTransformer = [[PausingQueryTransformer alloc]init]; [NSValueTransformer setValueTransformer:pausingQueryTransformer forName:@"PausingQueryTransformer"]; - NSValueTransformer *authorToArtistTransformer = [[[AuthorToArtistTransformer alloc]init]autorelease]; + NSValueTransformer *authorToArtistTransformer = [[AuthorToArtistTransformer alloc]init]; [NSValueTransformer setValueTransformer:authorToArtistTransformer forName:@"AuthorToArtistTransformer"]; - NSValueTransformer *pathToURLTransformer = [[[PathToURLTransformer alloc]init]autorelease]; + NSValueTransformer *pathToURLTransformer = [[PathToURLTransformer alloc]init]; [NSValueTransformer setValueTransformer:pathToURLTransformer forName:@"PathToURLTransformers"]; - NSValueTransformer *stringToSearchScopeTransformer = [[[StringToSearchScopeTransformer alloc]init]autorelease]; + NSValueTransformer *stringToSearchScopeTransformer = [[StringToSearchScopeTransformer alloc]init]; [NSValueTransformer setValueTransformer:stringToSearchScopeTransformer forName:@"StringToSearchScopeTransformer"]; } @@ -60,18 +60,18 @@ static NSPredicate * musicOnlyPredicate = nil; - (id)init { if (self = [super initWithWindowNibName:@"SpotlightPanel"]) { - self.query = [[[NSMetadataQuery alloc]init]autorelease]; + self.query = [[NSMetadataQuery alloc]init]; [self.query setDelegate:self]; self.query.sortDescriptors = [NSArray arrayWithObjects: - [[[NSSortDescriptor alloc]initWithKey:@"kMDItemAuthors" + [[NSSortDescriptor alloc]initWithKey:@"kMDItemAuthors" ascending:YES - selector:@selector(compareFirstString:)] autorelease], - [[[NSSortDescriptor alloc]initWithKey:@"kMDItemAlbum" + selector:@selector(compareFirstString:)], + [[NSSortDescriptor alloc]initWithKey:@"kMDItemAlbum" ascending:YES - selector:@selector(caseInsensitiveCompare:)] autorelease], - [[[NSSortDescriptor alloc]initWithKey:@"kMDItemAudioTrackNumber" + selector:@selector(caseInsensitiveCompare:)], + [[NSSortDescriptor alloc]initWithKey:@"kMDItemAudioTrackNumber" ascending:YES - selector:@selector(compareTrackNumbers:)] autorelease], + selector:@selector(compareTrackNumbers:)], nil]; // hook my query transformer up to me @@ -267,7 +267,6 @@ static NSPredicate * musicOnlyPredicate = nil; { self.query = nil; self.searchString = nil; - [super dealloc]; } - (IBAction)addToPlaylist:(id)sender diff --git a/ThirdParty/AppleRemote/AppleRemote.m b/ThirdParty/AppleRemote/AppleRemote.m index 62aa9945d..4dcdd9e8e 100644 --- a/ThirdParty/AppleRemote/AppleRemote.m +++ b/ThirdParty/AppleRemote/AppleRemote.m @@ -76,7 +76,7 @@ static AppleRemote *_o_sharedInstance = nil; - (id)init { if (_o_sharedInstance) { - [self dealloc]; + self = nil; } else { _o_sharedInstance = [super init]; _openInExclusiveMode = YES; @@ -105,7 +105,6 @@ static AppleRemote *_o_sharedInstance = nil; [mutableCookieToButtonMapping setObject:@(kRemoteControl_Switched) forKey:@"42_33_23_21_20_2_33_23_21_20_2_"]; _cookieToButtonMapping = [[NSDictionary alloc] initWithDictionary: mutableCookieToButtonMapping]; - [mutableCookieToButtonMapping release]; /* defaults */ _simulatePlusMinusHold = YES; @@ -117,8 +116,6 @@ static AppleRemote *_o_sharedInstance = nil; - (void) dealloc { [self stopListening:self]; - [_cookieToButtonMapping release]; - [super dealloc]; } - (int) remoteId { @@ -187,7 +184,6 @@ static AppleRemote *_o_sharedInstance = nil; AppleRemoteApplicationDelegate* appDelegate = (AppleRemoteApplicationDelegate*)[NSApp delegate]; id previousAppDelegate = [appDelegate applicationDelegate]; [NSApp setDelegate: previousAppDelegate]; - [appDelegate release]; } } @@ -235,10 +231,7 @@ static AppleRemote *_o_sharedInstance = nil; queue = NULL; } - if (_allCookies != nil) { - [_allCookies autorelease]; - _allCookies = nil; - } + _allCookies = nil; if (hidDeviceInterface != NULL) { //close the device @@ -276,18 +269,6 @@ static AppleRemote* sharedInstance=nil; - (id)copyWithZone:(NSZone *)zone { return self; } -- (id)retain { - return self; -} -- (NSUInteger)retainCount { - return UINT_MAX; //denotes an object that cannot be released -} -- (void)release { - //do nothing -} -- (id)autorelease { - return self; -} @end @@ -448,7 +429,7 @@ static AppleRemote* sharedInstance=nil; Will be called for any event of any type (cookie) to which we subscribe */ static void QueueCallbackFunction(void* target, IOReturn result, void* refcon, void* sender) { - AppleRemote* remote = (AppleRemote*)target; + AppleRemote* remote = (__bridge AppleRemote*)target; IOHIDEventStruct event; AbsoluteTime zeroTime = {0,0}; diff --git a/ThirdParty/GCWindowMenu/GCOneShotEffectTimer.m b/ThirdParty/GCWindowMenu/GCOneShotEffectTimer.m index 9027f44ee..b50e0dcf9 100644 --- a/ThirdParty/GCWindowMenu/GCOneShotEffectTimer.m +++ b/ThirdParty/GCWindowMenu/GCOneShotEffectTimer.m @@ -41,12 +41,14 @@ - (id) initWithTimeInterval:(NSTimeInterval) t forDelegate:(id) del { - [super init]; - [self setDelegate:del]; + if ((self = [super init])) + { + [self setDelegate:del]; - _total = t; - _timer = [NSTimer scheduledTimerWithTimeInterval:1/60.0f target:self selector:@selector(osfx_callback:) userInfo:nil repeats:YES]; - _start = [NSDate timeIntervalSinceReferenceDate]; + _total = t; + _timer = [NSTimer scheduledTimerWithTimeInterval:1/60.0f target:self selector:@selector(osfx_callback:) userInfo:nil repeats:YES]; + _start = [NSDate timeIntervalSinceReferenceDate]; + } return self; } @@ -55,8 +57,6 @@ - (void) dealloc { [_timer invalidate]; - [_delegate release]; - [super dealloc]; } @@ -65,8 +65,6 @@ // delegate is retained and released when one-shot completes. This allows some effects to work even // though the original delegate might be released by the caller. - [del retain]; - [_delegate release]; _delegate = del; } @@ -91,8 +89,6 @@ if ( _delegate && [_delegate respondsToSelector:@selector(oneShotComplete)]) [_delegate oneShotComplete]; - - [self release]; } else { diff --git a/ThirdParty/GCWindowMenu/GCWindowMenu.m b/ThirdParty/GCWindowMenu/GCWindowMenu.m index 6e17189f0..2bb84f15b 100644 --- a/ThirdParty/GCWindowMenu/GCWindowMenu.m +++ b/ThirdParty/GCWindowMenu/GCWindowMenu.m @@ -81,9 +81,9 @@ if ( menu == nil ) menu = [GCWindowMenu windowMenu]; - [menu retain]; - - loc = [[event window] convertBaseToScreen:loc]; + NSRect rect = NSMakeRect(loc.x, loc.y, 0.0, 0.0); + rect = [[event window] convertRectToScreen:rect]; + loc = NSMakePoint(rect.origin.x, rect.origin.y); [menu setFrameTopLeftPoint:loc]; [[event window] addChildWindow:menu ordered:NSWindowAbove]; @@ -98,7 +98,6 @@ // all done, tear down - remove with a fade effect [GCOneShotEffectTimer oneShotWithTime:0.15 forDelegate:menu]; - [menu release]; } @@ -130,7 +129,7 @@ // will cause a crash due to the stale reference [fi setReleasedWhenClosed:NO]; // **** important!! **** - return [fi autorelease]; + return fi; } @@ -381,10 +380,16 @@ { if(([event window] != self) && [event isMouseEventType]) { - NSPoint glob = [[event window] convertBaseToScreen:[event locationInWindow]]; + NSPoint pt = [event locationInWindow]; + NSRect rect = NSMakeRect(pt.x, pt.y, 0.0, 0.0); + rect = [[event window] convertRectToScreen:rect]; + NSPoint glob = NSMakePoint(rect.origin.x, rect.origin.y); + rect = NSMakeRect(glob.x, glob.y, 0.0, 0.0); + rect = [self convertRectFromScreen:rect]; + pt = NSMakePoint(rect.origin.x, rect.origin.y); return [NSEvent mouseEventWithType: [event type] - location: [self convertScreenToBase:glob] + location: pt modifierFlags: [event modifierFlags] timestamp: [event timestamp] windowNumber: [self windowNumber] @@ -435,8 +440,6 @@ - (void) setMainView:(NSView*) aView sizeToFit:(BOOL) stf { - [aView retain]; - [_mainView release]; _mainView = aView; // add as a subview which retains it as well diff --git a/ThirdParty/ImageTextCell/ImageTextCell.m b/ThirdParty/ImageTextCell/ImageTextCell.m index f7a4eaebc..d9e3a6044 100644 --- a/ThirdParty/ImageTextCell/ImageTextCell.m +++ b/ThirdParty/ImageTextCell/ImageTextCell.m @@ -3,22 +3,17 @@ @implementation ImageTextCell - (void)dealloc { - [image release]; image = nil; - [super dealloc]; } - copyWithZone:(NSZone *)zone { ImageTextCell *cell = (ImageTextCell *)[super copyWithZone:zone]; - cell->image = [image retain]; + cell->image = image; return cell; } - (void)setImage:(NSImage *)anImage { - if (anImage != image) { - [image release]; - image = [anImage retain]; - } + image = anImage; } - (NSImage *)image { diff --git a/ThirdParty/OpenURLPanel/OpenURLPanel.m b/ThirdParty/OpenURLPanel/OpenURLPanel.m index cc5de3ec3..b2fec402d 100755 --- a/ThirdParty/OpenURLPanel/OpenURLPanel.m +++ b/ThirdParty/OpenURLPanel/OpenURLPanel.m @@ -74,13 +74,14 @@ static OpenURLPanel *openURLPanel = nil; - (id)init { - [super init]; + if ((self = [super init])) + { + // init + [self setURLArray:[NSMutableArray arrayWithCapacity:10]]; - // init - [self setURLArray:[NSMutableArray arrayWithCapacity:10]]; - - // listen for app termination notifications - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(writeURLs:) name:NSApplicationWillTerminateNotification object:NSApp]; + // listen for app termination notifications + [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(writeURLs:) name:NSApplicationWillTerminateNotification object:NSApp]; + } return self; } @@ -89,7 +90,6 @@ static OpenURLPanel *openURLPanel = nil; { [[NSNotificationCenter defaultCenter] removeObserver:self]; [self setURLArray:nil]; - [super dealloc]; } // getters @@ -126,8 +126,6 @@ static OpenURLPanel *openURLPanel = nil; // setters - (void)setURLArray:(NSMutableArray *)urlLArray { - [urlLArray retain]; - [mUrlArray retain]; mUrlArray = urlLArray; } diff --git a/ThirdParty/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m b/ThirdParty/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m index ce3b9f48c..b0262c37a 100644 --- a/ThirdParty/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m +++ b/ThirdParty/SPMediaKeyTap/SPInvocationGrabbing/NSObject+SPInvocationGrabbing.m @@ -28,20 +28,15 @@ free(frameStrings); self.object = nil; self.invocation = nil; - [super dealloc]; } @synthesize invocation = _invocation, object = _object; @synthesize backgroundAfterForward, onMainAfterForward, waitUntilDone; - (void)runInBackground; { - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; - @try { + @autoreleasepool { [self invoke]; } - @finally { - [pool drain]; - } } @@ -98,7 +93,7 @@ @implementation NSObject (SPInvocationGrabbing) -(id)grab; { - return [[[SPInvocationGrabber alloc] initWithObject:self] autorelease]; + return [[SPInvocationGrabber alloc] initWithObject:self]; } -(id)invokeAfter:(NSTimeInterval)delta; { diff --git a/ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m b/ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m index e22912d1e..e53f1c67b 100644 --- a/ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m +++ b/ThirdParty/SPMediaKeyTap/SPMediaKeyTap.m @@ -37,8 +37,6 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv { [self stopWatchingMediaKeys]; [self stopWatchingAppSwitching]; - [_mediaKeyAppList release]; - [super dealloc]; } -(void)startWatchingAppSwitching; @@ -46,11 +44,11 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv // Listen to "app switched" event, so that we don't intercept media keys if we // weren't the last "media key listening" app to be active EventTypeSpec eventType = { kEventClassApplication, kEventAppFrontSwitched }; - OSStatus err = InstallApplicationEventHandler(NewEventHandlerUPP(appSwitched), 1, &eventType, self, &_app_switching_ref); + OSStatus err = InstallApplicationEventHandler(NewEventHandlerUPP(appSwitched), 1, &eventType, (__bridge void *)(self), &_app_switching_ref); assert(err == noErr); eventType.eventKind = kEventAppTerminated; - err = InstallApplicationEventHandler(NewEventHandlerUPP(appTerminated), 1, &eventType, self, &_app_terminating_ref); + err = InstallApplicationEventHandler(NewEventHandlerUPP(appTerminated), 1, &eventType, (__bridge void *)(self), &_app_terminating_ref); assert(err == noErr); } -(void)stopWatchingAppSwitching; @@ -72,7 +70,7 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv kCGEventTapOptionDefault, CGEventMaskBit(NX_SYSDEFINED), tapEventCallback, - self); + (__bridge void *)(self)); assert(_eventPort != NULL); _eventPortSource = CFMachPortCreateRunLoopSource(kCFAllocatorSystemDefault, _eventPort, 0); @@ -122,27 +120,28 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv { return [NSArray arrayWithObjects: [[NSBundle mainBundle] bundleIdentifier], // your app - @"com.spotify.client", - @"com.apple.iTunes", - @"com.apple.QuickTimePlayerX", - @"com.apple.quicktimeplayer", - @"com.apple.iWork.Keynote", - @"com.apple.iPhoto", - @"org.videolan.vlc", - @"com.apple.Aperture", - @"com.plexsquared.Plex", - @"com.soundcloud.desktop", - @"org.niltsh.MPlayerX", - @"com.ilabs.PandorasHelper", - @"com.mahasoftware.pandabar", - @"com.bitcartel.pandorajam", - @"org.clementine-player.clementine", - @"fm.last.Last.fm", - @"fm.last.Scrobbler", - @"com.beatport.BeatportPro", - @"com.Timenut.SongKey", - @"com.macromedia.fireworks", // the tap messes up their mouse input - nil + @"com.spotify.client", + @"com.apple.iTunes", + @"com.apple.QuickTimePlayerX", + @"com.apple.quicktimeplayer", + @"com.apple.iWork.Keynote", + @"com.apple.iPhoto", + @"org.videolan.vlc", + @"com.apple.Aperture", + @"com.plexsquared.Plex", + @"com.soundcloud.desktop", + @"org.niltsh.MPlayerX", + @"com.ilabs.PandorasHelper", + @"com.mahasoftware.pandabar", + @"com.bitcartel.pandorajam", + @"org.clementine-player.clementine", + @"fm.last.Last.fm", + @"fm.last.Scrobbler", + @"com.beatport.BeatportPro", + @"com.Timenut.SongKey", + @"com.macromedia.fireworks", // the tap messes up their mouse input + @"at.justp.Theremin", + nil ]; } @@ -183,7 +182,7 @@ static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEv static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) { - SPMediaKeyTap *self = refcon; + SPMediaKeyTap *self = (__bridge SPMediaKeyTap *)(refcon); if(type == kCGEventTapDisabledByTimeout) { NSLog(@"Media key event tap was disabled by timeout"); @@ -213,7 +212,6 @@ static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGE if (![self shouldInterceptMediaKeyEvents]) return event; - [nsEvent retain]; // matched in handleAndReleaseMediaKeyEvent: [self performSelectorOnMainThread:@selector(handleAndReleaseMediaKeyEvent:) withObject:nsEvent waitUntilDone:NO]; return NULL; @@ -221,17 +219,14 @@ static CGEventRef tapEventCallback2(CGEventTapProxy proxy, CGEventType type, CGE static CGEventRef tapEventCallback(CGEventTapProxy proxy, CGEventType type, CGEventRef event, void *refcon) { - NSAutoreleasePool *pool = [NSAutoreleasePool new]; - CGEventRef ret = tapEventCallback2(proxy, type, event, refcon); - [pool drain]; - return ret; + @autoreleasepool { + return tapEventCallback2(proxy, type, event, refcon); + } } // event will have been retained in the other thread -(void)handleAndReleaseMediaKeyEvent:(NSEvent *)event { - [event autorelease]; - [_delegate mediaKeyTap:self receivedMediaKeyEvent:event]; } @@ -279,10 +274,10 @@ NSString *kIgnoreMediaKeysDefaultsKey = @"SPIgnoreMediaKeys"; { NSValue *psnv = [NSValue valueWithBytes:&psn objCType:@encode(ProcessSerialNumber)]; - NSDictionary *processInfo = [(id)ProcessInformationCopyDictionary( + NSDictionary *processInfo = (__bridge id)ProcessInformationCopyDictionary( &psn, kProcessDictionaryIncludeAllInformationMask - ) autorelease]; + ); NSString *bundleIdentifier = [processInfo objectForKey:(id)kCFBundleIdentifierKey]; NSArray *whitelistIdentifiers = [[NSUserDefaults standardUserDefaults] arrayForKey:kMediaKeyUsingBundleIdentifiersDefaultsKey]; @@ -301,7 +296,7 @@ NSString *kIgnoreMediaKeysDefaultsKey = @"SPIgnoreMediaKeys"; static pascal OSStatus appSwitched (EventHandlerCallRef nextHandler, EventRef evt, void* userData) { - SPMediaKeyTap *self = (id)userData; + SPMediaKeyTap *self = (__bridge id)userData; ProcessSerialNumber newSerial; GetFrontProcess(&newSerial); @@ -313,7 +308,7 @@ static pascal OSStatus appSwitched (EventHandlerCallRef nextHandler, EventRef ev static pascal OSStatus appTerminated (EventHandlerCallRef nextHandler, EventRef evt, void* userData) { - SPMediaKeyTap *self = (id)userData; + SPMediaKeyTap *self = (__bridge id)userData; ProcessSerialNumber deadPSN; diff --git a/ThirdParty/ToolTip/ToolTipWindow.m b/ThirdParty/ToolTip/ToolTipWindow.m index 5c3febec4..db3470a3e 100644 --- a/ThirdParty/ToolTip/ToolTipWindow.m +++ b/ThirdParty/ToolTip/ToolTipWindow.m @@ -4,8 +4,7 @@ - (void)setBackgroundColor:(NSColor *)bgColor { - [backgroundColor release]; - backgroundColor = [bgColor retain]; + backgroundColor = bgColor; } - (NSColor *)backgroundColor { @@ -62,9 +61,7 @@ [self setFrame:[self frameRectForContentRect:[field frame]] display:NO]; [field setStringValue:@" "]; // Just having at least 1 char to allow the next message... - textAttributes = [[[field attributedStringValue] attributesAtIndex:0 effectiveRange:nil] retain]; - - [field release]; + textAttributes = [[field attributedStringValue] attributesAtIndex:0 effectiveRange:nil]; } return self; @@ -75,10 +72,7 @@ { if (closeTimer) { [closeTimer invalidate]; - [closeTimer release]; } - [tooltipObject release]; - [super dealloc]; } - (id)toolTip { return tooltipObject; } @@ -87,8 +81,7 @@ { id contentView = [self contentView]; - [tooltipObject release]; - tooltipObject = [tip retain]; + tooltipObject = tip; if ([contentView isKindOfClass:[NSTextField class]]) { if ([tip isKindOfClass:[NSString class]]) [contentView setStringValue:tip]; @@ -101,15 +94,15 @@ { [self orderFront:nil]; - if (closeTimer) { [closeTimer invalidate]; [closeTimer release]; } + if (closeTimer) { [closeTimer invalidate]; } - closeTimer = [[NSTimer timerWithTimeInterval:duration target:self selector:@selector(close) userInfo:nil repeats:NO] retain]; + closeTimer = [NSTimer timerWithTimeInterval:duration target:self selector:@selector(close) userInfo:nil repeats:NO]; [[NSRunLoop currentRunLoop] addTimer:closeTimer forMode:NSRunLoopCommonModes]; } - (void)orderFront { - if (closeTimer) { [closeTimer invalidate]; [closeTimer release]; closeTimer = nil; } + if (closeTimer) { [closeTimer invalidate]; closeTimer = nil; } [super orderFront:nil]; } diff --git a/Transformers/FontSizetoLineHeightTransformer.m b/Transformers/FontSizetoLineHeightTransformer.m index e675a3782..9e3eeb3f6 100644 --- a/Transformers/FontSizetoLineHeightTransformer.m +++ b/Transformers/FontSizetoLineHeightTransformer.m @@ -19,7 +19,6 @@ NSFont *font = [NSFont systemFontOfSize:[(NSNumber *)value floatValue]]; NSLayoutManager *layoutManager = [[NSLayoutManager alloc]init]; float fRowSize = [layoutManager defaultLineHeightForFont:font]; - [layoutManager release]; return [NSNumber numberWithFloat: fRowSize]; } diff --git a/Utils/SideViewController.h b/Utils/SideViewController.h index 5f9f68a0e..c04fd190c 100644 --- a/Utils/SideViewController.h +++ b/Utils/SideViewController.h @@ -7,6 +7,7 @@ // #import +#import "PlaylistController.h" @interface SideViewController : NSViewController { IBOutlet NSSplitView *splitView; @@ -24,4 +25,10 @@ - (void)setDividerPosition:(float)position; - (float)dividerPosition; +- (void)doAddToPlaylist:(NSArray *)urls origin:(URLOrigin)origin; + +- (void)clear:(id)sender; + +- (void)playPauseResume:(id)sender; + @end diff --git a/Utils/TrackingSlider.m b/Utils/TrackingSlider.m index 0dcb01461..3e982d03e 100644 --- a/Utils/TrackingSlider.m +++ b/Utils/TrackingSlider.m @@ -30,7 +30,7 @@ static NSString *TrackingSliderValueObservationContext = @"TrackingSliderValueOb - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if ([TrackingSliderValueObservationContext isEqual:context]) + if ([TrackingSliderValueObservationContext isEqual:(__bridge id)(context)]) { if (![self isTracking]) { @@ -48,12 +48,12 @@ static NSString *TrackingSliderValueObservationContext = @"TrackingSliderValueOb { if ([binding isEqualToString:@"value"]) { - [observableController addObserver:self forKeyPath:keyPath options:(NSKeyValueObservingOptionNew) context:TrackingSliderValueObservationContext]; + [observableController addObserver:self forKeyPath:keyPath options:(NSKeyValueObservingOptionNew) context:(__bridge void * _Nullable)(TrackingSliderValueObservationContext)]; NSDictionary *bindingsData = [NSDictionary dictionaryWithObjectsAndKeys: observableController, NSObservedObjectKey, - [[keyPath copy] autorelease], NSObservedKeyPathKey, - [[options copy] autorelease], NSOptionsKey, nil]; + [keyPath copy], NSObservedKeyPathKey, + [options copy], NSOptionsKey, nil]; [bindingInfo setObject:bindingsData forKey:binding]; } diff --git a/Window/NowPlayingBarView.m b/Window/NowPlayingBarView.m index aaab33989..921508150 100644 --- a/Window/NowPlayingBarView.m +++ b/Window/NowPlayingBarView.m @@ -61,11 +61,5 @@ NSRectFillListWithColors(gridRects, colorRects, count); } -- (void)dealloc -{ - [gradient release]; - [super dealloc]; -} - @end diff --git a/Window/PlaybackButtons.m b/Window/PlaybackButtons.m index a93de9c62..205652ef8 100644 --- a/Window/PlaybackButtons.m +++ b/Window/PlaybackButtons.m @@ -20,8 +20,6 @@ static NSString *PlaybackButtonsPlaybackStatusObservationContext = @"PlaybackBut - (void)dealloc { [self stopObserving]; - - [super dealloc]; } - (void)awakeFromNib @@ -31,7 +29,7 @@ static NSString *PlaybackButtonsPlaybackStatusObservationContext = @"PlaybackBut - (void)startObserving { - [playbackController addObserver:self forKeyPath:@"playbackStatus" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial) context:PlaybackButtonsPlaybackStatusObservationContext]; + [playbackController addObserver:self forKeyPath:@"playbackStatus" options:(NSKeyValueObservingOptionNew | NSKeyValueObservingOptionInitial) context:(__bridge void * _Nullable)(PlaybackButtonsPlaybackStatusObservationContext)]; } - (void)stopObserving @@ -41,7 +39,7 @@ static NSString *PlaybackButtonsPlaybackStatusObservationContext = @"PlaybackBut - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context { - if ([PlaybackButtonsPlaybackStatusObservationContext isEqual:context]) + if ([PlaybackButtonsPlaybackStatusObservationContext isEqual:(__bridge id)(context)]) { NSInteger playbackStatus = [[change objectForKey:NSKeyValueChangeNewKey] integerValue]; diff --git a/Window/VolumeSlider.m b/Window/VolumeSlider.m index 28d048aff..e3b6140a8 100644 --- a/Window/VolumeSlider.m +++ b/Window/VolumeSlider.m @@ -46,8 +46,6 @@ [toolTip setToolTip:text]; [toolTip setFrame:NSMakeRect(mouseLocation.x, mouseLocation.y, size.width, size.height) display:YES]; - - [text release]; } - (void)showToolTip diff --git a/es.lproj/Credits.html b/es.lproj/Credits.html new file mode 100644 index 000000000..6ff360281 --- /dev/null +++ b/es.lproj/Credits.html @@ -0,0 +1,9 @@ + + + Now with 92% more future! +

+ This program has been made possible through contributions from users like you. +

+ All Cog code is copyrighted by me, and is licensed under the GPL. Cog contains bits of other code from third parties that are under their own licenses. + + diff --git a/es.lproj/Feedback.xib b/es.lproj/Feedback.xib new file mode 100644 index 000000000..3b03636b6 --- /dev/null +++ b/es.lproj/Feedback.xib @@ -0,0 +1,914 @@ + + + + 1050 + 11E53 + 1938 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + YES + NSTextField + NSView + NSScrollView + NSWindowTemplate + NSProgressIndicator + NSTextFieldCell + NSTextView + NSButtonCell + NSButton + NSScroller + NSCustomObject + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + FeedbackController + + + FirstResponder + + + NSApplication + + + 3 + 2 + {{168, 357}, {480, 376}} + 1886913536 + Send Feedback + NSWindow + + View + + + {213, 107} + + + 256 + + YES + + + 256 + {{80, 295}, {356, 22}} + + + + YES + + -1804468671 + 4195328 + + + LucidaGrande + 13 + 1044 + + + YES + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 6 + System + textColor + + 3 + MAA + + + + + + + 256 + {{17, 297}, {58, 17}} + + + + YES + + 67239424 + 4194304 + Subject: + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + + + + 256 + {{17, 262}, {66, 17}} + + + + YES + + 67239424 + 4194304 + Message: + + + + + + + + + 256 + + YES + + + 2304 + + YES + + + 2322 + + YES + + YES + Apple HTML pasteboard type + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + Apple URL pasteboard type + CorePasteboardFlavorType 0x6D6F6F76 + NSColor pasteboard type + NSFilenamesPboardType + NSStringPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT RTFD pasteboard type + NeXT Rich Text Format v1.0 pasteboard type + NeXT TIFF v4.0 pasteboard type + NeXT font pasteboard type + NeXT ruler pasteboard type + WebURLsWithTitlesPboardType + public.url + + + {438, 14} + + + + + + + + + + + + + YES + + + 6 + + + + 438 + 1 + + + 67120103 + 0 + + + + YES + + YES + NSBackgroundColor + NSColor + + + YES + + 6 + System + selectedTextBackgroundColor + + + + 6 + System + selectedTextColor + + + + + + + YES + + YES + NSColor + NSUnderline + + + YES + + 1 + MCAwIDEAA + + + + + + + 1 + + 6 + {863, 10000000} + {83, 0} + + + + {{1, 1}, {438, 197}} + + + + + + + {4, 5} + + 12582912 + + YES + + YES + + + + TU0AKgAAAHCAFUqgBVKsAAAAwdVQUqwaEQeIRGJRGFlYqwWLQ+JxuOQpVRmEx2RROKwOQyOUQSPyaUym +SxqWyKXyeYxyZzWbSuJTScRCbz2Nz+gRKhUOfTqeUai0OSxiWTiBQSHSGFquGwekxyAgAAAOAQAAAwAA +AAEAEAAAAQEAAwAAAAEAEAAAAQIAAwAAAAIACAAIAQMAAwAAAAEABQAAAQYAAwAAAAEAAQAAAREABAAA +AAEAAAAIARIAAwAAAAEAAQAAARUAAwAAAAEAAgAAARYAAwAAAAEAEAAAARcABAAAAAEAAABnARwAAwAA +AAEAAQAAAT0AAwAAAAEAAgAAAVIAAwAAAAEAAQAAAVMAAwAAAAIAAQABAAAAAA + + + + + + 3 + MCAwAA + + + + 4 + + + + 256 + {{424, 1}, {15, 197}} + + + + + _doScroller: + 0.66445180000000004 + + + + -2147483392 + {{-100, -100}, {87, 18}} + + + + 1 + + _doScroller: + 1 + 0.94565220000000005 + + + {{20, 55}, {440, 199}} + + + + 133138 + + + + + + + 256 + {{306, 12}, {82, 32}} + + + + YES + + 67239424 + 134217728 + Cancel + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 256 + {{388, 12}, {78, 32}} + + + YES + + 67239424 + 134217728 + Send + + + -2038284033 + 1 + + + + + + 200 + 25 + + + + + 1280 + + {{444, 340}, {16, 16}} + + + + 20746 + 100 + + + + 256 + {{80, 337}, {356, 22}} + + + + YES + + -1804468671 + 272630784 + + + + YES + + + + + + + 256 + {{17, 339}, {71, 17}} + + + + YES + + 67239424 + 272629760 + Email: + + + + + + + + {480, 376} + + + + + {{0, 0}, {1280, 1002}} + {213, 129} + {10000000000000, 10000000000000} + YES + + + + + YES + + + subjectView + + + + 36 + + + + fromView + + + + 37 + + + + messageView + + + + 38 + + + + sendingIndicator + + + + 39 + + + + sendFeedback: + + + + 40 + + + + cancel: + + + + 41 + + + + window + + + + 42 + + + + initialFirstResponder + + + + 23 + + + + nextKeyView + + + + 33 + + + + nextKeyView + + + + 24 + + + + nextKeyView + + + + 28 + + + + nextKeyView + + + + 30 + + + + nextKeyView + + + + 26 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + FeedbackWindow + + + 3 + + + YES + + + + + + + + + + + + + + 4 + + + YES + + + + + + 5 + + + YES + + + + + + 6 + + + YES + + + + + + 7 + + + YES + + + + + + 8 + + + YES + + + + + + 9 + + + YES + + + + + + 10 + + + YES + + + + + + 11 + + + YES + + + + + + + + 12 + + + + + 13 + + + + + 14 + + + + + 15 + + + + + 16 + + + + + 17 + + + + + 18 + + + + + 19 + + + + + 20 + + + + + 21 + + + + + 22 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1.IBPluginDependency + 1.IBWindowTemplateEditedContentRect + 10.IBPluginDependency + 11.IBPluginDependency + 12.IBPluginDependency + 13.IBPluginDependency + 14.IBPluginDependency + 15.IBPluginDependency + 16.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 19.IBPluginDependency + 20.IBPluginDependency + 21.IBPluginDependency + 22.IBPluginDependency + 3.IBPluginDependency + 4.IBPluginDependency + 5.IBPluginDependency + 6.IBPluginDependency + 7.IBPluginDependency + 8.IBPluginDependency + 9.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{124, 381}, {480, 376}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 42 + + + + YES + + FeedbackController + NSWindowController + + YES + + YES + cancel: + sendFeedback: + + + YES + id + id + + + + YES + + YES + cancel: + sendFeedback: + + + YES + + cancel: + id + + + sendFeedback: + id + + + + + YES + + YES + fromView + messageView + sendingIndicator + subjectView + + + YES + NSTextField + NSTextView + NSProgressIndicator + NSTextField + + + + YES + + YES + fromView + messageView + sendingIndicator + subjectView + + + YES + + fromView + NSTextField + + + messageView + NSTextView + + + sendingIndicator + NSProgressIndicator + + + subjectView + NSTextField + + + + + IBProjectSource + ./Classes/FeedbackController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/es.lproj/FileTree.xib b/es.lproj/FileTree.xib new file mode 100644 index 000000000..ee583e4c5 --- /dev/null +++ b/es.lproj/FileTree.xib @@ -0,0 +1,1763 @@ + + + + 1050 + 11E53 + 1938 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + YES + NSScroller + NSMenuItem + NSMenu + NSScrollView + NSTextFieldCell + NSPathCell + NSBox + NSPathControl + NSOutlineView + NSCustomView + NSCustomObject + NSTableColumn + NSUserDefaultsController + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + FileTreeViewController + + + FirstResponder + + + NSApplication + + + FileTreeDataSource + + + YES + + + PathWatcher + + + + 274 + + YES + + + 274 + + YES + + + 2304 + + YES + + + 4384 + {300, 373} + + + + YES + + + -2147483392 + {{-26, 0}, {16, 17}} + + + YES + + 297 + 16 + 1000 + + 75628096 + 2048 + + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772097 + 2048 + Text Cell + + LucidaGrande + 13 + 1044 + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + + + + 3 + 5 + + 6 + System + _sourceListBackgroundColor + + 6 + System + alternateSelectedControlColor + + 1 + MCAwIDEAA + + + + + 6 + System + gridColor + + 3 + MC41AA + + + 18 + 1514143744 + + + FileTree + 4 + 15 + 0 + YES + 1 + 1 + 1 + 14 + + + {300, 373} + + + + + + 2 + + + + -2147483392 + {{261, 0}, {15, 363}} + + + + + _doScroller: + 0.99736150000000001 + + + + -2147483392 + {{0, 362}, {306, 15}} + + + + 1 + + _doScroller: + 0.99674267100977199 + + + {300, 373} + + + + 133680 + + + + QSAAAEEgAABBuAAAQbgAAA + + + + 266 + + YES + + + 274 + {{1, 1}, {298, 0}} + + + + + + {{0, 373}, {300, 1}} + + + + _NS:2411 + {0, 0} + + 67239424 + 0 + Box + + + 6 + System + textBackgroundColor + + 3 + MQA + + + + 3 + MCAwLjgwMDAwMDAxMTkAA + + + + 3 + 4 + 0 + NO + + 6 + System + scrollBarColor + + + + 6 + System + textColor + + + + + + 266 + + YES + + YES + Apple URL pasteboard type + NSFilenamesPboardType + + + {{0, 374}, {300, 26}} + + + + YES + + 337772033 + 32768 + + + + 6 + System + windowBackgroundColor + + + + YES + + 2 + + + + + {300, 400} + + + + NSView + + + FileTreeController + + + Menu + + YES + + + Add to Playlist + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + 1 + + + + Set as Playlist + + 1048576 + 2147483647 + + + 2 + + + + YES + YES + + + 2147483647 + + + + + + Show in Finder + + 1048576 + 2147483647 + + + 3 + + + + YES + YES + + + 2147483647 + + + + + + Set as Root + + 1048576 + 2147483647 + + + 4 + + + + + + + YES + + + view + + + + 103 + + + + firstResponder + + + + 140 + + + + fileTreeOutlineView + + + + 141 + + + + watcher + + + + 34 + + + + outlineView + + + + 88 + + + + pathControl + + + + 109 + + + + delegate + + + + 33 + + + + nextKeyView + + + + 104 + + + + value: values.fileTreeRootURL + + + + + + value: values.fileTreeRootURL + value + values.fileTreeRootURL + + NSValueTransformerName + StringToURLTransformer + + 2 + + + 108 + + + + rowHeight: values.fontSize + + + + + + rowHeight: values.fontSize + rowHeight + values.fontSize + + NSValueTransformerName + FontSizetoLineHeightTransformer + + 2 + + + 86 + + + + dataSource + + + + 87 + + + + delegate + + + + 98 + + + + menu + + + + 121 + + + + fontSize: values.fontSize + + + + + + fontSize: values.fontSize + fontSize + values.fontSize + 2 + + + 93 + + + + outlineView + + + + 95 + + + + controller + + + + 106 + + + + addToPlaylist: + + + + 122 + + + + showEntryInFinder: + + + + 123 + + + + setAsRoot: + + + + 125 + + + + setAsPlaylist: + + + + 130 + + + + dataSource + + + + 137 + + + + delegate + + + + 139 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 9 + + + FileTreeDataSource + + + 27 + + + + + 31 + + + + + 55 + + + YES + + + + + + File Tree View + + + 64 + + + YES + + + + + + + + 65 + + + YES + + + + + + 66 + + + + + 67 + + + + + 68 + + + + + 69 + + + YES + + + + + + 70 + + + YES + + + + + + 71 + + + + + 94 + + + + + 110 + + + YES + + + + + + + + + ContextualMenu + + + 112 + + + + + 119 + + + + + 124 + + + + + 126 + + + + + 128 + + + + + 129 + + + + + 147 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 110.IBPluginDependency + 112.IBPluginDependency + 119.IBPluginDependency + 124.IBPluginDependency + 126.IBPluginDependency + 128.IBPluginDependency + 129.IBPluginDependency + 147.IBPluginDependency + 27.IBPluginDependency + 31.IBPluginDependency + 55.IBPluginDependency + 64.IBPluginDependency + 65.IBPluginDependency + 66.IBPathControlIntegration.allowedTypes + 66.IBPluginDependency + 67.IBPluginDependency + 68.IBPluginDependency + 69.CustomClassName + 69.IBPluginDependency + 70.IBPluginDependency + 71.CustomClassName + 71.IBPluginDependency + 9.IBPluginDependency + 94.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + YES + Type + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + FileTreeOutlineView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + FileIconCell + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 147 + + + + YES + + DNDArrayController + NSArrayController + + tableView + NSTableView + + + tableView + + tableView + NSTableView + + + + IBProjectSource + ./Classes/DNDArrayController.h + + + + EntriesController + NSObject + + IBProjectSource + ./Classes/EntriesController.h + + + + FileIconCell + ImageTextCell + + IBProjectSource + ./Classes/FileIconCell.h + + + + FileTreeController + NSObject + + YES + + YES + addToPlaylist: + setAsPlaylist: + setAsRoot: + showEntryInFinder: + + + YES + id + id + id + id + + + + YES + + YES + addToPlaylist: + setAsPlaylist: + setAsRoot: + showEntryInFinder: + + + YES + + addToPlaylist: + id + + + setAsPlaylist: + id + + + setAsRoot: + id + + + showEntryInFinder: + id + + + + + YES + + YES + controller + dataSource + outlineView + + + YES + SideViewController + FileTreeDataSource + NSOutlineView + + + + YES + + YES + controller + dataSource + outlineView + + + YES + + controller + SideViewController + + + dataSource + FileTreeDataSource + + + outlineView + NSOutlineView + + + + + IBProjectSource + ./Classes/FileTreeController.h + + + + FileTreeDataSource + NSObject + + YES + + YES + outlineView + pathControl + watcher + + + YES + NSOutlineView + NSPathControl + PathWatcher + + + + YES + + YES + outlineView + pathControl + watcher + + + YES + + outlineView + NSOutlineView + + + pathControl + NSPathControl + + + watcher + PathWatcher + + + + + IBProjectSource + ./Classes/FileTreeDataSource.h + + + + FileTreeOutlineView + NSOutlineView + + IBProjectSource + ./Classes/FileTreeOutlineView.h + + + + FileTreeViewController + SideViewController + + YES + + YES + fileTreeOutlineView + playbackController + playlistLoader + + + YES + FileTreeOutlineView + PlaybackController + PlaylistLoader + + + + YES + + YES + fileTreeOutlineView + playbackController + playlistLoader + + + YES + + fileTreeOutlineView + FileTreeOutlineView + + + playbackController + PlaybackController + + + playlistLoader + PlaylistLoader + + + + + IBProjectSource + ./Classes/FileTreeViewController.h + + + + ImageTextCell + NSTextFieldCell + + IBProjectSource + ./Classes/ImageTextCell.h + + + + PathWatcher + NSObject + + delegate + id + + + delegate + + delegate + id + + + + IBProjectSource + ./Classes/PathWatcher.h + + + + PlaybackController + NSObject + + YES + + YES + changeVolume: + eventSeekBackward: + eventSeekForward: + fade: + next: + pause: + pauseResume: + play: + playPauseResume: + prev: + resume: + seek: + skipToNextAlbum: + skipToPreviousAlbum: + stop: + volumeDown: + volumeUp: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + changeVolume: + eventSeekBackward: + eventSeekForward: + fade: + next: + pause: + pauseResume: + play: + playPauseResume: + prev: + resume: + seek: + skipToNextAlbum: + skipToPreviousAlbum: + stop: + volumeDown: + volumeUp: + + + YES + + changeVolume: + id + + + eventSeekBackward: + id + + + eventSeekForward: + id + + + fade: + id + + + next: + id + + + pause: + id + + + pauseResume: + id + + + play: + id + + + playPauseResume: + id + + + prev: + id + + + resume: + id + + + seek: + id + + + skipToNextAlbum: + id + + + skipToPreviousAlbum: + id + + + stop: + id + + + volumeDown: + id + + + volumeUp: + id + + + + + YES + + YES + outputDevices + playlistController + playlistView + volumeSlider + + + YES + NSArrayController + PlaylistController + PlaylistView + NSSlider + + + + YES + + YES + outputDevices + playlistController + playlistView + volumeSlider + + + YES + + outputDevices + NSArrayController + + + playlistController + PlaylistController + + + playlistView + PlaylistView + + + volumeSlider + NSSlider + + + + + IBProjectSource + ./Classes/PlaybackController.h + + + + PlaylistController + DNDArrayController + + YES + + YES + clear: + clearFilterPredicate: + emptyQueueList: + searchByAlbum: + searchByArtist: + showEntryInFinder: + stopAfterCurrent: + toggleQueued: + toggleRepeat: + toggleShuffle: + + + YES + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + clear: + clearFilterPredicate: + emptyQueueList: + searchByAlbum: + searchByArtist: + showEntryInFinder: + stopAfterCurrent: + toggleQueued: + toggleRepeat: + toggleShuffle: + + + YES + + clear: + id + + + clearFilterPredicate: + id + + + emptyQueueList: + id + + + searchByAlbum: + id + + + searchByArtist: + id + + + showEntryInFinder: + id + + + stopAfterCurrent: + id + + + toggleQueued: + id + + + toggleRepeat: + id + + + toggleShuffle: + id + + + + + YES + + YES + entriesController + playbackController + playlistLoader + spotlightWindowController + + + YES + EntriesController + PlaybackController + PlaylistLoader + SpotlightWindowController + + + + YES + + YES + entriesController + playbackController + playlistLoader + spotlightWindowController + + + YES + + entriesController + EntriesController + + + playbackController + PlaybackController + + + playlistLoader + PlaylistLoader + + + spotlightWindowController + SpotlightWindowController + + + + + IBProjectSource + ./Classes/PlaylistController.h + + + + PlaylistLoader + NSObject + + playlistController + PlaylistController + + + playlistController + + playlistController + PlaylistController + + + + IBProjectSource + ./Classes/PlaylistLoader.h + + + + PlaylistView + NSTableView + + YES + + YES + scrollToCurrentEntry: + shufflePlaylist: + sortByPath: + toggleColumn: + + + YES + id + id + id + id + + + + YES + + YES + scrollToCurrentEntry: + shufflePlaylist: + sortByPath: + toggleColumn: + + + YES + + scrollToCurrentEntry: + id + + + shufflePlaylist: + id + + + sortByPath: + id + + + toggleColumn: + id + + + + + YES + + YES + playbackController + playlistController + + + YES + PlaybackController + PlaylistController + + + + YES + + YES + playbackController + playlistController + + + YES + + playbackController + PlaybackController + + + playlistController + PlaylistController + + + + + IBProjectSource + ./Classes/PlaylistView.h + + + + SideViewController + NSViewController + + YES + + YES + toggleSideView: + toggleVertical: + + + YES + id + id + + + + YES + + YES + toggleSideView: + toggleVertical: + + + YES + + toggleSideView: + id + + + toggleVertical: + id + + + + + YES + + YES + firstResponder + mainView + splitView + + + YES + NSView + NSView + NSSplitView + + + + YES + + YES + firstResponder + mainView + splitView + + + YES + + firstResponder + NSView + + + mainView + NSView + + + splitView + NSSplitView + + + + + IBProjectSource + ./Classes/SideViewController.h + + + + SpotlightWindowController + NSWindowController + + YES + + YES + addToPlaylist: + pathComponentClicked: + toggleWindow: + + + YES + id + id + id + + + + YES + + YES + addToPlaylist: + pathComponentClicked: + toggleWindow: + + + YES + + addToPlaylist: + id + + + pathComponentClicked: + id + + + toggleWindow: + id + + + + + YES + + YES + pathControl + playlistController + playlistLoader + searchField + + + YES + NSPathControl + NSArrayController + PlaylistLoader + NSSearchField + + + + YES + + YES + pathControl + playlistController + playlistLoader + searchField + + + YES + + pathControl + NSPathControl + + + playlistController + NSArrayController + + + playlistLoader + PlaylistLoader + + + searchField + NSSearchField + + + + + IBProjectSource + ./Classes/SpotlightWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {11, 11} + {10, 3} + + + + diff --git a/es.lproj/InfoInspector.xib b/es.lproj/InfoInspector.xib new file mode 100644 index 000000000..a05be4117 --- /dev/null +++ b/es.lproj/InfoInspector.xib @@ -0,0 +1,1526 @@ + + + + 1050 + 11G63b + 2549 + 1138.51 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 2549 + + + YES + NSCustomObject + NSImageCell + NSImageView + NSTextField + NSTextFieldCell + NSUserDefaultsController + NSView + NSWindowTemplate + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + InfoWindowController + + + FirstResponder + + + NSApplication + + + 8219 + 2 + {{700, 80}, {300, 450}} + -1538259968 + Info Inspector + NSPanel + + + {400, 600} + {240, 420} + + + 256 + + YES + + + 268 + {{69, 416}, {37, 14}} + + + + YES + + 68288064 + 272761856 + Artist: + + LucidaGrande + 11 + 3100 + + + + 6 + System + controlColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 1 + MSAxIDEAA + + + + + + 268 + {{63, 394}, {43, 14}} + + + + YES + + 68288064 + 272761856 + Album: + + + + + + + + + 268 + {{68, 350}, {38, 14}} + + + + YES + + 68288064 + 272761856 + Track: + + + + + + + + + 268 + {{61, 328}, {45, 14}} + + + + YES + + 68288064 + 272761856 + Length: + + + + + + + + + 268 + {{74, 306}, {32, 14}} + + + + YES + + 68288064 + 272761856 + Year: + + + + + + + + + 268 + {{66, 284}, {40, 14}} + + + + YES + + 68288064 + 272761856 + Genre: + + + + + + + + + 268 + {{33, 240}, {73, 14}} + + + + YES + + 68288064 + 272761856 + Sample Rate: + + + + + + + + + 268 + {{49, 218}, {57, 14}} + + + + YES + + 68288064 + 272761856 + Channels: + + + + + + + + + 268 + {{64, 196}, {42, 14}} + + + + YES + + 68288064 + 272761856 + Bitrate: + + + + + + + + + 268 + {{17, 174}, {89, 14}} + + + + YES + + 68288064 + 272761856 + Bits Per Sample: + + + + + + + + + 268 + {{74, 372}, {32, 14}} + + + + YES + + 68288064 + 272761856 + Title: + + + + + + + + + 266 + {{113, 416}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 394}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 372}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 350}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 328}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 306}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 284}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 240}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 218}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 196}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 266 + {{113, 174}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 268 + {{50, 262}, {56, 14}} + + + + YES + + 68288064 + 272761856 + Filename: + + + + + + + + + 266 + {{113, 262}, {170, 14}} + + + + YES + + 67239488 + 272763392 + N/A + + + + + + + + + 274 + + YES + + YES + Apple PDF pasteboard type + Apple PICT pasteboard type + Apple PNG pasteboard type + NSFilenamesPboardType + NeXT Encapsulated PostScript v1.2 pasteboard type + NeXT TIFF v4.0 pasteboard type + + + {{17, 17}, {266, 138}} + + + + YES + + 671219200 + 33554432 + 0 + 0 + 0 + NO + + YES + + + {300, 450} + + + + + {{0, 0}, {1280, 1002}} + {240, 439} + {400, 619} + InfoInspector + YES + + + YES + + + BlankZeroFormatter + + + SecondsFormatter + + + + + YES + + + window + + + + 83 + + + + value: valueToDisplay.artist + + + + + + value: valueToDisplay.artist + value + valueToDisplay.artist + 2 + + + 108 + + + + value: valueToDisplay.album + + + + + + value: valueToDisplay.album + value + valueToDisplay.album + 2 + + + 109 + + + + value: valueToDisplay.title + + + + + + value: valueToDisplay.title + value + valueToDisplay.title + 2 + + + 110 + + + + formatter + + + + 82 + + + + value: valueToDisplay.track + + + + + + value: valueToDisplay.track + value + valueToDisplay.track + 2 + + + 111 + + + + formatter + + + + 81 + + + + value: valueToDisplay.length + + + + + + value: valueToDisplay.length + value + valueToDisplay.length + 2 + + + 112 + + + + value: valueToDisplay.year + + + + + + value: valueToDisplay.year + value + valueToDisplay.year + 2 + + + 113 + + + + formatter + + + + 107 + + + + value: valueToDisplay.genre + + + + + + value: valueToDisplay.genre + value + valueToDisplay.genre + 2 + + + 114 + + + + value: valueToDisplay.sampleRate + + + + + + value: valueToDisplay.sampleRate + value + valueToDisplay.sampleRate + 2 + + + 116 + + + + value: valueToDisplay.channels + + + + + + value: valueToDisplay.channels + value + valueToDisplay.channels + 2 + + + 117 + + + + value: valueToDisplay.bitrate + + + + + + value: valueToDisplay.bitrate + value + valueToDisplay.bitrate + 2 + + + 118 + + + + value: valueToDisplay.bitsPerSample + + + + + + value: valueToDisplay.bitsPerSample + value + valueToDisplay.bitsPerSample + 2 + + + 122 + + + + value: valueToDisplay.filename + + + + + + value: valueToDisplay.filename + value + valueToDisplay.filename + 2 + + + 115 + + + + value: valueToDisplay.albumArt + + + + + + value: valueToDisplay.albumArt + value + valueToDisplay.albumArt + + YES + + YES + NSAllowsEditingMultipleValuesSelection + NSConditionallySetsEnabled + NSValueTransformerName + + + YES + + + MissingAlbumArtTransformer + + + 2 + + + 121 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + + + 2 + + + YES + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 9 + + + YES + + + + + + 10 + + + + + 11 + + + YES + + + + + + 12 + + + + + 13 + + + YES + + + + + + 14 + + + + + 15 + + + YES + + + + + + 16 + + + + + 17 + + + YES + + + + + + 18 + + + + + 19 + + + YES + + + + + + 20 + + + + + 21 + + + YES + + + + + + 22 + + + + + 23 + + + YES + + + + + + 24 + + + + + 27 + + + YES + + + + + + 28 + + + + + 29 + + + YES + + + + + + 30 + + + YES + + + + + + 31 + + + + + 32 + + + + + 58 + + + + + 79 + + + + + 80 + + + + + 84 + + + YES + + + + + + 85 + + + + + 45 + + + YES + + + + + + 46 + + + + + 39 + + + YES + + + + + + 40 + + + + + 55 + + + YES + + + + + + 56 + + + + + 41 + + + YES + + + + + + 42 + + + + + 35 + + + YES + + + + + + 36 + + + + + 53 + + + YES + + + + + + 54 + + + + + 43 + + + YES + + + + + + 44 + + + + + 86 + + + YES + + + + + + 87 + + + + + 51 + + + YES + + + + + + 52 + + + + + 49 + + + YES + + + + + + 50 + + + + + 33 + + + YES + + + + + + 34 + + + + + 37 + + + YES + + + + + + 38 + + + + + 95 + + + YES + + + + + + 96 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1.IBNSWindowAutoPositionCentersHorizontal + 1.IBNSWindowAutoPositionCentersVertical + 1.IBPluginDependency + 1.IBWindowTemplateEditedContentRect + 1.NSWindowTemplate.visibleAtLaunch + 10.IBPluginDependency + 11.IBPluginDependency + 12.IBPluginDependency + 13.IBPluginDependency + 14.IBPluginDependency + 15.IBPluginDependency + 16.IBPluginDependency + 17.IBPluginDependency + 18.IBPluginDependency + 19.IBPluginDependency + 2.IBPluginDependency + 20.IBPluginDependency + 21.IBPluginDependency + 22.IBPluginDependency + 23.IBPluginDependency + 24.IBPluginDependency + 27.IBPluginDependency + 28.IBPluginDependency + 29.IBPluginDependency + 30.IBPluginDependency + 31.IBPluginDependency + 32.IBPluginDependency + 33.CustomClassName + 33.IBPluginDependency + 34.IBPluginDependency + 35.CustomClassName + 35.IBPluginDependency + 36.IBPluginDependency + 37.CustomClassName + 37.IBPluginDependency + 38.IBPluginDependency + 39.CustomClassName + 39.IBPluginDependency + 40.IBPluginDependency + 41.CustomClassName + 41.IBPluginDependency + 42.IBPluginDependency + 43.CustomClassName + 43.IBPluginDependency + 44.IBPluginDependency + 45.CustomClassName + 45.IBPluginDependency + 46.IBPluginDependency + 49.CustomClassName + 49.IBPluginDependency + 50.IBPluginDependency + 51.CustomClassName + 51.IBPluginDependency + 52.IBPluginDependency + 53.CustomClassName + 53.IBPluginDependency + 54.IBPluginDependency + 55.CustomClassName + 55.IBPluginDependency + 56.IBPluginDependency + 58.IBPluginDependency + 79.IBPluginDependency + 80.IBPluginDependency + 84.IBPluginDependency + 85.IBPluginDependency + 86.CustomClassName + 86.IBPluginDependency + 87.IBPluginDependency + 9.IBPluginDependency + 95.IBPluginDependency + 96.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + com.apple.InterfaceBuilder.CocoaPlugin + {{548, 275}, {351, 498}} + + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + ToolTipTextField + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 122 + + + + YES + + BlankZeroFormatter + NSFormatter + + IBProjectSource + ./Classes/BlankZeroFormatter.h + + + + InfoWindowController + NSWindowController + + toggleWindow: + id + + + toggleWindow: + + toggleWindow: + id + + + + YES + + YES + appController + currentEntryController + playlistSelectionController + + + YES + id + id + id + + + + YES + + YES + appController + currentEntryController + playlistSelectionController + + + YES + + appController + id + + + currentEntryController + id + + + playlistSelectionController + id + + + + + IBProjectSource + ./Classes/InfoWindowController.h + + + + SecondsFormatter + NSFormatter + + IBProjectSource + ./Classes/SecondsFormatter.h + + + + ToolTipTextField + NSTextField + + IBProjectSource + ./Classes/ToolTipTextField.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + diff --git a/es.lproj/InfoPlist.strings b/es.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..c35a04ddbff54f41828c676dce2a19cc624c9a2b GIT binary patch literal 250 zcmXYr%L>9k3`OtSuP82yS`h?6+$e~GbYa1LwbLrvX=zo^Kk_HlGoysbO)@8s&pT46 zKpRy$DAh$LJ!OKXdssZfzR*g{Lqb%V~}jAG`O zXrLLd%YUT;ox;XSw1O>RthP`oU8(lI(~&jP8*V9d^!t7@UQF6iwOnuT?ve!7b-U|( P + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Total Duration: %{value1}@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + StatusImageTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + FontSizetoLineHeightTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + All + (title contains[cd] $value) OR (artist contains[cd] $value) OR (album contains[cd] $value) OR (genre contains[cd] $value) + + + + + Title + title contains[cd] $value + + + + + Artist + artist contains[cd] $value + + + + + + Album + artist contains[cd] $value + + + + + + + + Genre + genre contains[cd] $value + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cog + Cog + Cog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Cog + Cog + Cog + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + + + + + + +CA + + + + + + + + + + + + + + + +CA + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + RepeatAllTransformer + + + + + + + + + + + + + + RepeatAlbumTransformer + + + + + + + + + + + + RepeatOneTransformer + + + + + + + + + + + + + + + RepeatNoneTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + ShuffleAllTransformer + + + + + + + + + + ShuffleAlbumsTransformer + + + + + + + + + + ShuffleOffTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +Gw + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + + + + + + + + + + + + + MiniModeMenuTitleTransformer + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + current + index + artist + album + title + genre + track + year + length + channels + bitsPerSample + bitrate + url + sampleRate + seekable + artists + display + self + relativePath + base + URL.lastPathComponent + URL.path.lastPathComponent + filename + path + status + queued + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Not Playing + + + + + + + + + + + + + + Not Playing + + + + + + + + + + + + + + + NSIsNil + + + + + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + ToggleQueueTitleTransformer + Toggle Queued + Toggle Queued + Toggle Queued + Toggle Queued + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + + + + NSIsNotNil + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + display + length + seekable + queued + title + artist + + + + + + + + queued + title + artist + album + + + + + + + + + + + + + + + + + + + + + + + + + + +YnBsaXN0MDDUAQIDBAUGRkdYJHZlcnNpb25YJG9iamVjdHNZJGFyY2hpdmVyVCR0b3ASAAGGoK8QDwcI +ExQZHh8qKyw0NzpAQ1UkbnVsbNUJCgsMDQ4PEBESVk5TU2l6ZVYkY2xhc3NcTlNJbWFnZUZsYWdzVk5T +UmVwc1dOU0NvbG9ygAKADhIgwAAAgAOADFh7MTcsIDE3fdIVChYYWk5TLm9iamVjdHOhF4AEgAvSFQoa +HaIbHIAFgAaAChAA1iAhCiIjJCUmJygpHl8QEE5TQ2FjaGVXaW5kb3dCUFNfEBdOU0NhY2hlV2luZG93 +Q29sb3JTcGFjZV8QFE5TVElGRlJlcHJlc2VudGF0aW9uXxAQTlNDYWNoZVdpbmRvd0JQUF8QFU5TQ2Fj +aGVXaW5kb3dJc1BsYW5hchAIgAiACYAHEBhPERAuTU0AKgAAA/iAACBQOCQWDQeEQmBAaBgmBvGFRGJR +OFB8LgcqCYGgYertuPM3xSRQoFwMIQMGwMJAcHhIRoYujo7g11tcNJZwBZiNBksc+QNpQQBUMMgQCAUQ +AsHg4RBenB8KBQLhwHg8GhgMBwPBsRiIPhUMhMPBIMBsKg16vh7AIaPldgAAuJtgBkh4zAAumAwG58vR +3JOCCMSCtIHI7nQ2j0cjcBA0HA4AA4GSkGAwFAABgQBgB0ORygAJhYLAB7vl9ABzNtigAPvFPgB8tpxg +BsiE9Xg4HxNN5sNAzwQDggFGJUKlTpYmkslgd4c24Q0FZcE9MAM5hsQAPV0ugABwbjqBOZTgALPxcAB9 +N15AByheQmZFKdhsdfLQiwN8wMZIVGJBcDsN42Aqe8CAAA0DwMA6GHadp4AAchkGQAB6HGcMJgGfgACA +H0LH8eJqgAfhznYABzn8KgAEKXZzHIUZLkgHqBnAgYOjSN45F6RpDkKEp+x8ADgsuf5/n6ABm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LS5BQldOU0NvbG9yokEz +0i0uREVXTlNJbWFnZaJEM18QD05TS2V5ZWRBcmNoaXZlctFISVRyb290gAEACAARABoAIwAtADIANwBJ +AE8AWgBhAGgAdQB8AIQAhgCIAI0AjwCRAJoAnwCqAKwArgCwALUAuAC6ALwAvgDAAM0A4AD6AREBJAE8 +AT4BQAFCAUQBRhF4EZQRmRGkEa0RwBHEEdcR4hHrEfAR+BH7EgASDxITEhoSIhIvEjQSNhI4Ej0SRRJI +Ek0SVRJYEmoSbRJyAAAAAAAAAgEAAAAAAAAASgAAAAAAAAAAAAAAAAAAEnQ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/es.lproj/OpenURLPanel.xib b/es.lproj/OpenURLPanel.xib new file mode 100644 index 000000000..dee80ff5a --- /dev/null +++ b/es.lproj/OpenURLPanel.xib @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/es.lproj/SpotlightPanel.xib b/es.lproj/SpotlightPanel.xib new file mode 100644 index 000000000..a59ad9e5a --- /dev/null +++ b/es.lproj/SpotlightPanel.xib @@ -0,0 +1,2110 @@ + + + + 1050 + 11E53 + 1938 + 1138.47 + 569.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 1938 + + + YES + NSMenuItem + NSMenu + NSButton + NSCustomObject + NSArrayController + NSTableView + NSSearchField + NSTextField + NSSearchFieldCell + NSWindowTemplate + NSTextFieldCell + NSButtonCell + NSTableColumn + NSView + NSScrollView + NSUserDefaultsController + NSPathControl + NSScroller + NSTableHeaderView + NSPathCell + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + PluginDependencyRecalculationVersion + + + + YES + + SpotlightWindowController + + + FirstResponder + + + NSApplication + + + 31 + 2 + {{196, 192}, {480, 320}} + -1610611712 + Spotlight + NSPanel + + + {400, 260} + + + 256 + + YES + + + 265 + {{335, 275}, {131, 32}} + + + + YES + + 67239424 + 134217728 + Add to Playlist + + LucidaGrande + 13 + 1044 + + + -2038284033 + 129 + + DQ + 200 + 25 + + + + + 274 + + YES + + + 2304 + + YES + + + 4370 + {438, 210} + + + + YES + + + 256 + {438, 17} + + + + + + + + 256 + {{425, 0}, {16, 17}} + + + YES + + title + 129 + 41 + 1000 + + 75628096 + 2048 + Title + + LucidaGrande + 11 + 3100 + + + 3 + MC4zMzMzMzI5OQA + + + 6 + System + headerTextColor + + 3 + MAA + + + + + 337772096 + 2048 + Text Cell + + + + 6 + System + controlBackgroundColor + + 3 + MC42NjY2NjY2NjY3AA + + + + 6 + System + controlTextColor + + + + 3 + YES + + + title + YES + caseInsensitiveCompare: + + + + artist + 124 + 36 + 1000 + + 75628096 + 2048 + Artist + + + 6 + System + headerColor + + 3 + MQA + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + + + artist + YES + caseInsensitiveCompare: + + + + album + 127 + 39 + 1000 + + 75628096 + 2048 + Album + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + + + album + YES + caseInsensitiveCompare: + + + + length + 50 + 40.62012 + 1000 + + 75628096 + 67110912 + Length + + + + + + 337772096 + 67110912 + Text Cell + + + + + + 3 + YES + + YES + + + year + 47 + 10 + 1000 + + 75628096 + 67110912 + Year + + + + + + 337772096 + 67110912 + Text Cell + + + + + + 3 + YES + + YES + + + genre + 46 + 10 + 1000 + + 75628096 + 2048 + Genre + + + + + + 337772096 + 2048 + Text Cell + + + + + + 3 + YES + + + genre + YES + caseInsensitiveCompare: + + YES + + + track + 46 + 8 + 46 + + 75628096 + 67110912 + Track + + + + + + 337772096 + 67110912 + Text Cell + + + + + + 3 + YES + + + spotlightTrack + YES + compareTrackNumbers: + + + + 3 + 2 + + + 6 + System + gridColor + + 3 + MC41AA + + + 17 + -608141312 + + + CogSpotlightPlaylist + 1 + 15 + 0 + YES + 0 + 1 + + + {{1, 17}, {438, 210}} + + + + + + 2 + + + + 256 + {{424, 17}, {15, 210}} + + + + + _doScroller: + 0.81927709999999998 + + + + -2147483392 + {{-100, -100}, {440, 15}} + + + + 1 + + _doScroller: + 0.92631580000000002 + + + + 2304 + + YES + + + {{1, 0}, {438, 17}} + + + + + + 4 + + + {{20, 44}, {440, 228}} + + + + 133138 + + + + + AAAAAAAAAABBmAAAQZgAAA + + + + 266 + {{20, 282}, {313, 22}} + + + + YES + + 343014976 + 268436480 + + + + YES + 1 + + 6 + System + textBackgroundColor + + + + + 130560 + 0 + search + + _searchFieldSearch: + + 138690815 + 0 + + 400 + 75 + + + 130560 + 0 + clear + + YES + + YES + + YES + AXDescription + NSAccessibilityEncodedAttributesValueType + + + YES + cancel + + + + + + _searchFieldCancel: + + 138690815 + 0 + + 400 + 75 + + 255 + + + + + 289 + {{174, 13}, {108, 17}} + + + + YES + + 67239488 + 272630784 + Search Location: + + + + 6 + System + controlColor + + + + + + + + 289 + + YES + + YES + Apple URL pasteboard type + NSFilenamesPboardType + + + {{284, 9}, {176, 26}} + + + + YES + + 337772033 + 32768 + + + + YES + + 2 + + + + + {480, 320} + + + + + {{0, 0}, {1280, 1002}} + {400, 276} + {10000000000000, 10000000000000} + Spotlight + YES + + + + YES + title + year + artist + album + genre + length + track + spotlightTrack + + SpotlightPlaylistEntry + YES + + YES + + + ContextualMenu + + YES + + + Show in Finder + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + + + + + YES + + + + + YES + + + window + + + + 72 + + + + pathControl + + + + 159 + + + + playlistController + + + + 161 + + + + addToPlaylist: + + + + 163 + + + + searchField + + + + 179 + + + + pathComponentClicked: + + + + 216 + + + + initialFirstResponder + + + + 61 + + + + nextKeyView + + + + 205 + + + + tableView + + + + 149 + + + + spotlightWindowController + + + + 160 + + + + showEntryInFinder: + + + + 175 + + + + contentArray: query.results + + + + + + contentArray: query.results + contentArray + query.results + 2 + + + 213 + + + + nextKeyView + + + + 206 + + + + dataSource + + + + 151 + + + + menu + + + + 176 + + + + playlistController + + + + 184 + + + + rowHeight: values.fontSize + + + + + + rowHeight: values.fontSize + rowHeight + values.fontSize + + NSValueTransformerName + FontSizetoLineHeightTransformer + + 2 + + + 197 + + + + value: arrangedObjects.spotlightTrack + + + + + + value: arrangedObjects.spotlightTrack + value + arrangedObjects.spotlightTrack + + YES + + YES + NSAllowsEditingMultipleValuesSelection + NSAlwaysPresentsApplicationModalAlerts + NSConditionallySetsEditable + NSConditionallySetsEnabled + NSContinuouslyUpdatesValue + NSCreatesSortDescriptor + NSMultipleValuesPlaceholder + NSNoSelectionPlaceholder + NSNotApplicablePlaceholder + NSNullPlaceholder + NSRaisesForNotApplicableKeys + NSValidatesImmediately + + + YES + + + + + + + + + + + + + + + 2 + + + 195 + + + + fontSize: values.fontSize + + + + + + fontSize: values.fontSize + fontSize + values.fontSize + 2 + + + 203 + + + + value: arrangedObjects.genre + + + + + + value: arrangedObjects.genre + value + arrangedObjects.genre + + NSConditionallySetsEditable + + + 2 + + + 102 + + + + fontSize: values.fontSize + + + + + + fontSize: values.fontSize + fontSize + values.fontSize + 2 + + + 212 + + + + value: arrangedObjects.year + + + + + + value: arrangedObjects.year + value + arrangedObjects.year + + NSConditionallySetsEditable + + + 2 + + + 94 + + + + fontSize: values.fontSize + + + + + + fontSize: values.fontSize + fontSize + values.fontSize + 2 + + + 211 + + + + value: arrangedObjects.length + + + + + + value: arrangedObjects.length + value + arrangedObjects.length + + NSConditionallySetsEditable + + + 2 + + + 105 + + + + fontSize: values.fontSize + + + + + + fontSize: values.fontSize + fontSize + values.fontSize + 2 + + + 208 + + + + value: arrangedObjects.album + + + + + + value: arrangedObjects.album + value + arrangedObjects.album + + NSConditionallySetsEditable + + + 2 + + + 101 + + + + fontSize: values.fontSize + + + + + + fontSize: values.fontSize + fontSize + values.fontSize + 2 + + + 201 + + + + value: arrangedObjects.artist + + + + + + value: arrangedObjects.artist + value + arrangedObjects.artist + + NSConditionallySetsEditable + + + 2 + + + 104 + + + + fontSize: values.fontSize + + + + + + fontSize: values.fontSize + fontSize + values.fontSize + 2 + + + 199 + + + + value: arrangedObjects.title + + + + + + value: arrangedObjects.title + value + arrangedObjects.title + + NSConditionallySetsEditable + + + 2 + + + 93 + + + + fontSize: values.fontSize + + + + + + fontSize: values.fontSize + fontSize + values.fontSize + 2 + + + 198 + + + + value: searchString + + + + + + value: searchString + value + searchString + 2 + + + 154 + + + + nextKeyView + + + + 204 + + + + value: values.spotlightSearchPath + + + + + + value: values.spotlightSearchPath + value + values.spotlightSearchPath + + NSValueTransformerName + StringToURLTransformer + + 2 + + + 193 + + + + nextKeyView + + + + 207 + + + + delegate + + + + 214 + + + + + YES + + 0 + + YES + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 1 + + + YES + + + + + + 2 + + + YES + + + + + + + + + + 5 + + + YES + + + + + + 6 + + + + + 16 + + + + + 79 + + + YES + + + + + + 80 + + + + + 88 + + + YES + + + + + + 89 + + + + + 55 + + + YES + + + + + + 56 + + + + + 24 + + + YES + + + + + + + + + 28 + + + YES + + + + + + + + + + + + 36 + + + YES + + + + + + 37 + + + + + 34 + + + YES + + + + + + 39 + + + + + 33 + + + YES + + + + + + 40 + + + + + 32 + + + YES + + + + + + 41 + + + + + 31 + + + YES + + + + + + 42 + + + + + 30 + + + YES + + + + + + 43 + + + + + 29 + + + YES + + + + + + 44 + + + YES + + + + + 27 + + + + + 26 + + + + + 25 + + + + + 171 + + + YES + + + + + + 172 + + + + + 186 + + + + + + + YES + + YES + -1.IBPluginDependency + -2.IBPluginDependency + -3.IBPluginDependency + 1.IBPluginDependency + 1.IBWindowTemplateEditedContentRect + 1.NSWindowTemplate.visibleAtLaunch + 16.CustomClassName + 16.IBPluginDependency + 171.IBPluginDependency + 172.IBPluginDependency + 186.IBPluginDependency + 2.IBPluginDependency + 24.IBPluginDependency + 25.IBPluginDependency + 26.IBPluginDependency + 27.IBPluginDependency + 28.CustomClassName + 28.IBPluginDependency + 29.IBPluginDependency + 30.IBPluginDependency + 31.IBPluginDependency + 32.IBPluginDependency + 33.IBPluginDependency + 34.IBPluginDependency + 36.IBPluginDependency + 37.IBPluginDependency + 39.IBPluginDependency + 40.IBPluginDependency + 41.IBPluginDependency + 42.IBPluginDependency + 43.IBPluginDependency + 44.IBPluginDependency + 5.IBPluginDependency + 55.IBPluginDependency + 56.IBPluginDependency + 6.IBPluginDependency + 79.IBPluginDependency + 80.IBPluginDependency + 88.IBPluginDependency + 89.IBPluginDependency + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + {{30, 13}, {480, 320}} + + SpotlightPlaylistController + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + PlaylistView + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + + + YES + + + + + + YES + + + + + 216 + + + + YES + + DNDArrayController + NSArrayController + + tableView + NSTableView + + + tableView + + tableView + NSTableView + + + + IBProjectSource + ./Classes/DNDArrayController.h + + + + EntriesController + NSObject + + IBProjectSource + ./Classes/EntriesController.h + + + + PlaybackController + NSObject + + YES + + YES + changeVolume: + eventSeekBackward: + eventSeekForward: + fade: + next: + pause: + pauseResume: + play: + playPauseResume: + prev: + resume: + seek: + skipToNextAlbum: + skipToPreviousAlbum: + stop: + volumeDown: + volumeUp: + + + YES + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + changeVolume: + eventSeekBackward: + eventSeekForward: + fade: + next: + pause: + pauseResume: + play: + playPauseResume: + prev: + resume: + seek: + skipToNextAlbum: + skipToPreviousAlbum: + stop: + volumeDown: + volumeUp: + + + YES + + changeVolume: + id + + + eventSeekBackward: + id + + + eventSeekForward: + id + + + fade: + id + + + next: + id + + + pause: + id + + + pauseResume: + id + + + play: + id + + + playPauseResume: + id + + + prev: + id + + + resume: + id + + + seek: + id + + + skipToNextAlbum: + id + + + skipToPreviousAlbum: + id + + + stop: + id + + + volumeDown: + id + + + volumeUp: + id + + + + + YES + + YES + outputDevices + playlistController + playlistView + volumeSlider + + + YES + NSArrayController + PlaylistController + PlaylistView + NSSlider + + + + YES + + YES + outputDevices + playlistController + playlistView + volumeSlider + + + YES + + outputDevices + NSArrayController + + + playlistController + PlaylistController + + + playlistView + PlaylistView + + + volumeSlider + NSSlider + + + + + IBProjectSource + ./Classes/PlaybackController.h + + + + PlaylistController + DNDArrayController + + YES + + YES + clear: + clearFilterPredicate: + emptyQueueList: + searchByAlbum: + searchByArtist: + showEntryInFinder: + stopAfterCurrent: + toggleQueued: + toggleRepeat: + toggleShuffle: + + + YES + id + id + id + id + id + id + id + id + id + id + + + + YES + + YES + clear: + clearFilterPredicate: + emptyQueueList: + searchByAlbum: + searchByArtist: + showEntryInFinder: + stopAfterCurrent: + toggleQueued: + toggleRepeat: + toggleShuffle: + + + YES + + clear: + id + + + clearFilterPredicate: + id + + + emptyQueueList: + id + + + searchByAlbum: + id + + + searchByArtist: + id + + + showEntryInFinder: + id + + + stopAfterCurrent: + id + + + toggleQueued: + id + + + toggleRepeat: + id + + + toggleShuffle: + id + + + + + YES + + YES + entriesController + playbackController + playlistLoader + spotlightWindowController + + + YES + EntriesController + PlaybackController + PlaylistLoader + SpotlightWindowController + + + + YES + + YES + entriesController + playbackController + playlistLoader + spotlightWindowController + + + YES + + entriesController + EntriesController + + + playbackController + PlaybackController + + + playlistLoader + PlaylistLoader + + + spotlightWindowController + SpotlightWindowController + + + + + IBProjectSource + ./Classes/PlaylistController.h + + + + PlaylistLoader + NSObject + + playlistController + PlaylistController + + + playlistController + + playlistController + PlaylistController + + + + IBProjectSource + ./Classes/PlaylistLoader.h + + + + PlaylistView + NSTableView + + YES + + YES + scrollToCurrentEntry: + shufflePlaylist: + sortByPath: + toggleColumn: + + + YES + id + id + id + id + + + + YES + + YES + scrollToCurrentEntry: + shufflePlaylist: + sortByPath: + toggleColumn: + + + YES + + scrollToCurrentEntry: + id + + + shufflePlaylist: + id + + + sortByPath: + id + + + toggleColumn: + id + + + + + YES + + YES + playbackController + playlistController + + + YES + PlaybackController + PlaylistController + + + + YES + + YES + playbackController + playlistController + + + YES + + playbackController + PlaybackController + + + playlistController + PlaylistController + + + + + IBProjectSource + ./Classes/PlaylistView.h + + + + SpotlightPlaylistController + PlaylistController + + IBProjectSource + ./Classes/SpotlightPlaylistController.h + + + + SpotlightWindowController + NSWindowController + + YES + + YES + addToPlaylist: + pathComponentClicked: + toggleWindow: + + + YES + id + id + id + + + + YES + + YES + addToPlaylist: + pathComponentClicked: + toggleWindow: + + + YES + + addToPlaylist: + id + + + pathComponentClicked: + id + + + toggleWindow: + id + + + + + YES + + YES + pathControl + playlistController + playlistLoader + searchField + + + YES + NSPathControl + NSArrayController + PlaylistLoader + NSSearchField + + + + YES + + YES + pathControl + playlistController + playlistLoader + searchField + + + YES + + pathControl + NSPathControl + + + playlistController + NSArrayController + + + playlistLoader + PlaylistLoader + + + searchField + NSSearchField + + + + + IBProjectSource + ./Classes/SpotlightWindowController.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {11, 11} + {10, 3} + + + +