From abd557943c30edf077c883aef17888656f935135 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 10 Jul 2022 14:57:22 -0700 Subject: [PATCH 01/12] [Cuesheet Input] Don't repeatedly open file The input file has already been opened for decoding by an earlier step in the testing process, reuse the decoder from that. Spares a decoder open cycle on all embedded cuesheet supporting formats. Signed-off-by: Christopher Snowhill --- Plugins/CueSheet/CueSheetDecoder.m | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Plugins/CueSheet/CueSheetDecoder.m b/Plugins/CueSheet/CueSheetDecoder.m index 01b265cf8..8d3f8e6e4 100644 --- a/Plugins/CueSheet/CueSheetDecoder.m +++ b/Plugins/CueSheet/CueSheetDecoder.m @@ -83,6 +83,8 @@ static void *kCueSheetDecoderContext = &kCueSheetDecoderContext; decoder = [NSClassFromString(@"AudioDecoder") audioDecoderForSource:source skipCue:YES]; + [self registerObservers]; + if(![decoder open:source]) { ALog(@"Could not open cuesheet decoder"); return NO; @@ -166,22 +168,6 @@ static void *kCueSheetDecoderContext = &kCueSheetDecoderContext; } else { // Fix for embedded cuesheet handler parsing non-embedded files, // or files that are already in the playlist without a fragment - source = [NSClassFromString(@"AudioSource") audioSourceForURL:url]; - - if(![source open:url]) { - ALog(@"Could not open cuesheet source"); - return NO; - } - - decoder = [NSClassFromString(@"AudioDecoder") audioDecoderForSource:source skipCue:YES]; - - [self registerObservers]; - - if(![decoder open:source]) { - ALog(@"Could not open cuesheet decoder"); - return NO; - } - NSDictionary *properties = [decoder properties]; int bitsPerSample = [[properties objectForKey:@"bitsPerSample"] intValue]; int channels = [[properties objectForKey:@"channels"] intValue]; From 000a2e0cb67ab1b71616e53029f7cdee17d85409 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 10 Jul 2022 15:07:39 -0700 Subject: [PATCH 02/12] [Project Files] Change most to enable modules Most projects needed to be changed to enable C or Objective C modules. Hopefully, this improves debugging. Signed-off-by: Christopher Snowhill --- Audio/CogAudio.xcodeproj/project.pbxproj | 2 ++ Cog.xcodeproj/project.pbxproj | 4 ++-- .../File_Extractor/File_Extractor.xcodeproj/project.pbxproj | 2 ++ Frameworks/GME/GME.xcodeproj/project.pbxproj | 2 ++ .../HighlyAdvanced/HighlyAdvanced.xcodeproj/project.pbxproj | 2 ++ .../HighlyExperimental.xcodeproj/project.pbxproj | 2 ++ .../HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj | 2 ++ .../HighlyTheoretical.xcodeproj/project.pbxproj | 2 ++ .../HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj | 2 ++ Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj | 2 ++ Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj | 2 ++ Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj | 2 ++ Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj | 2 ++ Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj | 2 ++ Frameworks/lazyusf2/lazyusf2.xcodeproj/project.pbxproj | 2 ++ .../midi_processing/midi_processing.xcodeproj/project.pbxproj | 2 ++ Frameworks/psflib/psflib.xcodeproj/project.pbxproj | 2 ++ Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj | 2 ++ Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj | 2 ++ Plugins/APL/APL.xcodeproj/project.pbxproj | 2 ++ Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj | 2 ++ Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj | 2 ++ Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj | 2 ++ Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj | 2 ++ Plugins/FileSource/FileSource.xcodeproj/project.pbxproj | 2 ++ Plugins/Flac/Flac.xcodeproj/project.pbxproj | 2 ++ Plugins/GME/GME.xcodeproj/project.pbxproj | 2 ++ Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj | 2 ++ .../HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj | 2 ++ Plugins/Hively/Hively.xcodeproj/project.pbxproj | 2 ++ Plugins/M3u/M3u.xcodeproj/project.pbxproj | 2 ++ Plugins/MIDI/MIDI.xcodeproj/project.pbxproj | 2 ++ Plugins/Musepack/Musepack.xcodeproj/project.pbxproj | 2 ++ Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj | 2 ++ Plugins/Pls/Pls.xcodeproj/project.pbxproj | 2 ++ Plugins/Shorten/Shorten.xcodeproj/project.pbxproj | 2 ++ Plugins/TagLib/TagLib.xcodeproj/project.pbxproj | 2 ++ Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj | 2 ++ Plugins/WavPack/WavPack.xcodeproj/project.pbxproj | 2 ++ Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj | 2 ++ Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj | 2 ++ Preferences/Preferences/Preferences.xcodeproj/project.pbxproj | 2 ++ 42 files changed, 84 insertions(+), 2 deletions(-) diff --git a/Audio/CogAudio.xcodeproj/project.pbxproj b/Audio/CogAudio.xcodeproj/project.pbxproj index 41eb778f9..96c5b753c 100644 --- a/Audio/CogAudio.xcodeproj/project.pbxproj +++ b/Audio/CogAudio.xcodeproj/project.pbxproj @@ -819,6 +819,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -865,6 +866,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index 3e3fb116d..686f1e86c 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -2961,7 +2961,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = "Cog color"; - CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Cog.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; @@ -3017,7 +3016,6 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = "Cog color"; - CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Cog.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; @@ -3070,6 +3068,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -3113,6 +3112,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj b/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj index 53b9e74c4..df6049089 100644 --- a/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj +++ b/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj @@ -761,6 +761,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -817,6 +818,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/GME/GME.xcodeproj/project.pbxproj b/Frameworks/GME/GME.xcodeproj/project.pbxproj index 6fcca8657..c0b0b881e 100644 --- a/Frameworks/GME/GME.xcodeproj/project.pbxproj +++ b/Frameworks/GME/GME.xcodeproj/project.pbxproj @@ -806,6 +806,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -852,6 +853,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/HighlyAdvanced/HighlyAdvanced.xcodeproj/project.pbxproj b/Frameworks/HighlyAdvanced/HighlyAdvanced.xcodeproj/project.pbxproj index 73766f0a1..389e5ab68 100644 --- a/Frameworks/HighlyAdvanced/HighlyAdvanced.xcodeproj/project.pbxproj +++ b/Frameworks/HighlyAdvanced/HighlyAdvanced.xcodeproj/project.pbxproj @@ -326,6 +326,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -381,6 +382,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj/project.pbxproj b/Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj/project.pbxproj index c196ae12c..bbfa0e425 100644 --- a/Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj/project.pbxproj +++ b/Frameworks/HighlyExperimental/HighlyExperimental.xcodeproj/project.pbxproj @@ -263,6 +263,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -318,6 +319,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj b/Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj index 99982a011..7a24f092d 100644 --- a/Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj +++ b/Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj/project.pbxproj @@ -231,6 +231,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -290,6 +291,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/HighlyTheoretical/HighlyTheoretical.xcodeproj/project.pbxproj b/Frameworks/HighlyTheoretical/HighlyTheoretical.xcodeproj/project.pbxproj index 67fd965c2..483611fa5 100644 --- a/Frameworks/HighlyTheoretical/HighlyTheoretical.xcodeproj/project.pbxproj +++ b/Frameworks/HighlyTheoretical/HighlyTheoretical.xcodeproj/project.pbxproj @@ -276,6 +276,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -337,6 +338,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj b/Frameworks/HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj index 9172cff98..6175504fa 100644 --- a/Frameworks/HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj +++ b/Frameworks/HivelyPlayer/HivelyPlayer.xcodeproj/project.pbxproj @@ -211,6 +211,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -267,6 +268,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj b/Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj index 201575359..52c464a4f 100644 --- a/Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj +++ b/Frameworks/MPCDec/MPCDec.xcodeproj/project.pbxproj @@ -369,6 +369,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -413,6 +414,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; diff --git a/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj b/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj index d2bf041c3..aa98d5c08 100644 --- a/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj +++ b/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj @@ -331,6 +331,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -386,6 +387,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj b/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj index 4e3f51a06..ffbcbaff9 100644 --- a/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj +++ b/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj @@ -313,6 +313,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; @@ -364,6 +365,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; CLANG_WARN_COMMA = YES; diff --git a/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj b/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj index 2e8396914..3f2a52513 100644 --- a/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj +++ b/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj @@ -1179,6 +1179,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -1227,6 +1228,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj b/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj index b9f34266f..4fecb2051 100644 --- a/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj +++ b/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj @@ -429,6 +429,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -474,6 +475,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/lazyusf2/lazyusf2.xcodeproj/project.pbxproj b/Frameworks/lazyusf2/lazyusf2.xcodeproj/project.pbxproj index f825a9afd..cd2376f12 100644 --- a/Frameworks/lazyusf2/lazyusf2.xcodeproj/project.pbxproj +++ b/Frameworks/lazyusf2/lazyusf2.xcodeproj/project.pbxproj @@ -1079,6 +1079,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -1135,6 +1136,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/midi_processing/midi_processing.xcodeproj/project.pbxproj b/Frameworks/midi_processing/midi_processing.xcodeproj/project.pbxproj index bac3bd1e1..1d3574714 100644 --- a/Frameworks/midi_processing/midi_processing.xcodeproj/project.pbxproj +++ b/Frameworks/midi_processing/midi_processing.xcodeproj/project.pbxproj @@ -251,6 +251,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -307,6 +308,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/psflib/psflib.xcodeproj/project.pbxproj b/Frameworks/psflib/psflib.xcodeproj/project.pbxproj index cb2827182..536f010fa 100644 --- a/Frameworks/psflib/psflib.xcodeproj/project.pbxproj +++ b/Frameworks/psflib/psflib.xcodeproj/project.pbxproj @@ -215,6 +215,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -270,6 +271,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj b/Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj index 7f338a4ab..88751f7a4 100644 --- a/Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj +++ b/Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj @@ -3343,6 +3343,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -3421,6 +3422,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj b/Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj index ea361de12..a1a997e63 100644 --- a/Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj +++ b/Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj @@ -378,6 +378,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -434,6 +435,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/APL/APL.xcodeproj/project.pbxproj b/Plugins/APL/APL.xcodeproj/project.pbxproj index 4809933c6..0d18a4c92 100644 --- a/Plugins/APL/APL.xcodeproj/project.pbxproj +++ b/Plugins/APL/APL.xcodeproj/project.pbxproj @@ -207,6 +207,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -251,6 +252,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj b/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj index 132032fb7..66890f936 100644 --- a/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj +++ b/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj @@ -267,6 +267,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -322,6 +323,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj b/Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj index bf2bbe922..5ac7741a0 100644 --- a/Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj +++ b/Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj @@ -250,6 +250,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -294,6 +295,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj b/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj index 204512e3c..c6da499f9 100644 --- a/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj +++ b/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj @@ -290,6 +290,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -334,6 +335,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj b/Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj index 4406e50fe..512b32c73 100644 --- a/Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj +++ b/Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj @@ -332,6 +332,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -380,6 +381,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/FileSource/FileSource.xcodeproj/project.pbxproj b/Plugins/FileSource/FileSource.xcodeproj/project.pbxproj index 3407ac759..669bcbadc 100644 --- a/Plugins/FileSource/FileSource.xcodeproj/project.pbxproj +++ b/Plugins/FileSource/FileSource.xcodeproj/project.pbxproj @@ -294,6 +294,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -339,6 +340,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/Flac/Flac.xcodeproj/project.pbxproj b/Plugins/Flac/Flac.xcodeproj/project.pbxproj index 6bf15ba6f..8781fe57d 100644 --- a/Plugins/Flac/Flac.xcodeproj/project.pbxproj +++ b/Plugins/Flac/Flac.xcodeproj/project.pbxproj @@ -285,6 +285,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -329,6 +330,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/GME/GME.xcodeproj/project.pbxproj b/Plugins/GME/GME.xcodeproj/project.pbxproj index 16850ecfe..010a16d66 100644 --- a/Plugins/GME/GME.xcodeproj/project.pbxproj +++ b/Plugins/GME/GME.xcodeproj/project.pbxproj @@ -351,6 +351,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -396,6 +397,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj b/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj index 9c5d1cce6..73695ae71 100644 --- a/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj +++ b/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj @@ -273,6 +273,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -317,6 +318,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj b/Plugins/HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj index 63c73eb59..95ea4807c 100644 --- a/Plugins/HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj +++ b/Plugins/HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj @@ -634,6 +634,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -689,6 +690,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/Hively/Hively.xcodeproj/project.pbxproj b/Plugins/Hively/Hively.xcodeproj/project.pbxproj index 8a3ab56f4..b779471a6 100644 --- a/Plugins/Hively/Hively.xcodeproj/project.pbxproj +++ b/Plugins/Hively/Hively.xcodeproj/project.pbxproj @@ -287,6 +287,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -343,6 +344,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/M3u/M3u.xcodeproj/project.pbxproj b/Plugins/M3u/M3u.xcodeproj/project.pbxproj index a45a1c9c3..f7b79b86e 100644 --- a/Plugins/M3u/M3u.xcodeproj/project.pbxproj +++ b/Plugins/M3u/M3u.xcodeproj/project.pbxproj @@ -265,6 +265,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -308,6 +309,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj b/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj index a78c67989..66fe9f117 100644 --- a/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj +++ b/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj @@ -497,6 +497,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -553,6 +554,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/Musepack/Musepack.xcodeproj/project.pbxproj b/Plugins/Musepack/Musepack.xcodeproj/project.pbxproj index 2d5d4fcb7..a04724bbe 100644 --- a/Plugins/Musepack/Musepack.xcodeproj/project.pbxproj +++ b/Plugins/Musepack/Musepack.xcodeproj/project.pbxproj @@ -323,6 +323,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -367,6 +368,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj b/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj index 14c5d0bec..40e6acad8 100644 --- a/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj +++ b/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj @@ -235,6 +235,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -291,6 +292,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/Pls/Pls.xcodeproj/project.pbxproj b/Plugins/Pls/Pls.xcodeproj/project.pbxproj index b7c8c42a8..371a919ba 100644 --- a/Plugins/Pls/Pls.xcodeproj/project.pbxproj +++ b/Plugins/Pls/Pls.xcodeproj/project.pbxproj @@ -262,6 +262,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -305,6 +306,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/Shorten/Shorten.xcodeproj/project.pbxproj b/Plugins/Shorten/Shorten.xcodeproj/project.pbxproj index 922a04e77..4050798ab 100644 --- a/Plugins/Shorten/Shorten.xcodeproj/project.pbxproj +++ b/Plugins/Shorten/Shorten.xcodeproj/project.pbxproj @@ -321,6 +321,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -365,6 +366,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/TagLib/TagLib.xcodeproj/project.pbxproj b/Plugins/TagLib/TagLib.xcodeproj/project.pbxproj index 2d9821cdd..e173e3b13 100644 --- a/Plugins/TagLib/TagLib.xcodeproj/project.pbxproj +++ b/Plugins/TagLib/TagLib.xcodeproj/project.pbxproj @@ -357,6 +357,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -402,6 +403,7 @@ ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj b/Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj index 8a425bcc4..a55517f99 100644 --- a/Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj +++ b/Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj @@ -354,6 +354,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -398,6 +399,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/WavPack/WavPack.xcodeproj/project.pbxproj b/Plugins/WavPack/WavPack.xcodeproj/project.pbxproj index 282a6f43e..81002ed8b 100644 --- a/Plugins/WavPack/WavPack.xcodeproj/project.pbxproj +++ b/Plugins/WavPack/WavPack.xcodeproj/project.pbxproj @@ -325,6 +325,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -369,6 +370,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj b/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj index 9e14651ad..7bde5bb11 100644 --- a/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj +++ b/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj @@ -322,6 +322,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -367,6 +368,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj b/Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj index 37bfa544d..483427a91 100644 --- a/Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj +++ b/Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj @@ -301,6 +301,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -370,6 +371,7 @@ CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; diff --git a/Preferences/Preferences/Preferences.xcodeproj/project.pbxproj b/Preferences/Preferences/Preferences.xcodeproj/project.pbxproj index 4cbc84040..043e3b229 100644 --- a/Preferences/Preferences/Preferences.xcodeproj/project.pbxproj +++ b/Preferences/Preferences/Preferences.xcodeproj/project.pbxproj @@ -596,6 +596,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; @@ -644,6 +645,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; From 8bc9738ccb98ab4c86daf9b45c530ebbc777766a Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 10 Jul 2022 15:08:56 -0700 Subject: [PATCH 03/12] [Downmixer] Only downmix to stereo if not stereo When downmixing to mono, only downmix to stereo first if the source is not already stereo. Signed-off-by: Christopher Snowhill --- Audio/Chain/Downmix.m | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Audio/Chain/Downmix.m b/Audio/Chain/Downmix.m index 1bb981a48..a8291640e 100644 --- a/Audio/Chain/Downmix.m +++ b/Audio/Chain/Downmix.m @@ -149,10 +149,12 @@ static void downmix_to_stereo(const float *inBuffer, int channels, uint32_t conf static void downmix_to_mono(const float *inBuffer, int channels, uint32_t config, float *outBuffer, size_t count) { float tempBuffer[count * 2]; - downmix_to_stereo(inBuffer, channels, config, tempBuffer, count); - inBuffer = tempBuffer; - channels = 2; - config = AudioConfigStereo; + if(channels > 2 || config != AudioConfigStereo) { + downmix_to_stereo(inBuffer, channels, config, tempBuffer, count); + inBuffer = tempBuffer; + channels = 2; + config = AudioConfigStereo; + } cblas_scopy((int)count, inBuffer, 2, outBuffer, 1); vDSP_vadd(outBuffer, 1, inBuffer + 1, 2, outBuffer, 1, count); } From 3c351f6968dd440bc2102535f107e98a0e8e793b Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 10 Jul 2022 15:14:47 -0700 Subject: [PATCH 04/12] [Input API] Change input readAudio method readAudio now returns an AudioChunk object directly, and all inputs have been changed to accomodate this. Also, input and converter processing have been altered to better work with this. Signed-off-by: Christopher Snowhill --- Audio/Chain/AudioChunk.h | 2 + Audio/Chain/AudioChunk.m | 24 +++++ Audio/Chain/ConverterNode.m | 45 ++++----- Audio/Chain/InputNode.m | 74 +++++++-------- Audio/Chain/Node.h | 3 +- Audio/Chain/Node.m | 31 ++++++- Audio/CogPluginMulti.m | 6 +- Audio/Plugin.h | 4 +- Cog.xcodeproj/project.pbxproj | 2 + Plugins/APL/APL.xcodeproj/project.pbxproj | 2 + Plugins/APL/APLDecoder.m | 22 +++-- .../AdPlug/AdPlug.xcodeproj/project.pbxproj | 2 + Plugins/AdPlug/AdPlug/AdPlugDecoder.mm | 13 ++- .../ArchiveSource.xcodeproj/project.pbxproj | 2 + .../CoreAudio.xcodeproj/project.pbxproj | 2 + Plugins/CoreAudio/CoreAudioDecoder.m | 16 +++- .../CueSheet.xcodeproj/project.pbxproj | 2 + Plugins/CueSheet/CueSheetDecoder.m | 17 +++- .../FFMPEG/FFMPEG.xcodeproj/project.pbxproj | 2 + Plugins/FFMPEG/FFMPEGDecoder.h | 3 +- Plugins/FFMPEG/FFMPEGDecoder.m | 48 +++++----- .../FileSource.xcodeproj/project.pbxproj | 2 + Plugins/Flac/Flac.xcodeproj/project.pbxproj | 2 + Plugins/Flac/FlacDecoder.m | 44 +++------ Plugins/GME/GME.xcodeproj/project.pbxproj | 2 + Plugins/GME/GameDecoder.m | 17 +++- .../HTTPSource.xcodeproj/project.pbxproj | 2 + .../HighlyComplete.xcodeproj/project.pbxproj | 2 + .../HighlyComplete/HCDecoder.mm | 14 ++- .../Hively/Hively.xcodeproj/project.pbxproj | 2 + Plugins/Hively/Hively/HVLDecoder.m | 12 ++- Plugins/M3u/M3u.xcodeproj/project.pbxproj | 2 + Plugins/MAD/MAD.xcodeproj/project.pbxproj | 2 + Plugins/MAD/MADDecoder.m | 38 +++----- Plugins/MIDI/MIDI.xcodeproj/project.pbxproj | 2 + Plugins/MIDI/MIDI/MIDIDecoder.mm | 21 +++-- .../Musepack.xcodeproj/project.pbxproj | 2 + Plugins/Musepack/MusepackDecoder.m | 14 ++- .../OpenMPT/OpenMPT.xcodeproj/project.pbxproj | 2 + Plugins/OpenMPT/OpenMPT/OMPTDecoder.mm | 12 ++- Plugins/Opus/Opus/OpusDecoder.m | 11 ++- .../Opus/OpusPlugin.xcodeproj/project.pbxproj | 2 + Plugins/Pls/Pls.xcodeproj/project.pbxproj | 2 + .../Shorten/Shorten.xcodeproj/project.pbxproj | 2 + Plugins/Shorten/ShortenDecoder.mm | 13 ++- .../SilenceDecoder.xcodeproj/project.pbxproj | 2 + .../SilenceDecoder/SilenceDecoder.m | 12 ++- .../TagLib/TagLib.xcodeproj/project.pbxproj | 4 + Plugins/Vorbis/VorbisDecoder.m | 13 ++- .../VorbisPlugin.xcodeproj/project.pbxproj | 2 + .../WavPack/WavPack.xcodeproj/project.pbxproj | 2 + Plugins/WavPack/WavPackDecoder.m | 15 ++- Plugins/libvgmPlayer/libvgmDecoder.mm | 17 +++- .../libvgmPlayer.xcodeproj/project.pbxproj | 2 + Plugins/sidplay/SidDecoder.mm | 91 +++++++++---------- .../sidplay/sidplay.xcodeproj/project.pbxproj | 2 + .../vgmstream.xcodeproj/project.pbxproj | 2 + Plugins/vgmstream/vgmstream/VGMDecoder.m | 13 ++- 58 files changed, 472 insertions(+), 251 deletions(-) diff --git a/Audio/Chain/AudioChunk.h b/Audio/Chain/AudioChunk.h index 29fce39e5..68942db0e 100644 --- a/Audio/Chain/AudioChunk.h +++ b/Audio/Chain/AudioChunk.h @@ -80,6 +80,7 @@ enum { + (uint32_t)findChannelIndex:(uint32_t)flag; - (id)init; +- (id)initWithProperties:(NSDictionary *)properties; - (void)assignSamples:(const void *)data frameCount:(size_t)count; @@ -88,6 +89,7 @@ enum { - (BOOL)isEmpty; - (size_t)frameCount; +- (void)setFrameCount:(size_t)count; // For truncation only - (double)duration; diff --git a/Audio/Chain/AudioChunk.m b/Audio/Chain/AudioChunk.m index 05130c506..adb72814f 100644 --- a/Audio/Chain/AudioChunk.m +++ b/Audio/Chain/AudioChunk.m @@ -7,6 +7,8 @@ #import "AudioChunk.h" +#import "CoreAudioUtils.h" + @implementation AudioChunk - (id)init { @@ -21,6 +23,18 @@ return self; } +- (id)initWithProperties:(NSDictionary *)properties { + self = [super init]; + + if(self) { + chunkData = [[NSMutableData alloc] init]; + [self setFormat:propertiesToASBD(properties)]; + lossless = [[properties objectForKey:@"encoding"] isEqualToString:@"lossless"]; + } + + return self; +} + static const uint32_t AudioChannelConfigTable[] = { 0, AudioConfigMono, @@ -156,6 +170,16 @@ static const uint32_t AudioChannelConfigTable[] = { return 0; } +- (void)setFrameCount:(size_t)count { + if(formatAssigned) { + count *= format.mBytesPerPacket; + size_t currentLength = [chunkData length]; + if(count < currentLength) { + [chunkData replaceBytesInRange:NSMakeRange(count, currentLength - count) withBytes:NULL length:0]; + } + } +} + - (double)duration { if(formatAssigned) { const size_t bytesPerPacket = format.mBytesPerPacket; diff --git a/Audio/Chain/ConverterNode.m b/Audio/Chain/ConverterNode.m index c0e427960..932fa0e73 100644 --- a/Audio/Chain/ConverterNode.m +++ b/Audio/Chain/ConverterNode.m @@ -432,34 +432,32 @@ static void convert_be_to_le(uint8_t *buffer, size_t bitsPerSample, size_t bytes } - (void)process { - char writeBuf[CHUNK_SIZE]; - // Removed endOfStream check from here, since we want to be able to flush the converter // when the end of stream is reached. Convert function instead processes what it can, // and returns 0 samples when it has nothing more to process at the end of stream. while([self shouldContinue] == YES) { - int amountConverted; + AudioChunk *chunk = nil; while(paused) { usleep(500); } @autoreleasepool { - amountConverted = [self convert:writeBuf amount:CHUNK_SIZE]; + chunk = [self convert]; } - if(!amountConverted) { - if(paused) { - continue; - } else if(streamFormatChanged) { - [self cleanUp]; - [self setupWithInputFormat:newInputFormat withInputConfig:newInputChannelConfig isLossless:rememberedLossless]; - continue; - } else - break; + if(!chunk) { + continue; + } + @autoreleasepool { + [self writeChunk:chunk]; + chunk = nil; + } + if(streamFormatChanged) { + [self cleanUp]; + [self setupWithInputFormat:newInputFormat withInputConfig:newInputChannelConfig isLossless:rememberedLossless]; } - [self writeData:writeBuf amount:amountConverted]; } } -- (int)convert:(void *)dest amount:(int)amount { +- (AudioChunk *)convert { UInt32 ioNumberPackets; int amountReadFromFC; int amountRead = 0; @@ -472,7 +470,7 @@ static void convert_be_to_le(uint8_t *buffer, size_t bitsPerSample, size_t bytes tryagain: if(stopping || [self shouldContinue] == NO) { convertEntered = NO; - return amountRead; + return nil; } amountReadFromFC = 0; @@ -543,7 +541,7 @@ tryagain: if(!bytesReadFromInput) { convertEntered = NO; - return amountRead; + return nil; } if(bytesReadFromInput && isBigEndian) { @@ -703,19 +701,22 @@ tryagain: if(floatOffset == floatSize) goto tryagain; - ioNumberPackets = (amount - amountRead); - if(ioNumberPackets > (floatSize - floatOffset)) - ioNumberPackets = (UInt32)(floatSize - floatOffset); + ioNumberPackets = (UInt32)(floatSize - floatOffset); ioNumberPackets -= ioNumberPackets % dmFloatFormat.mBytesPerPacket; - memcpy(((uint8_t *)dest) + amountRead, ((uint8_t *)floatBuffer) + floatOffset, ioNumberPackets); + AudioChunk *chunk = [[AudioChunk alloc] init]; + [chunk setFormat:nodeFormat]; + if(nodeChannelConfig) { + [chunk setChannelConfig:nodeChannelConfig]; + } + [chunk assignSamples:floatBuffer frameCount:ioNumberPackets / dmFloatFormat.mBytesPerPacket]; floatOffset += ioNumberPackets; amountRead += ioNumberPackets; convertEntered = NO; - return amountRead; + return chunk; } - (void)observeValueForKeyPath:(NSString *)keyPath diff --git a/Audio/Chain/InputNode.m b/Audio/Chain/InputNode.m index f5840a284..4a1fb9471 100644 --- a/Audio/Chain/InputNode.m +++ b/Audio/Chain/InputNode.m @@ -142,10 +142,6 @@ static void *kInputNodeContext = &kInputNodeContext; } - (void)process { - int amountInBuffer = 0; - int bytesInBuffer = 0; - void *inputBuffer = malloc(CHUNK_SIZE * 8 * 18); // Maximum 18 channels, dunno what we'll receive - BOOL shouldClose = YES; BOOL seekError = NO; @@ -165,7 +161,6 @@ static void *kInputNodeContext = &kInputNodeContext; ConverterNode *converter = [bufferChain converter]; DLog(@"SEEKING! Resetting Buffer"); - amountInBuffer = 0; // This resets the converter's buffer [self resetBuffer]; [converter resetBuffer]; @@ -174,7 +169,9 @@ static void *kInputNodeContext = &kInputNodeContext; DLog(@"Reset buffer!"); DLog(@"SEEKING!"); - seekError = [decoder seek:seekFrame] < 0; + @autoreleasepool { + seekError = [decoder seek:seekFrame] < 0; + } shouldSeek = NO; DLog(@"Seeked! Resetting Buffer"); @@ -185,44 +182,39 @@ static void *kInputNodeContext = &kInputNodeContext; } } - if(amountInBuffer < CHUNK_SIZE) { - int framesToRead = CHUNK_SIZE - amountInBuffer; - int framesRead; + AudioChunk *chunk; + @autoreleasepool { + chunk = [decoder readAudio]; + } + + if(chunk) { @autoreleasepool { - framesRead = [decoder readAudio:((char *)inputBuffer) + bytesInBuffer frames:framesToRead]; + [self writeChunk:chunk]; + chunk = nil; + } + } else { + DLog(@"End of stream? %@", [self properties]); + + endOfStream = YES; + shouldClose = [controller endOfInputReached]; // Lets us know if we should keep going or not (occassionally, for track changes within a file) + DLog(@"closing? is %i", shouldClose); + + // Move this here, so that the above endOfInputReached has a chance to queue another track before starting output + // Technically, the output should still play out its buffer first before checking if it should stop + if(initialBufferFilled == NO) { + [controller initialBufferFilled:self]; } - if(framesRead > 0 && !seekError) { - amountInBuffer += framesRead; - bytesInBuffer += framesRead * bytesPerFrame; - [self writeData:inputBuffer amount:bytesInBuffer]; - amountInBuffer = 0; - bytesInBuffer = 0; + // wait before exiting, as we might still get seeking request + DLog("InputNode: Before wait") + [exitAtTheEndOfTheStream waitIndefinitely]; + DLog("InputNode: After wait, should seek = %d", shouldSeek); + if(shouldSeek) { + endOfStream = NO; + shouldClose = NO; + continue; } else { - DLog(@"End of stream? %@", [self properties]); - - endOfStream = YES; - shouldClose = [controller endOfInputReached]; // Lets us know if we should keep going or not (occassionally, for track changes within a file) - DLog(@"closing? is %i", shouldClose); - - // Move this here, so that the above endOfInputReached has a chance to queue another track before starting output - // Technically, the output should still play out its buffer first before checking if it should stop - if(initialBufferFilled == NO) { - [controller initialBufferFilled:self]; - } - - // wait before exiting, as we might still get seeking request - DLog("InputNode: Before wait") - [exitAtTheEndOfTheStream waitIndefinitely]; - DLog("InputNode: After wait, should seek = %d", shouldSeek); - if(shouldSeek) { - endOfStream = NO; - shouldClose = NO; - continue; - } - else { - break; - } + break; } } } @@ -230,8 +222,6 @@ static void *kInputNodeContext = &kInputNodeContext; if(shouldClose) [decoder close]; - free(inputBuffer); - [exitAtTheEndOfTheStream signal]; DLog("Input node thread stopping"); diff --git a/Audio/Chain/Node.h b/Audio/Chain/Node.h index 0e2feb2e2..12eca8726 100644 --- a/Audio/Chain/Node.h +++ b/Audio/Chain/Node.h @@ -19,7 +19,7 @@ ChunkList *buffer; Semaphore *semaphore; - NSRecursiveLock *accessLock; + NSLock *accessLock; id __weak previousNode; id __weak controller; @@ -37,6 +37,7 @@ - (id _Nullable)initWithController:(id _Nonnull)c previous:(id _Nullable)p; - (void)writeData:(const void *_Nonnull)ptr amount:(size_t)a; +- (void)writeChunk:(AudioChunk *_Nonnull)chunk; - (AudioChunk *_Nonnull)readChunk:(size_t)maxFrames; - (BOOL)peekFormat:(AudioStreamBasicDescription *_Nonnull)format channelConfig:(uint32_t *_Nonnull)config; diff --git a/Audio/Chain/Node.m b/Audio/Chain/Node.m index 3fc91b533..bef0b2b2a 100644 --- a/Audio/Chain/Node.m +++ b/Audio/Chain/Node.m @@ -25,7 +25,7 @@ buffer = [[ChunkList alloc] initWithMaximumDuration:3.0]; semaphore = [[Semaphore alloc] init]; - accessLock = [[NSRecursiveLock alloc] init]; + accessLock = [[NSLock alloc] init]; initialBufferFilled = NO; @@ -91,6 +91,35 @@ [accessLock unlock]; } +- (void)writeChunk:(AudioChunk *)chunk { + [accessLock lock]; + + const double chunkDuration = [chunk duration]; + double durationLeft = [buffer maxDuration] - [buffer listDuration]; + + while(shouldContinue == YES && chunkDuration > durationLeft) { + if(durationLeft < chunkDuration) { + if(initialBufferFilled == NO) { + initialBufferFilled = YES; + if([controller respondsToSelector:@selector(initialBufferFilled:)]) + [controller performSelector:@selector(initialBufferFilled:) withObject:self]; + } + } + + if(durationLeft < chunkDuration || shouldReset) { + [accessLock unlock]; + [semaphore wait]; + [accessLock lock]; + } + + durationLeft = [buffer maxDuration] - [buffer listDuration]; + } + + [buffer addChunk:chunk]; + + [accessLock unlock]; +} + // Should be overwriten by subclass. - (void)process { } diff --git a/Audio/CogPluginMulti.m b/Audio/CogPluginMulti.m index 66f2bdffb..6d4f88720 100644 --- a/Audio/CogPluginMulti.m +++ b/Audio/CogPluginMulti.m @@ -79,9 +79,9 @@ static void *kCogDecoderMultiContext = &kCogDecoderMultiContext; return @{}; } -- (int)readAudio:(void *)buffer frames:(UInt32)frames { - if(theDecoder != nil) return [theDecoder readAudio:buffer frames:frames]; - return 0; +- (AudioChunk *)readAudio { + if(theDecoder != nil) return [theDecoder readAudio]; + return nil; } - (BOOL)open:(id)source { diff --git a/Audio/Plugin.h b/Audio/Plugin.h index e3db69361..80e0748ed 100644 --- a/Audio/Plugin.h +++ b/Audio/Plugin.h @@ -1,5 +1,7 @@ // Plugins! HOORAY! +#import "AudioChunk.h" + @protocol CogSource + (NSArray *)schemes; // http, file, etc @@ -42,7 +44,7 @@ - (NSDictionary *)properties; - (NSDictionary *)metadata; // Only to be implemented for dynamic metadata, send events on change -- (int)readAudio:(void *)buffer frames:(UInt32)frames; +- (AudioChunk *)readAudio; - (BOOL)open:(id)source; - (long)seek:(long)frame; diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index 686f1e86c..e277e4250 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -927,6 +927,7 @@ 83489C4E2782F2DF00BDCEA2 /* libvgmPlayer.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = libvgmPlayer.xcodeproj; path = Plugins/libvgmPlayer/libvgmPlayer.xcodeproj; sourceTree = ""; }; 8349270127B4EFFC0009AB2B /* duplicateItemsTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = duplicateItemsTemplate.pdf; path = Images/duplicateItemsTemplate.pdf; sourceTree = ""; }; 8349270B27B4EFFC0009AB2B /* deadItemsTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = deadItemsTemplate.pdf; path = Images/deadItemsTemplate.pdf; sourceTree = ""; }; + 834A42C4287B01B600EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = Audio/Chain/AudioChunk.h; sourceTree = SOURCE_ROOT; }; 834B05E82859C006000B7DC0 /* TotalTimeTransformer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TotalTimeTransformer.h; path = Transformers/TotalTimeTransformer.h; sourceTree = ""; }; 834B05E92859C006000B7DC0 /* TotalTimeTransformer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TotalTimeTransformer.m; path = Transformers/TotalTimeTransformer.m; sourceTree = ""; }; 8355D6B4180612F300D05687 /* NSData+MD5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSData+MD5.h"; sourceTree = ""; }; @@ -1227,6 +1228,7 @@ 177EC0110B8BC2CF0000BC8C /* Utils */ = { isa = PBXGroup; children = ( + 834A42C4287B01B600EB9D9B /* AudioChunk.h */, 8384912518080F2D00E7332D /* Logging.h */, 07E18DF10D62B38400BB0E11 /* NSArray+ShuffleUtils.h */, 07E18DF20D62B38400BB0E11 /* NSArray+ShuffleUtils.m */, diff --git a/Plugins/APL/APL.xcodeproj/project.pbxproj b/Plugins/APL/APL.xcodeproj/project.pbxproj index 0d18a4c92..4cbe91672 100644 --- a/Plugins/APL/APL.xcodeproj/project.pbxproj +++ b/Plugins/APL/APL.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 32DBCF630370AF2F00C91783 /* APL_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APL_Prefix.pch; sourceTree = ""; }; + 834A42AF287AF34300EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747FE32862E8B60021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 838491281808135500E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -74,6 +75,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42AF287AF34300EB9D9B /* AudioChunk.h */, 838491281808135500E7332D /* Logging.h */, 8E8D423C0CBB0FF600135C1B /* Plugin.h */, 8E8D42350CBB0F9800135C1B /* APLDecoder.h */, diff --git a/Plugins/APL/APLDecoder.m b/Plugins/APL/APLDecoder.m index 9fc7fd36d..da93d0f19 100644 --- a/Plugins/APL/APLDecoder.m +++ b/Plugins/APL/APLDecoder.m @@ -108,18 +108,24 @@ return framePosition; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { - if(framePosition + frames > trackEnd) - frames = (UInt32)(trackEnd - framePosition); +- (AudioChunk *)readAudio { + int maxFrames = INT_MAX; - if(!frames) { + if(framePosition + maxFrames > trackEnd) + maxFrames = (int)(trackEnd - framePosition); + + if(!maxFrames) { DLog(@"APL readAudio Returning 0"); - return 0; + return nil; } - int n = [decoder readAudio:buf frames:frames]; - framePosition += n; - return n; + AudioChunk *chunk = [decoder readAudio]; + if(chunk.frameCount > maxFrames) { + [chunk setFrameCount:maxFrames]; + } + + framePosition += chunk.frameCount; + return chunk; } - (BOOL)isSilence { diff --git a/Plugins/AdPlug/AdPlug.xcodeproj/project.pbxproj b/Plugins/AdPlug/AdPlug.xcodeproj/project.pbxproj index 427939dd4..cacfb9829 100644 --- a/Plugins/AdPlug/AdPlug.xcodeproj/project.pbxproj +++ b/Plugins/AdPlug/AdPlug.xcodeproj/project.pbxproj @@ -52,6 +52,7 @@ /* Begin PBXFileReference section */ 833A8999286FF2FD0022E036 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 834A42AE287AF27A00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747C6D2862DDDB0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 83D3C5F3201C674D005564CB /* AdPlug.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = AdPlug.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 83D3C5F6201C674D005564CB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -123,6 +124,7 @@ 83D3C5F5201C674D005564CB /* AdPlug */ = { isa = PBXGroup; children = ( + 834A42AE287AF27A00EB9D9B /* AudioChunk.h */, 83D3C667201C7020005564CB /* adplug.db */, 83D3C657201C6E24005564CB /* AdPlugContainer.h */, 83D3C654201C6E24005564CB /* AdPlugContainer.mm */, diff --git a/Plugins/AdPlug/AdPlug/AdPlugDecoder.mm b/Plugins/AdPlug/AdPlug/AdPlugDecoder.mm index 6e57a2263..6e4d0033f 100644 --- a/Plugins/AdPlug/AdPlug/AdPlugDecoder.mm +++ b/Plugins/AdPlug/AdPlug/AdPlugDecoder.mm @@ -103,7 +103,14 @@ static CAdPlugDatabase *g_database = NULL; return @{}; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { + int frames = 1024; + int16_t buffer[1024 * 2]; + + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + void *buf = (void *)buffer; + int total = 0; bool dont_loop = !IsRepeatOneSet(); if(dont_loop && current_pos + frames > length) @@ -128,7 +135,9 @@ static CAdPlugDatabase *g_database = NULL; total += samples_now; } - return total; + [chunk assignSamples:buffer frameCount:total]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj b/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj index 66890f936..3fb853ae2 100644 --- a/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj +++ b/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj @@ -33,6 +33,7 @@ /* Begin PBXFileReference section */ 8307D31A286070EA000FF8EB /* SandboxBroker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SandboxBroker.h; path = ../../../Utils/SandboxBroker.h; sourceTree = ""; }; + 834A42B0287AF4BF00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8359009717FEF6490060F3ED /* ArchiveSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchiveSource.h; sourceTree = ""; }; 8359009817FEF6490060F3ED /* ArchiveSource.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ArchiveSource.m; sourceTree = ""; }; 8359009A17FEFDA80060F3ED /* ArchiveContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArchiveContainer.h; sourceTree = ""; }; @@ -105,6 +106,7 @@ 8359FF2017FEF35C0060F3ED /* ArchiveSource */ = { isa = PBXGroup; children = ( + 834A42B0287AF4BF00EB9D9B /* AudioChunk.h */, 8307D31A286070EA000FF8EB /* SandboxBroker.h */, 8384913518081BA000E7332D /* Logging.h */, 835900A017FF079C0060F3ED /* Plugin.h */, diff --git a/Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj b/Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj index 5ac7741a0..08b340b05 100644 --- a/Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj +++ b/Plugins/CoreAudio/CoreAudio.xcodeproj/project.pbxproj @@ -23,6 +23,7 @@ 17C93EAB0B8FF3CE008627D6 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = ""; }; 17C93EB20B8FF3E1008627D6 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = ""; }; 32DBCF630370AF2F00C91783 /* CoreAudio_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CoreAudio_Prefix.pch; sourceTree = ""; }; + 834A42B1287AF4D900EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747C5E2862DD880021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 83849129180813E800E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* CoreAudio.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CoreAudio.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -77,6 +78,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42B1287AF4D900EB9D9B /* AudioChunk.h */, 83849129180813E800E7332D /* Logging.h */, 177FCFCA0B90C9A10011C3B5 /* Plugin.h */, 17C93E720B8FF192008627D6 /* CoreAudioDecoder.h */, diff --git a/Plugins/CoreAudio/CoreAudioDecoder.m b/Plugins/CoreAudio/CoreAudioDecoder.m index 854115ab2..e343427fa 100644 --- a/Plugins/CoreAudio/CoreAudioDecoder.m +++ b/Plugins/CoreAudio/CoreAudioDecoder.m @@ -306,25 +306,33 @@ static SInt64 getSizeProc(void *clientData) { return YES; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { OSStatus err; AudioBufferList bufferList; UInt32 frameCount; + int frames = 1024; + size_t bytesPerFrame = channels * (bitsPerSample / 8); + uint8_t buffer[frames * bytesPerFrame]; + // Set up the AudioBufferList bufferList.mNumberBuffers = 1; bufferList.mBuffers[0].mNumberChannels = channels; - bufferList.mBuffers[0].mData = buf; + bufferList.mBuffers[0].mData = buffer; bufferList.mBuffers[0].mDataByteSize = frames * channels * (bitsPerSample / 8); // Read a chunk of PCM input (converted from whatever format) frameCount = frames; err = ExtAudioFileRead(_in, &frameCount, &bufferList); if(err != noErr) { - return 0; + return nil; } - return frameCount; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:frameCount]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj b/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj index c6da499f9..502a71937 100644 --- a/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj +++ b/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ 17DA346D0CC04FCD0003F6B2 /* CueSheetMetadataReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CueSheetMetadataReader.m; sourceTree = ""; }; 32DBCF630370AF2F00C91783 /* CueSheet_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CueSheet_Prefix.pch; sourceTree = ""; }; 833F68371CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 834A42B2287AF59900EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 835C888E22CC1883001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747C592862DD660021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8384912A180814D900E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; @@ -89,6 +90,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42B2287AF59900EB9D9B /* AudioChunk.h */, 839DA7D3274A2FD4001B18E5 /* NSDictionary+Merge.h */, 839DA7D0274A2EA9001B18E5 /* AudioMetadataReader.h */, 8384912A180814D900E7332D /* Logging.h */, diff --git a/Plugins/CueSheet/CueSheetDecoder.m b/Plugins/CueSheet/CueSheetDecoder.m index 8d3f8e6e4..c32fdba41 100644 --- a/Plugins/CueSheet/CueSheetDecoder.m +++ b/Plugins/CueSheet/CueSheetDecoder.m @@ -309,25 +309,32 @@ static void *kCueSheetDecoderContext = &kCueSheetDecoderContext; return framePosition - trackStart; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { if(!seekedToStart) { [self seek:0]; } + int frames = INT_MAX; + if(!noFragment && framePosition + frames > trackEnd) { frames = (UInt32)(trackEnd - framePosition); } if(!frames) { DLog(@"Returning 0"); - return 0; + return nil; } - int n = [decoder readAudio:buf frames:frames]; + AudioChunk *chunk = [decoder readAudio]; - framePosition += n; + size_t n = chunk.frameCount; + if(n > frames) { + [chunk setFrameCount:frames]; + } - return n; + framePosition += chunk.frameCount; + + return chunk; } - (BOOL)isSilence { diff --git a/Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj b/Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj index 512b32c73..c560f028c 100644 --- a/Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj +++ b/Plugins/FFMPEG/FFMPEG.xcodeproj/project.pbxproj @@ -45,6 +45,7 @@ 089C1672FE841209C02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; 089C167FFE841241C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 834A42B3287AF65000EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8352D48E1CDDB023009D16AA /* CoreFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreFoundation.framework; path = System/Library/Frameworks/CoreFoundation.framework; sourceTree = SDKROOT; }; 8352D4901CDDB02A009D16AA /* VideoDecodeAcceleration.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = VideoDecodeAcceleration.framework; path = System/Library/Frameworks/VideoDecodeAcceleration.framework; sourceTree = SDKROOT; }; 8352D4921CDDB034009D16AA /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; @@ -145,6 +146,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42B3287AF65000EB9D9B /* AudioChunk.h */, 8356BD1A27B3D06F0074E50C /* HTTPSource.h */, 8356BCEA27B37DA40074E50C /* TagLibID3v2Reader.h */, 8356BCE827B37C6F0074E50C /* NSDictionary+Merge.h */, diff --git a/Plugins/FFMPEG/FFMPEGDecoder.h b/Plugins/FFMPEG/FFMPEGDecoder.h index cd546d50e..2d62c0e7e 100644 --- a/Plugins/FFMPEG/FFMPEGDecoder.h +++ b/Plugins/FFMPEG/FFMPEGDecoder.h @@ -45,8 +45,7 @@ int64_t ffmpeg_seek(void *opaque, int64_t offset, int whence); BOOL metadataUpdated; - int prebufferedAudio; - uint8_t *prebufferedAudioData; + AudioChunk *prebufferedChunk; BOOL rawDSD; BOOL rawDSDReverseBits; diff --git a/Plugins/FFMPEG/FFMPEGDecoder.m b/Plugins/FFMPEG/FFMPEGDecoder.m index 463e1ba1e..20557dd58 100644 --- a/Plugins/FFMPEG/FFMPEGDecoder.m +++ b/Plugins/FFMPEG/FFMPEGDecoder.m @@ -471,13 +471,10 @@ static uint8_t reverse_bits[0x100]; metadataUpdated = NO; [self updateMetadata]; - prebufferedAudio = 0; - prebufferedAudioData = NULL; + prebufferedChunk = nil; if(attachedPicIndex >= 0) { - int frameSize = rawDSD ? channels : channels * (bitsPerSample / 8); - prebufferedAudioData = malloc(1024 * frameSize); - [self readAudio:prebufferedAudioData frames:1024]; + prebufferedChunk = [self readAudio]; } return YES; @@ -681,30 +678,31 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va } } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { if(!seekedToStart) { [self seek:0]; } + if(prebufferedChunk) { + // A bit of ignored read-ahead to support embedded artwork + size_t framesReadNow = prebufferedChunk.frameCount; + framesRead -= framesReadNow; + AudioChunk *chunk = prebufferedChunk; + prebufferedChunk = nil; + return chunk; + } + + if(totalFrames && framesRead >= totalFrames) + return nil; + + int frames = 1024; + int frameSize = rawDSD ? channels : channels * (bitsPerSample / 8); int bytesToRead = frames * frameSize; int bytesRead = 0; - if(prebufferedAudio) { - // A bit of ignored read-ahead to support embedded artwork - int bytesBuffered = prebufferedAudio * frameSize; - int bytesToCopy = (bytesBuffered > bytesToRead) ? bytesToRead : bytesBuffered; - memcpy(buf, prebufferedAudioData, bytesToCopy); - memmove(prebufferedAudioData, prebufferedAudioData + bytesToCopy, bytesBuffered - bytesToCopy); - prebufferedAudio -= bytesToCopy / frameSize; - bytesRead = bytesToCopy; - - int framesReadNow = bytesRead / frameSize; - framesRead -= framesReadNow; - } - - if(totalFrames && framesRead >= totalFrames) - return 0; + uint8_t buffer[bytesToRead]; + void *buf = (void *)buffer; int dataSize = 0; @@ -909,7 +907,11 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va framesRead += framesReadNow; - return framesReadNow; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:framesReadNow]; + + return chunk; } - (long)seek:(long)frame { @@ -918,7 +920,7 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va seekedToStart = YES; - prebufferedAudio = 0; + prebufferedChunk = nil; if(frame >= totalFrames) { framesRead = totalFrames; diff --git a/Plugins/FileSource/FileSource.xcodeproj/project.pbxproj b/Plugins/FileSource/FileSource.xcodeproj/project.pbxproj index 669bcbadc..2ccd0a398 100644 --- a/Plugins/FileSource/FileSource.xcodeproj/project.pbxproj +++ b/Plugins/FileSource/FileSource.xcodeproj/project.pbxproj @@ -39,6 +39,7 @@ 32DBCF630370AF2F00C91783 /* FileSource_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileSource_Prefix.pch; sourceTree = ""; }; 8307D31B2860722C000FF8EB /* SandboxBroker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SandboxBroker.h; path = ../../Utils/SandboxBroker.h; sourceTree = ""; }; 8335FF6817FF765A002D8DD2 /* File_Extractor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = File_Extractor.xcodeproj; path = ../../Frameworks/File_Extractor/File_Extractor.xcodeproj; sourceTree = ""; }; + 834A42AD287AF25600EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747C4F2862DD2F0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* FileSource.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = FileSource.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -91,6 +92,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42AD287AF25600EB9D9B /* AudioChunk.h */, 8307D31B2860722C000FF8EB /* SandboxBroker.h */, 17ADB4080B979A8A00257CA2 /* Plugin.h */, 17ADB4180B979AEB00257CA2 /* FileSource.h */, diff --git a/Plugins/Flac/Flac.xcodeproj/project.pbxproj b/Plugins/Flac/Flac.xcodeproj/project.pbxproj index 8781fe57d..a7265f2d1 100644 --- a/Plugins/Flac/Flac.xcodeproj/project.pbxproj +++ b/Plugins/Flac/Flac.xcodeproj/project.pbxproj @@ -36,6 +36,7 @@ 32DBCF630370AF2F00C91783 /* Flac_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Flac_Prefix.pch; sourceTree = ""; }; 8301C145287805F500651A6E /* NSDictionary+Merge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Merge.h"; path = "../../Utils/NSDictionary+Merge.h"; sourceTree = ""; }; 8301C146287805F500651A6E /* NSDictionary+Merge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Merge.m"; path = "../../Utils/NSDictionary+Merge.m"; sourceTree = ""; }; + 834A42B4287AF7AA00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8356BD1927B3CCBB0074E50C /* HTTPSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPSource.h; path = ../HTTPSource/HTTPSource.h; sourceTree = ""; }; 836EF0D927BB970B00BF35B2 /* libFLAC.8.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libFLAC.8.dylib; path = ../../ThirdParty/flac/lib/libFLAC.8.dylib; sourceTree = ""; }; 83747C4A2862DCF40021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; @@ -92,6 +93,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42B4287AF7AA00EB9D9B /* AudioChunk.h */, 8301C145287805F500651A6E /* NSDictionary+Merge.h */, 8301C146287805F500651A6E /* NSDictionary+Merge.m */, 83AA660A27B7DAE40098D4B8 /* cuesheet.m */, diff --git a/Plugins/Flac/FlacDecoder.m b/Plugins/Flac/FlacDecoder.m index 876682d9e..f594cec6d 100644 --- a/Plugins/Flac/FlacDecoder.m +++ b/Plugins/Flac/FlacDecoder.m @@ -361,39 +361,23 @@ void ErrorCallback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorS return YES; } -- (int)readAudio:(void *)buffer frames:(UInt32)frames { - int framesRead = 0; - while(framesRead < frames) { - if(blockBufferFrames == 0) { - if(framesRead) { - break; - } +- (AudioChunk *)readAudio { + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = nil; - if(FLAC__stream_decoder_get_state(decoder) == FLAC__STREAM_DECODER_END_OF_STREAM) { - break; - } + if(FLAC__stream_decoder_get_state(decoder) == FLAC__STREAM_DECODER_END_OF_STREAM) { + return nil; + } - if(!FLAC__stream_decoder_process_single(decoder)) { - break; - } - } + if(!FLAC__stream_decoder_process_single(decoder)) { + return nil; + } - int bytesPerFrame = ((bitsPerSample + 7) / 8) * channels; + if(blockBufferFrames > 0) { + chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:blockBuffer frameCount:blockBufferFrames]; - int framesToRead = blockBufferFrames; - if(blockBufferFrames > frames) { - framesToRead = frames; - } - - memcpy(((uint8_t *)buffer) + (framesRead * bytesPerFrame), (uint8_t *)blockBuffer, framesToRead * bytesPerFrame); - - frames -= framesToRead; - framesRead += framesToRead; - blockBufferFrames -= framesToRead; - - if(blockBufferFrames > 0) { - memmove((uint8_t *)blockBuffer, ((uint8_t *)blockBuffer) + (framesToRead * bytesPerFrame), blockBufferFrames * bytesPerFrame); - } + blockBufferFrames = 0; } if(![source seekable]) { @@ -429,7 +413,7 @@ void ErrorCallback(const FLAC__StreamDecoder *decoder, FLAC__StreamDecoderErrorS } } - return framesRead; + return chunk; } - (void)close { diff --git a/Plugins/GME/GME.xcodeproj/project.pbxproj b/Plugins/GME/GME.xcodeproj/project.pbxproj index 010a16d66..4aa981e84 100644 --- a/Plugins/GME/GME.xcodeproj/project.pbxproj +++ b/Plugins/GME/GME.xcodeproj/project.pbxproj @@ -63,6 +63,7 @@ 8319C74E237629D300BFFAE0 /* GamePropertiesReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GamePropertiesReader.h; sourceTree = ""; }; 8319C74F237629D400BFFAE0 /* GamePropertiesReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GamePropertiesReader.m; sourceTree = ""; }; 833F68351CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 834A42B5287AF8FE00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 835C888F22CC1883001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747C452862DCD90021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8384912E1808175400E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; @@ -119,6 +120,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42B5287AF8FE00EB9D9B /* AudioChunk.h */, 17C8F33B0CBED3BE008D969D /* GameContainer.h */, 17C8F33C0CBED3BE008D969D /* GameContainer.m */, 17C8F33D0CBED3BE008D969D /* GameDecoder.h */, diff --git a/Plugins/GME/GameDecoder.m b/Plugins/GME/GameDecoder.m index cec7ae0fa..528669e23 100644 --- a/Plugins/GME/GameDecoder.m +++ b/Plugins/GME/GameDecoder.m @@ -174,11 +174,18 @@ gme_err_t readCallback(void *data, void *out, int count) { return @{}; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { + int frames = 1024; + int16_t buffer[frames * 2]; + void *buf = (void *)buffer; + + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + int numSamples = frames * 2; // channels = 2 if(gme_track_ended(emu)) { - return 0; + return nil; } if(IsRepeatOneSet()) @@ -190,7 +197,11 @@ gme_err_t readCallback(void *data, void *out, int count) { // Some formats support length, but we'll add that in the future. //(From gme.txt) If track length, then use it. If loop length, play for intro + loop * 2. Otherwise, default to 2.5 minutes - return frames; // GME will always generate samples. There's no real EOS. + // GME will always generate samples. There's no real EOS. + + [chunk assignSamples:buffer frameCount:numSamples]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj b/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj index 73695ae71..93628d75a 100644 --- a/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj +++ b/Plugins/HTTPSource/HTTPSource.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ 17ADB60C0B97A74800257CA2 /* HTTPSource.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = HTTPSource.h; sourceTree = ""; }; 17ADB6340B97A8B400257CA2 /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = ../../Audio/Plugin.h; sourceTree = SOURCE_ROOT; }; 32DBCF630370AF2F00C91783 /* HTTPSource_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HTTPSource_Prefix.pch; sourceTree = ""; }; + 834A42B9287AFAB500EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8356BD1727B3B7340074E50C /* libcurl.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libcurl.tbd; path = usr/lib/libcurl.tbd; sourceTree = SDKROOT; }; 83747C362862DC0D0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8384912F1808180000E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; @@ -87,6 +88,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42B9287AFAB500EB9D9B /* AudioChunk.h */, 8384912F1808180000E7332D /* Logging.h */, 17ADB6340B97A8B400257CA2 /* Plugin.h */, 17ADB60C0B97A74800257CA2 /* HTTPSource.h */, diff --git a/Plugins/HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj b/Plugins/HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj index 95ea4807c..90c114974 100644 --- a/Plugins/HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj +++ b/Plugins/HighlyComplete/HighlyComplete.xcodeproj/project.pbxproj @@ -190,6 +190,7 @@ 8343790C17F96E2600584396 /* HighlyQuixotic.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = HighlyQuixotic.xcodeproj; path = ../../Frameworks/HighlyQuixotic/HighlyQuixotic.xcodeproj; sourceTree = ""; }; 8343796317F97BDB00584396 /* HighlyAdvanced.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = HighlyAdvanced.xcodeproj; path = ../../Frameworks/HighlyAdvanced/HighlyAdvanced.xcodeproj; sourceTree = ""; }; 834379A717F9818400584396 /* HCDecoder.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = HCDecoder.mm; sourceTree = ""; }; + 834A42B6287AF99600EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8360EEE417F92AC8005208A4 /* HighlyComplete.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = HighlyComplete.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8360EEE717F92AC8005208A4 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 8360EEEA17F92AC8005208A4 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -311,6 +312,7 @@ 8360EEED17F92AC8005208A4 /* HighlyComplete */ = { isa = PBXGroup; children = ( + 834A42B6287AF99600EB9D9B /* AudioChunk.h */, 83AA660827B7CCB00098D4B8 /* Logging.h */, 83FAF8A318ADD27F00057CAF /* PlaylistController.h */, 8324C584181513A10046F78F /* circular_buffer.h */, diff --git a/Plugins/HighlyComplete/HighlyComplete/HCDecoder.mm b/Plugins/HighlyComplete/HighlyComplete/HCDecoder.mm index 432a219a2..1bcaafe87 100644 --- a/Plugins/HighlyComplete/HighlyComplete/HCDecoder.mm +++ b/Plugins/HighlyComplete/HighlyComplete/HCDecoder.mm @@ -72,7 +72,7 @@ - (psf_file_container *)init { if((self = [super init])) { lock = [[NSLock alloc] init]; - list = [[NSMutableDictionary alloc] initWithCapacity:0]; + list = [[NSMutableDictionary alloc] init]; } return self; } @@ -1302,7 +1302,7 @@ static int usf_info(void *context, const char *name, const char *value) { return frames; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { if(!emulatorCore) { if(![self initializeDecoder]) return 0; @@ -1314,6 +1314,10 @@ static int usf_info(void *context, const char *name, const char *value) { usfRemoveSilence = NO; } + int frames = 1024; + int16_t buffer[frames * 2]; + void *buf = (void *)buffer; + unsigned long written = silence_test_buffer.data_available() / 2; if(written > frames) written = frames; @@ -1342,7 +1346,11 @@ static int usf_info(void *context, const char *name, const char *value) { framesRead += written; - return (int)written; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:written]; + + return chunk; } - (void)closeDecoder { diff --git a/Plugins/Hively/Hively.xcodeproj/project.pbxproj b/Plugins/Hively/Hively.xcodeproj/project.pbxproj index b779471a6..0e4551046 100644 --- a/Plugins/Hively/Hively.xcodeproj/project.pbxproj +++ b/Plugins/Hively/Hively.xcodeproj/project.pbxproj @@ -49,6 +49,7 @@ /* Begin PBXFileReference section */ 831C7F6918ADD73F00CE4A69 /* PlaylistController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistController.h; path = ../../../Playlist/PlaylistController.h; sourceTree = ""; }; 833F68471CDBCABF00AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 834A42B8287AFA3600EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 836FB52D1820538700B3AD2D /* Hively.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Hively.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 836FB5301820538700B3AD2D /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; 836FB5331820538700B3AD2D /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; @@ -122,6 +123,7 @@ 836FB5361820538700B3AD2D /* Hively */ = { isa = PBXGroup; children = ( + 834A42B8287AFA3600EB9D9B /* AudioChunk.h */, 831C7F6918ADD73F00CE4A69 /* PlaylistController.h */, 836FB5A31820557E00B3AD2D /* Plugin.h */, 836FB59A1820556F00B3AD2D /* HVLDecoder.h */, diff --git a/Plugins/Hively/Hively/HVLDecoder.m b/Plugins/Hively/Hively/HVLDecoder.m index d6747800b..b56c4ad98 100644 --- a/Plugins/Hively/Hively/HVLDecoder.m +++ b/Plugins/Hively/Hively/HVLDecoder.m @@ -107,7 +107,11 @@ static void oneTimeInit(void) { return @{}; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { + int frames = 1024; + float buffer[frames * 2]; + void *buf = (void *)buffer; + BOOL repeatone = IsRepeatOneSet(); if(!repeatone && framesRead >= totalFrames) @@ -157,7 +161,11 @@ static void oneTimeInit(void) { framesRead += total; - return total; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:total]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/M3u/M3u.xcodeproj/project.pbxproj b/Plugins/M3u/M3u.xcodeproj/project.pbxproj index f7b79b86e..00b256b23 100644 --- a/Plugins/M3u/M3u.xcodeproj/project.pbxproj +++ b/Plugins/M3u/M3u.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 32DBCF630370AF2F00C91783 /* M3u_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = M3u_Prefix.pch; sourceTree = ""; }; 833F68391CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 834A42BA287AFAEF00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 835C889122CC1885001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747C2C2862DBBE0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 83849130180818B100E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; @@ -75,6 +76,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42BA287AFAEF00EB9D9B /* AudioChunk.h */, 83849130180818B100E7332D /* Logging.h */, 8E8D401B0CBAFEF200135C1B /* Plugin.h */, 8E8D40270CBAFF4300135C1B /* M3uContainer.h */, diff --git a/Plugins/MAD/MAD.xcodeproj/project.pbxproj b/Plugins/MAD/MAD.xcodeproj/project.pbxproj index b1fc88e11..38917b0ad 100644 --- a/Plugins/MAD/MAD.xcodeproj/project.pbxproj +++ b/Plugins/MAD/MAD.xcodeproj/project.pbxproj @@ -15,6 +15,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 834A42BB287AFB0700EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8372C92327C785BD00E250C9 /* MAD.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MAD.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8372C93327C7861300E250C9 /* MADDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MADDecoder.h; sourceTree = ""; }; 8372C93427C7861300E250C9 /* MADDecoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MADDecoder.m; sourceTree = ""; }; @@ -48,6 +49,7 @@ children = ( 83747C262862DB9F0021245F /* Xcode-config */, 83F97B6628600F9300A70B97 /* ThirdParty */, + 834A42BB287AFB0700EB9D9B /* AudioChunk.h */, 8372C93A27C786DD00E250C9 /* HTTPSource.h */, 8372C93927C7866B00E250C9 /* Logging.h */, 8372C93827C7865A00E250C9 /* Plugin.h */, diff --git a/Plugins/MAD/MADDecoder.m b/Plugins/MAD/MADDecoder.m index 52b8cc680..2136f14ae 100644 --- a/Plugins/MAD/MADDecoder.m +++ b/Plugins/MAD/MADDecoder.m @@ -651,7 +651,7 @@ return 1; } -- (BOOL)syncFormat:(BOOL)updateNow { +- (BOOL)syncFormat { float _sampleRate = _frame.header.samplerate; int _channels = MAD_NCHANNELS(&_frame.header); int _layer = 3; @@ -674,7 +674,7 @@ _channels != channels || _layer != layer); - if(changed && updateNow) { + if(changed) { sampleRate = _sampleRate; channels = _channels; layer = _layer; @@ -686,29 +686,24 @@ return changed; } -- (int)readAudio:(void *)buffer frames:(UInt32)frames { +- (AudioChunk *)readAudio { int framesRead = 0; if(!_firstFrame) - [self syncFormat:YES]; + [self syncFormat]; + + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = nil; for(;;) { - long framesRemaining = frames - framesRead; - long framesToCopy = (_outputFrames > framesRemaining ? framesRemaining : _outputFrames); + long framesToCopy = _outputFrames; if(framesToCopy) { - memcpy(buffer + (framesRead * channels * sizeof(float)), _outputBuffer, framesToCopy * channels * sizeof(float)); - framesRead += framesToCopy; - - if(framesToCopy != _outputFrames) { - memmove(_outputBuffer, _outputBuffer + (framesToCopy * channels), (_outputFrames - framesToCopy) * channels * sizeof(float)); - } - - _outputFrames -= framesToCopy; - } - - if(framesRead == frames) + chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:_outputBuffer frameCount:framesToCopy]; + _outputFrames = 0; break; + } int r = [self decodeMPEGFrame]; // DLog(@"Decoding frame: %i", r); @@ -720,18 +715,13 @@ [self writeOutput]; // DLog(@"Wrote output"); - if([self syncFormat:NO]) { - if(framesRead) - break; - else - [self syncFormat:YES]; - } + [self syncFormat]; } [self updateMetadata]; // DLog(@"Read: %i/%i", bytesRead, size); - return framesRead; + return chunk; } - (void)close { diff --git a/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj b/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj index 66fe9f117..1fd5879e0 100644 --- a/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj +++ b/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj @@ -99,6 +99,7 @@ 831E2A9427B4B2FA006F1C86 /* json.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = json.h; sourceTree = ""; }; 831E2A9527B4B2FA006F1C86 /* json-builder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "json-builder.h"; sourceTree = ""; }; 833F68431CDBCABE00AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 834A42BC287AFC7F00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 834BE9191DE407CB00A07DCD /* resampler.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = resampler.c; sourceTree = ""; }; 834BE91A1DE407CB00A07DCD /* resampler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = resampler.h; sourceTree = ""; }; 8356BCC427B352620074E50C /* BMPlayer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = BMPlayer.cpp; sourceTree = ""; }; @@ -306,6 +307,7 @@ 83B06690180D5668008E3612 /* MIDI */ = { isa = PBXGroup; children = ( + 834A42BC287AFC7F00EB9D9B /* AudioChunk.h */, 8307D31E28607377000FF8EB /* SandboxBroker.h */, 831E2A9127B4B2FA006F1C86 /* json */, 831E2A7D27B4B2B2006F1C86 /* BASS */, diff --git a/Plugins/MIDI/MIDI/MIDIDecoder.mm b/Plugins/MIDI/MIDI/MIDIDecoder.mm index 1da27f543..2e7b01a60 100644 --- a/Plugins/MIDI/MIDI/MIDIDecoder.mm +++ b/Plugins/MIDI/MIDI/MIDIDecoder.mm @@ -276,14 +276,14 @@ static OSType getOSType(const char *in_) { return YES; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { BOOL repeatone = IsRepeatOneSet(); long localFramesLength = framesLength; long localTotalFrames = totalFrames; if(!player) { if(![self initDecoder]) - return -1; + return nil; } player->setLoopMode((repeatone || isLooped) ? (MIDIPlayer::loop_mode_enable | MIDIPlayer::loop_mode_force) : 0); @@ -302,7 +302,10 @@ static OSType getOSType(const char *in_) { soundFontsAssigned = YES; } - UInt32 frames_done = player->Play((float *)buf, frames); + int frames = 1024; + float buffer[frames * 2]; + + UInt32 frames_done = player->Play(buffer, frames); if(!frames_done) return 0; @@ -315,7 +318,7 @@ static OSType getOSType(const char *in_) { long fadeEnd = (framesRead + frames > localTotalFrames) ? localTotalFrames : (framesRead + frames); long fadePos; - float *buff = (float *)buf; + float *buff = buffer; float fadeScale = (float)(framesFade - (fadeStart - localFramesLength)) / framesFade; float fadeStep = 1.0 / (float)framesFade; @@ -337,13 +340,17 @@ static OSType getOSType(const char *in_) { } framesRead += frames; - return frames; + + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:frames]; + + return chunk; } - (long)seek:(long)frame { if(!player) { - float temp[2]; - if([self readAudio:temp frames:1] < 1) + if(![self readAudio]) return -1; } diff --git a/Plugins/Musepack/Musepack.xcodeproj/project.pbxproj b/Plugins/Musepack/Musepack.xcodeproj/project.pbxproj index a04724bbe..bb54d933a 100644 --- a/Plugins/Musepack/Musepack.xcodeproj/project.pbxproj +++ b/Plugins/Musepack/Musepack.xcodeproj/project.pbxproj @@ -51,6 +51,7 @@ 1703330A0B8FB64500327265 /* MusepackDecoder.m */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.objc; path = MusepackDecoder.m; sourceTree = ""; }; 17F562570C3BD97B0019975C /* MPCDec.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MPCDec.xcodeproj; path = ../../Frameworks/MPCDec/MPCDec.xcodeproj; sourceTree = SOURCE_ROOT; }; 32DBCF630370AF2F00C91783 /* Musepack_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Musepack_Prefix.pch; sourceTree = ""; }; + 834A42BD287AFD0D00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747C1D2862DB560021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 838491311808190400E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* Musepack.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Musepack.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -105,6 +106,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42BD287AFD0D00EB9D9B /* AudioChunk.h */, 838491311808190400E7332D /* Logging.h */, 8E2B8B4A0B9B48D000F2D9E8 /* Plugin.h */, 170333090B8FB64500327265 /* MusepackDecoder.h */, diff --git a/Plugins/Musepack/MusepackDecoder.m b/Plugins/Musepack/MusepackDecoder.m index 263c3abdf..8cdf86fda 100644 --- a/Plugins/Musepack/MusepackDecoder.m +++ b/Plugins/Musepack/MusepackDecoder.m @@ -109,11 +109,15 @@ mpc_bool_t CanSeekProc(mpc_reader *p_reader) { return YES; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { MPC_SAMPLE_FORMAT sampleBuffer[MPC_DECODER_BUFFER_LENGTH]; + int frames = 1024; + float buffer[frames * 2]; + void *buf = (void *)buffer; + int framesRead = 0; - int bytesPerFrame = sizeof(float) * 2; // bitsPerSample == 16, channels == 2 + int bytesPerFrame = sizeof(float) * 2; // bitsPerSample == 32, channels == 2 while(framesRead < frames) { // Fill from buffer, going by bufferFrames // if still needs more, decode and repeat @@ -150,7 +154,11 @@ mpc_bool_t CanSeekProc(mpc_reader *p_reader) { } } - return framesRead; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:framesRead]; + + return chunk; } - (void)close { diff --git a/Plugins/OpenMPT/OpenMPT.xcodeproj/project.pbxproj b/Plugins/OpenMPT/OpenMPT.xcodeproj/project.pbxproj index 3ba706b64..993436f50 100644 --- a/Plugins/OpenMPT/OpenMPT.xcodeproj/project.pbxproj +++ b/Plugins/OpenMPT/OpenMPT.xcodeproj/project.pbxproj @@ -48,6 +48,7 @@ /* Begin PBXFileReference section */ 833A899B286FF3150022E036 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 834A42BE287AFDC300EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747C182862DB2F0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 83E5EFA31FFEF78100659F0F /* OpenMPT.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OpenMPT.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 83E5EFA61FFEF78100659F0F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -124,6 +125,7 @@ 83E5FE6A1FFF003900659F0F /* Classes */ = { isa = PBXGroup; children = ( + 834A42BE287AFDC300EB9D9B /* AudioChunk.h */, 83E5FE6B1FFF004D00659F0F /* Logging.h */, 83E5FE761FFF076F00659F0F /* PlaylistController.h */, 83E5FE6C1FFF006400659F0F /* Plugin.h */, diff --git a/Plugins/OpenMPT/OpenMPT/OMPTDecoder.mm b/Plugins/OpenMPT/OpenMPT/OMPTDecoder.mm index db410f2b5..ca2226cda 100644 --- a/Plugins/OpenMPT/OpenMPT/OMPTDecoder.mm +++ b/Plugins/OpenMPT/OpenMPT/OMPTDecoder.mm @@ -112,9 +112,13 @@ static void g_push_archive_extensions(std::vector &list) { return @{}; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { mod->set_repeat_count(IsRepeatOneSet() ? -1 : 0); + int frames = 1024; + float buffer[frames * 2]; + void *buf = (void *)buffer; + int total = 0; while(total < frames) { int framesToRender = 1024; @@ -131,7 +135,11 @@ static void g_push_archive_extensions(std::vector &list) { break; } - return total; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:total]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/Opus/Opus/OpusDecoder.m b/Plugins/Opus/Opus/OpusDecoder.m index d625f9524..6c92cbaa3 100644 --- a/Plugins/Opus/Opus/OpusDecoder.m +++ b/Plugins/Opus/Opus/OpusDecoder.m @@ -222,7 +222,7 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va } } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { int numread; int total = 0; @@ -236,7 +236,10 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va [self updateMetadata]; } + int frames = 1024; int size = frames * channels; + float buffer[size]; + void *buf = (void *)buffer; do { float *out = ((float *)buf) + total; @@ -265,7 +268,11 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va [self updateIcyMetadata]; - return total / channels; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:total / channels]; + + return chunk; } - (void)close { diff --git a/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj b/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj index 40e6acad8..bbaf6262e 100644 --- a/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj +++ b/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj @@ -32,6 +32,7 @@ 83186314285CEC91001422CC /* NSDictionary+Merge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Merge.h"; path = "../../../Utils/NSDictionary+Merge.h"; sourceTree = ""; }; 83186315285CEC91001422CC /* NSDictionary+Merge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Merge.m"; path = "../../../Utils/NSDictionary+Merge.m"; sourceTree = ""; }; 833F68411CDBCABC00AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 834A42BF287AFE2600EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8356BD1B27B469B80074E50C /* HTTPSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPSource.h; path = ../../HTTPSource/HTTPSource.h; sourceTree = ""; }; 836EF0CE27BB952F00BF35B2 /* libopusfile.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libopusfile.0.dylib; path = ../../ThirdParty/opusfile/lib/libopusfile.0.dylib; sourceTree = ""; }; 83747C0E2862DAC70021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; @@ -114,6 +115,7 @@ 8375B04517FFEA400092A79F /* Opus */ = { isa = PBXGroup; children = ( + 834A42BF287AFE2600EB9D9B /* AudioChunk.h */, 83186314285CEC91001422CC /* NSDictionary+Merge.h */, 83186315285CEC91001422CC /* NSDictionary+Merge.m */, 8356BD1B27B469B80074E50C /* HTTPSource.h */, diff --git a/Plugins/Pls/Pls.xcodeproj/project.pbxproj b/Plugins/Pls/Pls.xcodeproj/project.pbxproj index 371a919ba..d2a06dea0 100644 --- a/Plugins/Pls/Pls.xcodeproj/project.pbxproj +++ b/Plugins/Pls/Pls.xcodeproj/project.pbxproj @@ -18,6 +18,7 @@ 1058C7ADFEA557BF11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; 32DBCF630370AF2F00C91783 /* Pls_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Pls_Prefix.pch; sourceTree = ""; }; 833F68381CDBCAB200AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; + 834A42C0287AFEB100EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 835C889422CC1887001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747C092862DAA90021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 838491321808193F00E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; @@ -75,6 +76,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42C0287AFEB100EB9D9B /* AudioChunk.h */, 838491321808193F00E7332D /* Logging.h */, 8E8D41A50CBB0CBE00135C1B /* Plugin.h */, 8E8D419F0CBB0CA700135C1B /* PlsContainer.h */, diff --git a/Plugins/Shorten/Shorten.xcodeproj/project.pbxproj b/Plugins/Shorten/Shorten.xcodeproj/project.pbxproj index 4050798ab..6bd680791 100644 --- a/Plugins/Shorten/Shorten.xcodeproj/project.pbxproj +++ b/Plugins/Shorten/Shorten.xcodeproj/project.pbxproj @@ -52,6 +52,7 @@ 177FCFAC0B90C96B0011C3B5 /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = ../../Audio/Plugin.h; sourceTree = SOURCE_ROOT; }; 17F563DD0C3BDBF10019975C /* Shorten.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Shorten.xcodeproj; path = ../../Frameworks/Shorten/Shorten.xcodeproj; sourceTree = SOURCE_ROOT; }; 32DBCF630370AF2F00C91783 /* Shorten_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Shorten_Prefix.pch; sourceTree = ""; }; + 834A42A9287AEF1300EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747C042862DA780021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* Shorten.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Shorten.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -104,6 +105,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42A9287AEF1300EB9D9B /* AudioChunk.h */, 177FCFAC0B90C96B0011C3B5 /* Plugin.h */, 1745C42B0B90C1DC00A6768C /* ShortenDecoder.h */, 1745C42C0B90C1DC00A6768C /* ShortenDecoder.mm */, diff --git a/Plugins/Shorten/ShortenDecoder.mm b/Plugins/Shorten/ShortenDecoder.mm index 222cc3ee6..f1fa809c8 100644 --- a/Plugins/Shorten/ShortenDecoder.mm +++ b/Plugins/Shorten/ShortenDecoder.mm @@ -41,16 +41,25 @@ return YES; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { + long frames = 1024; long bytesPerFrame = channels * (bitsPerSample / 8); long amountRead; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + + uint8_t buffer[bytesPerFrame * 1024]; + void *buf = (void *)buffer; + // For some reason a busy loop is causing pops when output is set to 48000. Probably CPU starvation, since the SHN decoder seems to use a multithreaded nonblocking approach. do { amountRead = decoder->read(buf, frames * bytesPerFrame); } while(amountRead == -1); - return (int)(amountRead / bytesPerFrame); + [chunk assignSamples:buf frameCount:amountRead / bytesPerFrame]; + + return chunk; } - (long)seek:(long)sample { diff --git a/Plugins/SilenceDecoder/SilenceDecoder.xcodeproj/project.pbxproj b/Plugins/SilenceDecoder/SilenceDecoder.xcodeproj/project.pbxproj index c68a1b3a9..d48a77452 100644 --- a/Plugins/SilenceDecoder/SilenceDecoder.xcodeproj/project.pbxproj +++ b/Plugins/SilenceDecoder/SilenceDecoder.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 834A42C1287AFED700EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747BFA2862D95C0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 83F9D7E71A884B44007ABEC2 /* SilenceDecoder.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = SilenceDecoder.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 83F9D7EB1A884B44007ABEC2 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -64,6 +65,7 @@ 83F9D7E91A884B44007ABEC2 /* SilenceDecoder */ = { isa = PBXGroup; children = ( + 834A42C1287AFED700EB9D9B /* AudioChunk.h */, 83F9D8091A884CB5007ABEC2 /* Logging.h */, 83F9D8081A884C93007ABEC2 /* Plugin.h */, 83F9D8041A884C23007ABEC2 /* PlaylistController.h */, diff --git a/Plugins/SilenceDecoder/SilenceDecoder/SilenceDecoder.m b/Plugins/SilenceDecoder/SilenceDecoder/SilenceDecoder.m index b049dc5cd..a7a1b4e17 100644 --- a/Plugins/SilenceDecoder/SilenceDecoder/SilenceDecoder.m +++ b/Plugins/SilenceDecoder/SilenceDecoder/SilenceDecoder.m @@ -50,7 +50,11 @@ enum { channels = 2 }; return @{}; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { + int frames = 1024; + float buffer[frames * channels]; + void *buf = (void *)buffer; + int total = frames; if(!IsRepeatOneSet()) { @@ -62,7 +66,11 @@ enum { channels = 2 }; memset(buf, 0, sizeof(float) * total * channels); - return total; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + [chunk assignSamples:buffer frameCount:total]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/TagLib/TagLib.xcodeproj/project.pbxproj b/Plugins/TagLib/TagLib.xcodeproj/project.pbxproj index e173e3b13..7f142aac0 100644 --- a/Plugins/TagLib/TagLib.xcodeproj/project.pbxproj +++ b/Plugins/TagLib/TagLib.xcodeproj/project.pbxproj @@ -12,6 +12,7 @@ 17F563B40C3BDBB30019975C /* TagLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 17F563A60C3BDB8F0019975C /* TagLib.framework */; }; 17F563B60C3BDBB50019975C /* TagLib.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 17F563A60C3BDB8F0019975C /* TagLib.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; }; 8307D31D286072BF000FF8EB /* SandboxBroker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8307D31C286072BF000FF8EB /* SandboxBroker.h */; }; + 834A42C3287AFF5E00EB9D9B /* AudioChunk.h in Headers */ = {isa = PBXBuildFile; fileRef = 834A42C2287AFF5E00EB9D9B /* AudioChunk.h */; }; 8356BCE527B377C20074E50C /* TagLibID3v2Reader.h in Headers */ = {isa = PBXBuildFile; fileRef = 8356BCE327B377C20074E50C /* TagLibID3v2Reader.h */; }; 8356BCE627B377C20074E50C /* TagLibID3v2Reader.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8356BCE427B377C20074E50C /* TagLibID3v2Reader.mm */; }; 8384913A18081FFC00E7332D /* Logging.h in Headers */ = {isa = PBXBuildFile; fileRef = 8384913918081FFC00E7332D /* Logging.h */; }; @@ -60,6 +61,7 @@ 17F563A00C3BDB8F0019975C /* TagLib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = TagLib.xcodeproj; path = ../../Frameworks/TagLib/TagLib.xcodeproj; sourceTree = SOURCE_ROOT; }; 32DBCF630370AF2F00C91783 /* TagLib_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TagLib_Prefix.pch; sourceTree = ""; }; 8307D31C286072BF000FF8EB /* SandboxBroker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SandboxBroker.h; path = ../../Utils/SandboxBroker.h; sourceTree = ""; }; + 834A42C2287AFF5E00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8356BCE327B377C20074E50C /* TagLibID3v2Reader.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = TagLibID3v2Reader.h; sourceTree = ""; }; 8356BCE427B377C20074E50C /* TagLibID3v2Reader.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = TagLibID3v2Reader.mm; sourceTree = ""; }; 83747BF52862D9470021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; @@ -115,6 +117,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42C2287AFF5E00EB9D9B /* AudioChunk.h */, 8307D31C286072BF000FF8EB /* SandboxBroker.h */, 8384913918081FFC00E7332D /* Logging.h */, 07CACE890ED1AD1000C0F1E8 /* TagLibMetadataWriter.h */, @@ -188,6 +191,7 @@ buildActionMask = 2147483647; files = ( 8384913A18081FFC00E7332D /* Logging.h in Headers */, + 834A42C3287AFF5E00EB9D9B /* AudioChunk.h in Headers */, 8307D31D286072BF000FF8EB /* SandboxBroker.h in Headers */, 8356BCE527B377C20074E50C /* TagLibID3v2Reader.h in Headers */, ); diff --git a/Plugins/Vorbis/VorbisDecoder.m b/Plugins/Vorbis/VorbisDecoder.m index 410ed5641..a89b0e770 100644 --- a/Plugins/Vorbis/VorbisDecoder.m +++ b/Plugins/Vorbis/VorbisDecoder.m @@ -200,9 +200,10 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va } } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { int numread; int total = 0; + int frames = 1024; if(currentSection != lastSection) { vorbis_info *vi; @@ -218,6 +219,12 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va [self updateMetadata]; } + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + + float buffer[frames * channels]; + void *buf = (void *)buffer; + do { lastSection = currentSection; float **pcm; @@ -247,7 +254,9 @@ static void setDictionary(NSMutableDictionary *dict, NSString *tag, NSString *va [self updateIcyMetadata]; - return total; + [chunk assignSamples:buffer frameCount:total]; + + return chunk; } - (void)close { diff --git a/Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj b/Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj index a55517f99..68ac88223 100644 --- a/Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj +++ b/Plugins/Vorbis/VorbisPlugin.xcodeproj/project.pbxproj @@ -28,6 +28,7 @@ 8301C14A287810F300651A6E /* libFLAC.8.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libFLAC.8.dylib; path = ../../ThirdParty/flac/lib/libFLAC.8.dylib; sourceTree = ""; }; 83186311285CEBD2001422CC /* NSDictionary+Merge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Merge.h"; path = "../../Utils/NSDictionary+Merge.h"; sourceTree = ""; }; 83186312285CEBD2001422CC /* NSDictionary+Merge.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "NSDictionary+Merge.m"; path = "../../Utils/NSDictionary+Merge.m"; sourceTree = ""; }; + 834A42AB287AF0B000EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 8356BD1C27B46A2D0074E50C /* HTTPSource.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HTTPSource.h; path = ../HTTPSource/HTTPSource.h; sourceTree = ""; }; 836EF0D427BB969D00BF35B2 /* libvorbisfile.3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libvorbisfile.3.dylib; path = ../../ThirdParty/vorbis/lib/libvorbisfile.3.dylib; sourceTree = ""; }; 836EF0DE27BB987000BF35B2 /* libvorbis.0.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libvorbis.0.dylib; path = ../../ThirdParty/vorbis/lib/libvorbis.0.dylib; sourceTree = ""; }; @@ -92,6 +93,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42AB287AF0B000EB9D9B /* AudioChunk.h */, 83186311285CEBD2001422CC /* NSDictionary+Merge.h */, 83186312285CEBD2001422CC /* NSDictionary+Merge.m */, 8356BD1C27B46A2D0074E50C /* HTTPSource.h */, diff --git a/Plugins/WavPack/WavPack.xcodeproj/project.pbxproj b/Plugins/WavPack/WavPack.xcodeproj/project.pbxproj index 81002ed8b..16a29f5dd 100644 --- a/Plugins/WavPack/WavPack.xcodeproj/project.pbxproj +++ b/Plugins/WavPack/WavPack.xcodeproj/project.pbxproj @@ -52,6 +52,7 @@ 177FCF940B90C9450011C3B5 /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = ../../Audio/Plugin.h; sourceTree = SOURCE_ROOT; }; 17F562C20C3BDA5A0019975C /* WavPack.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = WavPack.xcodeproj; path = ../../Frameworks/WavPack/WavPack.xcodeproj; sourceTree = SOURCE_ROOT; }; 32DBCF630370AF2F00C91783 /* WavPack_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WavPack_Prefix.pch; sourceTree = ""; }; + 834A42AA287AEFC300EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 83747BE62862D8D60021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 83849133180819EB00E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* WavPack.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = WavPack.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -105,6 +106,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42AA287AEFC300EB9D9B /* AudioChunk.h */, 83849133180819EB00E7332D /* Logging.h */, 177FCF940B90C9450011C3B5 /* Plugin.h */, 1745C4D50B90C42500A6768C /* WavPackDecoder.h */, diff --git a/Plugins/WavPack/WavPackDecoder.m b/Plugins/WavPack/WavPackDecoder.m index 8b6b8e2e1..99d41b5c1 100644 --- a/Plugins/WavPack/WavPackDecoder.m +++ b/Plugins/WavPack/WavPackDecoder.m @@ -196,7 +196,12 @@ int32_t WriteBytesProc(void *ds, void *data, int32_t bcount) { return n; } */ -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { + int32_t frames = 1024; + + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + uint32_t sample; int32_t audioSample; uint32_t samplesRead; @@ -204,6 +209,10 @@ int32_t WriteBytesProc(void *ds, void *data, int32_t bcount) { int16_t *alias16; int32_t *alias32; + const size_t bufferSize = frames * [chunk format].mBytesPerFrame; + uint8_t buffer[bufferSize]; + void *buf = (void *)buffer; + size_t newSize = frames * sizeof(int32_t) * channels; if(!inputBuffer || newSize > inputBufferSize) { inputBuffer = realloc(inputBuffer, inputBufferSize = newSize); @@ -248,7 +257,9 @@ int32_t WriteBytesProc(void *ds, void *data, int32_t bcount) { ALog(@"Unsupported sample size: %d", bitsPerSample); } - return samplesRead; + [chunk assignSamples:buffer frameCount:samplesRead]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/libvgmPlayer/libvgmDecoder.mm b/Plugins/libvgmPlayer/libvgmDecoder.mm index 0c88639c4..61c45267b 100644 --- a/Plugins/libvgmPlayer/libvgmDecoder.mm +++ b/Plugins/libvgmPlayer/libvgmDecoder.mm @@ -208,9 +208,18 @@ const int masterVol = 0x10000; // Fixed point 16.16 return @{}; } -- (int)readAudio:(void*)buf frames:(UInt32)frames { +- (AudioChunk*)readAudio { if([self trackEnded]) - return 0; + return nil; + + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk* chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + + int frames = 1024; + const size_t bytesPerFrame = [chunk format].mBytesPerFrame; + uint8_t buffer[frames * bytesPerFrame]; + + void* buf = (void*)buffer; BOOL repeatOne = IsRepeatOneSet(); uint32_t maxLoops = repeatOne ? 0 : (uint32_t)loopCount; @@ -238,7 +247,9 @@ const int masterVol = 0x10000; // Fixed point 16.16 framesDone += framesToDo; } - return framesDone; + [chunk assignSamples:buffer frameCount:framesDone]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj b/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj index 7bde5bb11..71abb71c4 100644 --- a/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj +++ b/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj @@ -40,6 +40,7 @@ 83489C602782F39D00BDCEA2 /* libvgm-player.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = "libvgm-player.a"; path = "../../ThirdParty/libvgm/lib/libvgm-player.a"; sourceTree = ""; }; 83489C652782F74800BDCEA2 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; 83489C672782F74E00BDCEA2 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; }; + 834A42AC287AF18E00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 835C888F22CC1883001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747C312862DBE80021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8384912E1808175400E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; @@ -102,6 +103,7 @@ 08FB77AFFE84173DC02AAC07 /* Classes */ = { isa = PBXGroup; children = ( + 834A42AC287AF18E00EB9D9B /* AudioChunk.h */, 17C8F33B0CBED3BE008D969D /* libvgmContainer.h */, 17C8F33C0CBED3BE008D969D /* libvgmContainer.mm */, 17C8F33D0CBED3BE008D969D /* libvgmDecoder.h */, diff --git a/Plugins/sidplay/SidDecoder.mm b/Plugins/sidplay/SidDecoder.mm index 7c18ca2d8..3ef8a6668 100644 --- a/Plugins/sidplay/SidDecoder.mm +++ b/Plugins/sidplay/SidDecoder.mm @@ -62,7 +62,7 @@ static const char *extListStr[] = { ".str", NULL }; - (sid_file_container *)init { if((self = [super init])) { lock = [[NSLock alloc] init]; - list = [[NSMutableDictionary alloc] initWithCapacity:0]; + list = [[NSMutableDictionary alloc] init]; } return self; } @@ -275,59 +275,54 @@ static void sidTuneLoader(const char *fileName, std::vector &bufferRef) return @{}; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { int total = 0; - int16_t *sampleBuffer = (int16_t *)buf; - while(total < frames) { - int framesToRender = 1024; - if(framesToRender > frames) - framesToRender = frames; - int rendered = engine->play(sampleBuffer + total * n_channels, framesToRender * n_channels) / n_channels; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; - if(rendered <= 0) - break; + int16_t buffer[1024 * n_channels]; - if(n_channels == 2) { - for(int i = 0, j = rendered * 2; i < j; i += 2) { - int16_t *sample = sampleBuffer + total * 2 + i; - int mid = (int)(sample[0] + sample[1]) / 2; - int side = (int)(sample[0] - sample[1]) / 4; - sample[0] = mid + side; - sample[1] = mid - side; - } + int framesToRender = 1024; + int rendered = engine->play(buffer, framesToRender * n_channels) / n_channels; + + if(rendered <= 0) + return nil; + + if(n_channels == 2) { + for(int i = 0, j = rendered * 2; i < j; i += 2) { + int16_t *sample = buffer + total * 2 + i; + int mid = (int)(sample[0] + sample[1]) / 2; + int side = (int)(sample[0] - sample[1]) / 4; + sample[0] = mid + side; + sample[1] = mid - side; } - - renderedTotal += rendered; - - if(!IsRepeatOneSet() && renderedTotal >= length) { - int16_t *sampleBuf = (int16_t *)buf + total * n_channels; - long fadeEnd = fadeRemain - rendered; - if(fadeEnd < 0) - fadeEnd = 0; - float fadePosf = (float)fadeRemain / (float)fadeTotal; - const float fadeStep = 1.0f / (float)fadeTotal; - for(long fadePos = fadeRemain; fadePos > fadeEnd; --fadePos, fadePosf -= fadeStep) { - long offset = (fadeRemain - fadePos) * n_channels; - float sampleLeft = sampleBuf[offset + 0]; - sampleLeft *= fadePosf; - sampleBuf[offset + 0] = (int16_t)sampleLeft; - if(n_channels == 2) { - float sampleRight = sampleBuf[offset + 1]; - sampleRight *= fadePosf; - sampleBuf[offset + 1] = (int16_t)sampleRight; - } - } - rendered = (int)(fadeRemain - fadeEnd); - fadeRemain = fadeEnd; - } - - total += rendered; - - if(rendered < framesToRender) - break; } - return total; + if(!IsRepeatOneSet() && renderedTotal >= length) { + int16_t *sampleBuf = buffer; + long fadeEnd = fadeRemain - rendered; + if(fadeEnd < 0) + fadeEnd = 0; + float fadePosf = (float)fadeRemain / (float)fadeTotal; + const float fadeStep = 1.0f / (float)fadeTotal; + for(long fadePos = fadeRemain; fadePos > fadeEnd; --fadePos, fadePosf -= fadeStep) { + long offset = (fadeRemain - fadePos) * n_channels; + float sampleLeft = sampleBuf[offset + 0]; + sampleLeft *= fadePosf; + sampleBuf[offset + 0] = (int16_t)sampleLeft; + if(n_channels == 2) { + float sampleRight = sampleBuf[offset + 1]; + sampleRight *= fadePosf; + sampleBuf[offset + 1] = (int16_t)sampleRight; + } + } + rendered = (int)(fadeRemain - fadeEnd); + fadeRemain = fadeEnd; + } + + [chunk assignSamples:buffer frameCount:rendered]; + + return chunk; } - (long)seek:(long)frame { diff --git a/Plugins/sidplay/sidplay.xcodeproj/project.pbxproj b/Plugins/sidplay/sidplay.xcodeproj/project.pbxproj index c7274937a..f9bda9b1b 100644 --- a/Plugins/sidplay/sidplay.xcodeproj/project.pbxproj +++ b/Plugins/sidplay/sidplay.xcodeproj/project.pbxproj @@ -52,6 +52,7 @@ 8314D80D1A35658C00EEE8E6 /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../../Utils/Logging.h; sourceTree = ""; }; 8314D80E1A3565AC00EEE8E6 /* PlaylistController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistController.h; path = ../../../Playlist/PlaylistController.h; sourceTree = ""; }; 833A8996286FF2E30022E036 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; }; + 834A42A6287AEAAB00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 836F5BEA1A357915002730CC /* roms.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = roms.cpp; sourceTree = SOURCE_ROOT; }; 836F5BEB1A357915002730CC /* roms.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = roms.hpp; sourceTree = SOURCE_ROOT; }; 83747BFF2862DA420021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; @@ -92,6 +93,7 @@ 8314D6331A354DFE00EEE8E6 /* sidplay */ = { isa = PBXGroup; children = ( + 834A42A6287AEAAB00EB9D9B /* AudioChunk.h */, 836F5BEA1A357915002730CC /* roms.cpp */, 836F5BEB1A357915002730CC /* roms.hpp */, 8314D80E1A3565AC00EEE8E6 /* PlaylistController.h */, diff --git a/Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj b/Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj index 483427a91..51c581829 100644 --- a/Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj +++ b/Plugins/vgmstream/vgmstream.xcodeproj/project.pbxproj @@ -52,6 +52,7 @@ 833F68491CDBCAC000AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 8340888B1F6F604A00DCD404 /* VGMMetadataReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VGMMetadataReader.m; sourceTree = ""; }; 8340888D1F6F604B00DCD404 /* VGMMetadataReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VGMMetadataReader.h; sourceTree = ""; }; + 834A42A8287AEDFB00EB9D9B /* AudioChunk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioChunk.h; path = ../../../Audio/Chain/AudioChunk.h; sourceTree = ""; }; 835D241E235AB318009A1251 /* VGMPropertiesReader.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VGMPropertiesReader.m; sourceTree = ""; }; 835D241F235AB319009A1251 /* VGMPropertiesReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VGMPropertiesReader.h; sourceTree = ""; }; 836F6B1018BDB80D0095E648 /* vgmstream.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = vgmstream.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -141,6 +142,7 @@ 836F705A18BDC40E0095E648 /* VGMDecoder.h */, 836F705B18BDC40E0095E648 /* VGMDecoder.m */, 83AA5D2F1F6E301B0020821C /* Logging.h */, + 834A42A8287AEDFB00EB9D9B /* AudioChunk.h */, 836F706018BDC84D0095E648 /* Plugin.h */, 836F6B1A18BDB80D0095E648 /* Supporting Files */, ); diff --git a/Plugins/vgmstream/vgmstream/VGMDecoder.m b/Plugins/vgmstream/vgmstream/VGMDecoder.m index 5f49855c4..39355d33e 100644 --- a/Plugins/vgmstream/vgmstream/VGMDecoder.m +++ b/Plugins/vgmstream/vgmstream/VGMDecoder.m @@ -311,10 +311,17 @@ static NSString *get_description_tag(const char *description, const char *tag, c return @{}; } -- (int)readAudio:(void *)buf frames:(UInt32)frames { +- (AudioChunk *)readAudio { + UInt32 frames = 1024; UInt32 framesMax = frames; UInt32 framesDone = 0; + id audioChunkClass = NSClassFromString(@"AudioChunk"); + AudioChunk *chunk = [[audioChunkClass alloc] initWithProperties:[self properties]]; + + int16_t buffer[1024 * channels]; + void *buf = (void *)buffer; + if(canPlayForever) { BOOL repeatone = IsRepeatOneSet(); @@ -354,7 +361,9 @@ static NSString *get_description_tag(const char *description, const char *tag, c frames -= frames_to_do; } - return framesDone; + [chunk assignSamples:buffer frameCount:framesDone]; + + return chunk; } - (long)seek:(long)frame { From f5aa7401b62069621936027f318daa72a7347cca Mon Sep 17 00:00:00 2001 From: pax Date: Sun, 10 Jul 2022 14:40:41 +0200 Subject: [PATCH 05/12] translated equalizer strings, as well as the spotlight thing. --- pl.lproj/Equalizer.strings | 8 ++++---- pl.lproj/FileTree.strings | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pl.lproj/Equalizer.strings b/pl.lproj/Equalizer.strings index 5414cd967..5e24d3b6e 100644 --- a/pl.lproj/Equalizer.strings +++ b/pl.lproj/Equalizer.strings @@ -30,7 +30,7 @@ "ERP-9r-xp9.title" = "400"; /* Class = "NSButtonCell"; title = "Enabled"; ObjectID = "Id9-5k-q9Q"; */ -"Id9-5k-q9Q.title" = "Enabled"; +"Id9-5k-q9Q.title" = "Włączony"; /* Class = "NSTextFieldCell"; title = "500"; ObjectID = "JVJ-LV-LDc"; */ "JVJ-LV-LDc.title" = "500"; @@ -69,7 +69,7 @@ "Zlw-xU-QP7.title" = "-6 dB"; /* Class = "NSButtonCell"; title = "Tracking genre tags"; ObjectID = "aeV-tB-rvh"; */ -"aeV-tB-rvh.title" = "Tracking genre tags"; +"aeV-tB-rvh.title" = "śledzenie tagów gatunku"; /* Class = "NSButtonCell"; title = "Flatten EQ"; ObjectID = "bOS-GE-rwi"; */ "bOS-GE-rwi.title" = "Flatten EQ"; @@ -114,7 +114,7 @@ "ke7-4o-FJG.title" = "5"; /* Class = "NSTextFieldCell"; title = "Note: You may use right-click to draw an equalizer shape"; ObjectID = "lwG-Tm-rr1"; */ -"lwG-Tm-rr1.title" = "Note: You may use right-click to draw an equalizer shape"; +"lwG-Tm-rr1.title" = "uwaga: możesz użyć prawego klawisza myszy aby narysować kształt equalizera."; /* Class = "NSTextFieldCell"; title = "6.3"; ObjectID = "neW-5g-R0i"; */ "neW-5g-R0i.title" = "6.3"; @@ -141,4 +141,4 @@ "xM8-HB-8XL.title" = "1k"; /* Class = "NSTextFieldCell"; title = "Preset:"; ObjectID = "xsQ-DN-AcS"; */ -"xsQ-DN-AcS.title" = "Preset:"; +"xsQ-DN-AcS.title" = "ustawienia użytkownika:"; diff --git a/pl.lproj/FileTree.strings b/pl.lproj/FileTree.strings index 5e90ea13b..763a946aa 100644 --- a/pl.lproj/FileTree.strings +++ b/pl.lproj/FileTree.strings @@ -6,16 +6,16 @@ "110.title" = "Menu"; /* Class = "NSMenuItem"; title = "Show in Finder"; ObjectID = "112"; */ -"112.title" = "Show in Finder"; +"112.title" = "pokaż w finderze"; /* Class = "NSMenuItem"; title = "Add to Playlist"; ObjectID = "119"; */ -"119.title" = "Add to Playlist"; +"119.title" = "dodaj do playlisty."; /* Class = "NSMenuItem"; title = "Set as Root"; ObjectID = "124"; */ "124.title" = "Set as Root"; /* Class = "NSMenuItem"; title = "Set as Playlist"; ObjectID = "129"; */ -"129.title" = "Set as Playlist"; +"129.title" = "ustaw jako playlistę"; /* Class = "NSBox"; title = "Box"; ObjectID = "147"; */ "147.title" = "Box"; From e595dbd5256ef2546fbb8713247f857f4cf36a35 Mon Sep 17 00:00:00 2001 From: pax Date: Sun, 10 Jul 2022 15:02:06 +0200 Subject: [PATCH 06/12] first(really basic) open url panel translation. --- pl.lproj/Localizable.strings | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pl.lproj/Localizable.strings b/pl.lproj/Localizable.strings index ed5fdabb1..8e8b7efdf 100644 --- a/pl.lproj/Localizable.strings +++ b/pl.lproj/Localizable.strings @@ -1,7 +1,7 @@ "FeedbackFailedMessageText" = "Failed"; -"FeedbackFailedInformativeText" = "Feedback failed to send."; -"FeedbackSuccessMessageText" = "Success"; -"FeedbackSuccessInformativeText" = "Feedback successfully sent!"; +"FeedbackFailedInformativeText" = "Nie udało się wysłać twojej opinii."; +"FeedbackSuccessMessageText" = "success!"; +"FeedbackSuccessInformativeText" = "Opinia została wysłana pomyślnie."; "PlayButtonTooltip" = "Play"; "StopButtonTooltip" = "Stop"; From f8a8a57cf08e148ada12408266fcb058c216139f Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 10 Jul 2022 16:24:08 -0700 Subject: [PATCH 07/12] [Audio API] Repair the damage to the input chain The input chain could hang up indefinitely, and MAD decoder didn't indicate end of file properly. Signed-off-by: Christopher Snowhill --- Audio/Chain/ConverterNode.m | 15 ++++++++++----- Audio/Chain/InputNode.m | 2 +- Plugins/MAD/MADDecoder.m | 19 +++++++++++++------ 3 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Audio/Chain/ConverterNode.m b/Audio/Chain/ConverterNode.m index 932fa0e73..2109334da 100644 --- a/Audio/Chain/ConverterNode.m +++ b/Audio/Chain/ConverterNode.m @@ -444,11 +444,16 @@ static void convert_be_to_le(uint8_t *buffer, size_t bitsPerSample, size_t bytes chunk = [self convert]; } if(!chunk) { - continue; - } - @autoreleasepool { - [self writeChunk:chunk]; - chunk = nil; + if(paused) { + continue; + } else if(!streamFormatChanged) { + break; + } + } else { + @autoreleasepool { + [self writeChunk:chunk]; + chunk = nil; + } } if(streamFormatChanged) { [self cleanUp]; diff --git a/Audio/Chain/InputNode.m b/Audio/Chain/InputNode.m index 4a1fb9471..a071fa34a 100644 --- a/Audio/Chain/InputNode.m +++ b/Audio/Chain/InputNode.m @@ -187,7 +187,7 @@ static void *kInputNodeContext = &kInputNodeContext; chunk = [decoder readAudio]; } - if(chunk) { + if(chunk && [chunk frameCount]) { @autoreleasepool { [self writeChunk:chunk]; chunk = nil; diff --git a/Plugins/MAD/MADDecoder.m b/Plugins/MAD/MADDecoder.m index 2136f14ae..44914feb7 100644 --- a/Plugins/MAD/MADDecoder.m +++ b/Plugins/MAD/MADDecoder.m @@ -470,7 +470,7 @@ return ret; } -- (void)writeOutput { +- (BOOL)writeOutput { unsigned long startingSample = 0; unsigned long sampleCount = _synth.pcm.length; @@ -485,7 +485,7 @@ // Past the end of the file. if(totalFrames - _endPadding <= _framesDecoded) { // DLog(@"End of file. Not writing."); - return; + return YES; } // Clip this for the following calculation, so this doesn't underflow @@ -497,6 +497,11 @@ // DLog(@"End of file. %li", totalFrames - _endPadding - _framesDecoded); sampleCount = totalFrames - _endPadding - _framesDecoded + startingSample; } + } else { + // Past the end of the file. + if(totalFrames <= _framesDecoded) { + return YES; + } } // We haven't even gotten to the start yet @@ -504,7 +509,7 @@ // DLog(@"Skipping entire sample"); _framesDecoded += sampleCount; framesToSkip -= sampleCount; - return; + return NO; } framesToSkip = 0; @@ -536,6 +541,8 @@ // FILE *f = fopen("data.raw", "a"); // fwrite(_outputBuffer, channels * 2, _outputFrames, f); // fclose(f); + + return NO; } - (int)decodeMPEGFrame { @@ -687,8 +694,6 @@ } - (AudioChunk *)readAudio { - int framesRead = 0; - if(!_firstFrame) [self syncFormat]; @@ -712,7 +717,9 @@ else if(r == -1) // Unrecoverable error break; - [self writeOutput]; + if([self writeOutput]) { + return nil; + } // DLog(@"Wrote output"); [self syncFormat]; From 8d8b508d09752f84b35a7097d4c23b89186455e2 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Sun, 10 Jul 2022 16:36:31 -0700 Subject: [PATCH 08/12] [Audio Converter] Minor change for format changes This should also seal up any potential hole for problems if there's an audio format change and no audio buffered. Signed-off-by: Christopher Snowhill --- Audio/Chain/ConverterNode.m | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Audio/Chain/ConverterNode.m b/Audio/Chain/ConverterNode.m index 2109334da..c6fce7753 100644 --- a/Audio/Chain/ConverterNode.m +++ b/Audio/Chain/ConverterNode.m @@ -710,18 +710,22 @@ tryagain: ioNumberPackets -= ioNumberPackets % dmFloatFormat.mBytesPerPacket; - AudioChunk *chunk = [[AudioChunk alloc] init]; - [chunk setFormat:nodeFormat]; - if(nodeChannelConfig) { - [chunk setChannelConfig:nodeChannelConfig]; - } - [chunk assignSamples:floatBuffer frameCount:ioNumberPackets / dmFloatFormat.mBytesPerPacket]; + if(ioNumberPackets) { + AudioChunk *chunk = [[AudioChunk alloc] init]; + [chunk setFormat:nodeFormat]; + if(nodeChannelConfig) { + [chunk setChannelConfig:nodeChannelConfig]; + } + [chunk assignSamples:floatBuffer frameCount:ioNumberPackets / dmFloatFormat.mBytesPerPacket]; - floatOffset += ioNumberPackets; - amountRead += ioNumberPackets; + floatOffset += ioNumberPackets; + amountRead += ioNumberPackets; + convertEntered = NO; + return chunk; + } convertEntered = NO; - return chunk; + return nil; } - (void)observeValueForKeyPath:(NSString *)keyPath From 9f03b72b696dbdb2c2c2106b662bd84cff4a40cd Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 11 Jul 2022 14:38:52 -0700 Subject: [PATCH 09/12] [Headphone Filter] Minor changes Change a variable type, to avoid a warning. Signed-off-by: Christopher Snowhill --- Audio/Output/HeadphoneFilter.h | 10 +++++----- Audio/Output/HeadphoneFilter.mm | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Audio/Output/HeadphoneFilter.h b/Audio/Output/HeadphoneFilter.h index c6f500b0d..ee1699161 100644 --- a/Audio/Output/HeadphoneFilter.h +++ b/Audio/Output/HeadphoneFilter.h @@ -15,10 +15,10 @@ vDSP_DFT_Setup dftSetupF; vDSP_DFT_Setup dftSetupB; - size_t fftSize; - size_t fftSizeOver2; - size_t bufferSize; - size_t paddedBufferSize; + int fftSize; + int fftSizeOver2; + int bufferSize; + int paddedBufferSize; int channelCount; DSPSplitComplex signal_fft; @@ -38,7 +38,7 @@ - (id)initWithImpulseFile:(NSURL *)url forSampleRate:(double)sampleRate withInputChannels:(int)channels withConfig:(uint32_t)config; -- (void)process:(const float *)inBuffer sampleCount:(size_t)count toBuffer:(float *)outBuffer; +- (void)process:(const float *)inBuffer sampleCount:(int)count toBuffer:(float *)outBuffer; - (void)reset; diff --git a/Audio/Output/HeadphoneFilter.mm b/Audio/Output/HeadphoneFilter.mm index 17c79cc09..23efdafed 100644 --- a/Audio/Output/HeadphoneFilter.mm +++ b/Audio/Output/HeadphoneFilter.mm @@ -302,7 +302,7 @@ static impulseCache *_sharedController = nil; paddedBufferSize = fftSize; fftSizeOver2 = (fftSize + 1) / 2; - const size_t fftSizeOver2Plus1 = fftSizeOver2 + 1; // DFT float overwrites plus one, double doesn't + const int fftSizeOver2Plus1 = fftSizeOver2 + 1; // DFT float overwrites plus one, double doesn't dftSetupF = vDSP_DFT_zrop_CreateSetup(nil, fftSize, vDSP_DFT_FORWARD); dftSetupB = vDSP_DFT_zrop_CreateSetup(nil, fftSize, vDSP_DFT_INVERSE); From 18824e0e181436fb8f3a4615906f085fa5f4ee7f Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 11 Jul 2022 14:39:23 -0700 Subject: [PATCH 10/12] [Visualization Controller] Minor guard check Guard check in case visualization controller is called before any data is posted to it. Signed-off-by: Christopher Snowhill --- Audio/Visualization/VisualizationController.m | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Audio/Visualization/VisualizationController.m b/Audio/Visualization/VisualizationController.m index 30bcf6c4f..3cbe61b43 100644 --- a/Audio/Visualization/VisualizationController.m +++ b/Audio/Visualization/VisualizationController.m @@ -82,10 +82,16 @@ static VisualizationController *_sharedController = nil; - (void)copyVisPCM:(float *)outPCM visFFT:(float *)outFFT latencyOffset:(double)latency { if(!outPCM && !outFFT) return; - + + if(!visAudio || !visAudioSize) { + if(outPCM) bzero(outPCM, sizeof(float) * 4096); + if(outFFT) bzero(outFFT, sizeof(float) * 2048); + return; + } + float tempPCM[4096]; if(!outPCM) outPCM = &tempPCM[0]; - + @synchronized(self) { if(!sampleRate) { bzero(outPCM, 4096 * sizeof(float)); From 8244eb0bb8dad1c7e17d3278c21969b7f9b744d9 Mon Sep 17 00:00:00 2001 From: Christopher Snowhill Date: Mon, 11 Jul 2022 14:40:32 -0700 Subject: [PATCH 11/12] Activate Polish translation The declarations for the translation were missing from the project files so that it wasn't being used. Also added the missing strings to the files that were already added to the translation. Signed-off-by: Christopher Snowhill --- Cog.xcodeproj/project.pbxproj | 19 ++ .../File_Extractor.xcodeproj/project.pbxproj | 3 + .../File_Extractor/pl.lproj/InfoPlist.strings | 2 + Frameworks/GME/GME.xcodeproj/project.pbxproj | 3 + Frameworks/GME/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../HighlyAdvanced.xcodeproj/project.pbxproj | 3 + .../HighlyAdvanced/pl.lproj/InfoPlist.strings | 2 + .../project.pbxproj | 3 + .../pl.lproj/InfoPlist.strings | 2 + .../HighlyQuixotic.xcodeproj/project.pbxproj | 3 + .../HighlyQuixotic/pl.lproj/InfoPlist.strings | 2 + .../project.pbxproj | 3 + .../pl.lproj/InfoPlist.strings | 2 + .../HivelyPlayer.xcodeproj/project.pbxproj | 3 + .../HivelyPlayer/pl.lproj/InfoPlist.strings | 2 + .../MPCDec/MPCDec.xcodeproj/project.pbxproj | 3 + Frameworks/MPCDec/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../SSEQPlayer.xcodeproj/project.pbxproj | 3 + .../SSEQPlayer/pl.lproj/InfoPlist.strings | 2 + .../Shorten/Shorten.xcodeproj/project.pbxproj | 3 + Frameworks/Shorten/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../TagLib/TagLib.xcodeproj/project.pbxproj | 3 + Frameworks/TagLib/pl.lproj/InfoPlist.strings | 3 + .../WavPack/WavPack.xcodeproj/project.pbxproj | 3 + Frameworks/WavPack/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../midi_processing.xcodeproj/project.pbxproj | 3 + .../pl.lproj/InfoPlist.strings | 2 + .../psflib/psflib.xcodeproj/project.pbxproj | 3 + .../psflib/psflib/pl.lproj/InfoPlist.strings | 2 + .../libvgmstream.xcodeproj/project.pbxproj | 3 + .../vgmstream/pl.lproj/InfoPlist.strings | 2 + .../vio2sf/vio2sf.xcodeproj/project.pbxproj | 3 + .../vio2sf/vio2sf/pl.lproj/InfoPlist.strings | 2 + .../ArchiveSource.xcodeproj/project.pbxproj | 3 + .../ArchiveSource/pl.lproj/InfoPlist.strings | 2 + .../CueSheet.xcodeproj/project.pbxproj | 3 + Plugins/CueSheet/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Plugins/GME/GME.xcodeproj/project.pbxproj | 3 + Plugins/GME/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../HighlyComplete.xcodeproj/project.pbxproj | 3 + .../HighlyComplete/pl.lproj/InfoPlist.strings | 2 + .../Hively/Hively.xcodeproj/project.pbxproj | 3 + .../Hively/Hively/pl.lproj/InfoPlist.strings | 2 + Plugins/M3u/M3u.xcodeproj/project.pbxproj | 3 + Plugins/M3u/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes Plugins/MIDI/MIDI.xcodeproj/project.pbxproj | 3 + Plugins/MIDI/MIDI/pl.lproj/InfoPlist.strings | 2 + Plugins/Opus/Opus/pl.lproj/InfoPlist.strings | 2 + .../Opus/OpusPlugin.xcodeproj/project.pbxproj | 3 + Plugins/Pls/Pls.xcodeproj/project.pbxproj | 3 + Plugins/Pls/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../libvgmPlayer.xcodeproj/project.pbxproj | 3 + .../libvgmPlayer/pl.lproj/InfoPlist.strings | Bin 0 -> 204 bytes .../vgmstream.xcodeproj/project.pbxproj | 3 + .../vgmstream/pl.lproj/InfoPlist.strings | 2 + .../Preferences.xcodeproj/project.pbxproj | 9 + .../Preferences/pl.lproj/InfoPlist.strings | 3 + .../Preferences/pl.lproj/Localizable.strings | 25 ++ .../pl.lproj/PathSuggester.strings | 30 +++ .../Preferences/pl.lproj/Preferences.strings | 231 ++++++++++++++++++ pl.lproj/InfoInspector.strings | 47 +++- pl.lproj/MainMenu.strings | 162 ++++++++++++ 62 files changed, 637 insertions(+), 7 deletions(-) create mode 100644 Frameworks/File_Extractor/File_Extractor/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/GME/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/HighlyAdvanced/HighlyAdvanced/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/HighlyExperimental/HighlyExperimental/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/HighlyQuixotic/HighlyQuixotic/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/HighlyTheoretical/HighlyTheoretical/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/HivelyPlayer/HivelyPlayer/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/MPCDec/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/SSEQPlayer/SSEQPlayer/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/Shorten/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/TagLib/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/WavPack/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/midi_processing/midi_processing/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/psflib/psflib/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/vgmstream/vgmstream/pl.lproj/InfoPlist.strings create mode 100644 Frameworks/vio2sf/vio2sf/pl.lproj/InfoPlist.strings create mode 100644 Plugins/ArchiveSource/ArchiveSource/pl.lproj/InfoPlist.strings create mode 100644 Plugins/CueSheet/pl.lproj/InfoPlist.strings create mode 100644 Plugins/GME/pl.lproj/InfoPlist.strings create mode 100644 Plugins/HighlyComplete/HighlyComplete/pl.lproj/InfoPlist.strings create mode 100644 Plugins/Hively/Hively/pl.lproj/InfoPlist.strings create mode 100644 Plugins/M3u/pl.lproj/InfoPlist.strings create mode 100644 Plugins/MIDI/MIDI/pl.lproj/InfoPlist.strings create mode 100644 Plugins/Opus/Opus/pl.lproj/InfoPlist.strings create mode 100644 Plugins/Pls/pl.lproj/InfoPlist.strings create mode 100644 Plugins/libvgmPlayer/pl.lproj/InfoPlist.strings create mode 100644 Plugins/vgmstream/vgmstream/pl.lproj/InfoPlist.strings create mode 100644 Preferences/Preferences/pl.lproj/InfoPlist.strings create mode 100644 Preferences/Preferences/pl.lproj/Localizable.strings create mode 100644 Preferences/Preferences/pl.lproj/PathSuggester.strings create mode 100644 Preferences/Preferences/pl.lproj/Preferences.strings diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index e277e4250..5f258c85b 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -1064,6 +1064,15 @@ 83E5E54B18087CA5001F3284 /* miniModeOnTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = miniModeOnTemplate.pdf; path = Images/miniModeOnTemplate.pdf; sourceTree = ""; }; 83E5EFAC1FFEF78100659F0F /* OpenMPT.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = OpenMPT.xcodeproj; path = Plugins/OpenMPT/OpenMPT.xcodeproj; sourceTree = ""; }; 83ED3AC7279A91C000904199 /* hdcdLogoTemplate.pdf */ = {isa = PBXFileReference; lastKnownFileType = image.pdf; name = hdcdLogoTemplate.pdf; path = Images/hdcdLogoTemplate.pdf; sourceTree = ""; }; + 83F0E6A3287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/AboutWindowController.strings; sourceTree = ""; }; + 83F0E6A4287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Equalizer.strings; sourceTree = ""; }; + 83F0E6A5287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoInspector.strings; sourceTree = ""; }; + 83F0E6A6287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/MainMenu.strings; sourceTree = ""; }; + 83F0E6A7287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/OpenURLPanel.strings; sourceTree = ""; }; + 83F0E6A8287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/FileTree.strings; sourceTree = ""; }; + 83F0E6A9287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/SpectrumWindow.strings; sourceTree = ""; }; + 83F0E6AA287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/SpotlightPanel.strings; sourceTree = ""; }; + 83F0E6AB287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Feedback.strings; sourceTree = ""; }; 83F9D7F11A884B44007ABEC2 /* SilenceDecoder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SilenceDecoder.xcodeproj; path = Plugins/SilenceDecoder/SilenceDecoder.xcodeproj; sourceTree = ""; }; 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8E07AB760AAC930B00A4B32F /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PreferencesController.h; path = Preferences/PreferencesController.h; sourceTree = ""; }; @@ -2082,6 +2091,7 @@ fr, he, ja, + pl, ); mainGroup = 29B97314FDCFA39411CA2CEA /* Cog */; packageReferences = ( @@ -2853,6 +2863,7 @@ 83BC5AB720E4C91400631CD4 /* Base */, 83BC5AD220E4D0B400631CD4 /* es */, 83BC5AD420E4D0B600631CD4 /* en */, + 83F0E6A8287CAB3800D84594 /* pl */, ); name = FileTree.xib; sourceTree = ""; @@ -2863,6 +2874,7 @@ 83BC5AB520E4C91200631CD4 /* Base */, 83BC5AC620E4D04600631CD4 /* en */, 83BC5AC820E4D05A00631CD4 /* es */, + 83F0E6A6287CAB3800D84594 /* pl */, ); name = MainMenu.xib; sourceTree = ""; @@ -2873,6 +2885,7 @@ 83BC5AB620E4C91300631CD4 /* Base */, 83BC5ACE20E4D09700631CD4 /* es */, 83BC5AD020E4D09800631CD4 /* en */, + 83F0E6A7287CAB3800D84594 /* pl */, ); name = OpenURLPanel.xib; sourceTree = ""; @@ -2883,6 +2896,7 @@ 83BC5AB820E4C91400631CD4 /* Base */, 83BC5AD620E4D0D800631CD4 /* es */, 83BC5AD820E4D0D900631CD4 /* en */, + 83F0E6AA287CAB3800D84594 /* pl */, ); name = SpotlightPanel.xib; sourceTree = ""; @@ -2893,6 +2907,7 @@ 83BC5AB420E4C91100631CD4 /* Base */, 83BC5ACA20E4D07200631CD4 /* es */, 83BC5ACC20E4D07700631CD4 /* en */, + 83F0E6A5287CAB3800D84594 /* pl */, ); name = InfoInspector.xib; sourceTree = ""; @@ -2903,6 +2918,7 @@ 83BC5AB920E4C91500631CD4 /* Base */, 83BC5ADA20E4D0E900631CD4 /* en */, 83BC5ADC20E4D0EC00631CD4 /* es */, + 83F0E6AB287CAB3800D84594 /* pl */, ); name = Feedback.xib; sourceTree = ""; @@ -2922,6 +2938,7 @@ 830C37A027B95E3000E02BB0 /* Base */, 839614A8286EDA0400D3EEDB /* en */, 839614AA286EDA0600D3EEDB /* es */, + 83F0E6A4287CAB3800D84594 /* pl */, ); name = Equalizer.xib; sourceTree = ""; @@ -2932,6 +2949,7 @@ 839614A1286ED97200D3EEDB /* Base */, 839614A4286ED98600D3EEDB /* en */, 839614A6286ED98800D3EEDB /* es */, + 83F0E6A3287CAB3800D84594 /* pl */, ); name = AboutWindowController.xib; sourceTree = ""; @@ -2942,6 +2960,7 @@ 839614AC286EDA5C00D3EEDB /* Base */, 839614AF286EDA6800D3EEDB /* en */, 839614B1286EDA6E00D3EEDB /* es */, + 83F0E6A9287CAB3800D84594 /* pl */, ); name = SpectrumWindow.xib; sourceTree = ""; diff --git a/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj b/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj index df6049089..c196ea799 100644 --- a/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj +++ b/Frameworks/File_Extractor/File_Extractor.xcodeproj/project.pbxproj @@ -283,6 +283,7 @@ 83C210AC19CD92960093C461 /* pathfn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = pathfn.cpp; sourceTree = ""; }; 83C210AE19CD97DB0093C461 /* timefn.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = timefn.cpp; sourceTree = ""; }; 83C210AF19CD97DB0093C461 /* timefn.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = timefn.hpp; sourceTree = ""; }; + 83F0E6B3287CAB4100D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -646,6 +647,7 @@ en, es, Base, + pl, ); mainGroup = 8359FF3217FEF39F0060F3ED; productRefGroup = 8359FF3D17FEF39F0060F3ED /* Products */; @@ -746,6 +748,7 @@ children = ( 8359FF4917FEF39F0060F3ED /* en */, 833F68401CDBCAB300AFB9F0 /* es */, + 83F0E6B3287CAB4100D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/File_Extractor/File_Extractor/pl.lproj/InfoPlist.strings b/Frameworks/File_Extractor/File_Extractor/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/File_Extractor/File_Extractor/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/GME/GME.xcodeproj/project.pbxproj b/Frameworks/GME/GME.xcodeproj/project.pbxproj index c0b0b881e..f2dce9bb1 100644 --- a/Frameworks/GME/GME.xcodeproj/project.pbxproj +++ b/Frameworks/GME/GME.xcodeproj/project.pbxproj @@ -236,6 +236,7 @@ 8370B70C17F615FE001A4D7A /* Spc_Sfm.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Spc_Sfm.cpp; path = gme/Spc_Sfm.cpp; sourceTree = ""; }; 8370B70D17F615FE001A4D7A /* Spc_Sfm.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Spc_Sfm.h; path = gme/Spc_Sfm.h; sourceTree = ""; }; 83747B7F2862D4DB0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; + 83F0E6B7287CAB4100D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 83FC5D3B181B47FB00B917E5 /* dsp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = dsp.cpp; sourceTree = ""; }; 83FC5D3C181B47FB00B917E5 /* dsp.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = dsp.hpp; sourceTree = ""; }; 83FC5D57181B47FB00B917E5 /* smp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = smp.cpp; sourceTree = ""; }; @@ -641,6 +642,7 @@ en, es, Base, + pl, ); mainGroup = 0867D691FE84028FC02AAC07 /* GME */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -727,6 +729,7 @@ children = ( 833F68361CDBCAB200AFB9F0 /* es */, 835C889022CC1884001B4B3F /* en */, + 83F0E6B7287CAB4100D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/GME/pl.lproj/InfoPlist.strings b/Frameworks/GME/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..948e12b991d433e9dc3ebc46350cb859c5bc1e07 GIT binary patch literal 204 zcmW-a%?`m}5Jk`0Q#6*1sMuJDl?@3NJb)A}LVwaCsWMd*s%ZBv=Kme5Fyy^_xDn;J8+CjLwb{$gz->i_@% literal 0 HcmV?d00001 diff --git a/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj b/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj index aa98d5c08..c82e4224e 100644 --- a/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj +++ b/Frameworks/SSEQPlayer/SSEQPlayer.xcodeproj/project.pbxproj @@ -84,6 +84,7 @@ 8384901D1807649A00E7332D /* SYMBSection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SYMBSection.h; sourceTree = ""; }; 8384901E1807649A00E7332D /* Track.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Track.cpp; sourceTree = ""; }; 8384901F1807649A00E7332D /* Track.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Track.h; sourceTree = ""; }; + 83F0E6BE287CAB4200D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -265,6 +266,7 @@ en, es, Base, + pl, ); mainGroup = 83848FAE1807623F00E7332D; productRefGroup = 83848FB91807623F00E7332D /* Products */; @@ -316,6 +318,7 @@ children = ( 83848FC51807623F00E7332D /* en */, 833F68301CDBCAB100AFB9F0 /* es */, + 83F0E6BE287CAB4200D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/SSEQPlayer/SSEQPlayer/pl.lproj/InfoPlist.strings b/Frameworks/SSEQPlayer/SSEQPlayer/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/SSEQPlayer/SSEQPlayer/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj b/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj index ffbcbaff9..303020297 100644 --- a/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj +++ b/Frameworks/Shorten/Shorten.xcodeproj/project.pbxproj @@ -38,6 +38,7 @@ 833F683E1CDBCAB300AFB9F0 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = ""; }; 835C889522CC1888001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747BCA2862D5970021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; + 83F0E6C9287CAB4300D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.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 */ @@ -200,6 +201,7 @@ en, es, Base, + pl, ); mainGroup = 0867D691FE84028FC02AAC07 /* Shorten */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -245,6 +247,7 @@ children = ( 833F683E1CDBCAB300AFB9F0 /* es */, 835C889522CC1888001B4B3F /* en */, + 83F0E6C9287CAB4300D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/Shorten/pl.lproj/InfoPlist.strings b/Frameworks/Shorten/pl.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.xcodeproj/project.pbxproj b/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj index 3f2a52513..2d1f1b4d8 100644 --- a/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj +++ b/Frameworks/TagLib/TagLib.xcodeproj/project.pbxproj @@ -276,6 +276,7 @@ 83747BD22862D5B00021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 83B46FC92707EED200847FC9 /* libiconv.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libiconv.tbd; path = usr/lib/libiconv.tbd; sourceTree = SDKROOT; }; 83B46FCB2707EEDB00847FC9 /* libz.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = libz.tbd; path = usr/lib/libz.tbd; sourceTree = SDKROOT; }; + 83F0E6CA287CAB4300D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* TagLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = TagLib.framework; sourceTree = BUILT_PRODUCTS_DIR; }; EDE862FC25CF6BD60086EFD3 /* tpropertymap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tpropertymap.cpp; sourceTree = ""; }; @@ -996,6 +997,7 @@ en, es, Base, + pl, ); mainGroup = 0867D691FE84028FC02AAC07 /* TagLib */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -1114,6 +1116,7 @@ children = ( 833F683D1CDBCAB300AFB9F0 /* es */, 835C889822CC1889001B4B3F /* en */, + 83F0E6CA287CAB4300D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/TagLib/pl.lproj/InfoPlist.strings b/Frameworks/TagLib/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..cde2c3450 --- /dev/null +++ b/Frameworks/TagLib/pl.lproj/InfoPlist.strings @@ -0,0 +1,3 @@ +/* Localized versions of Info.plist keys */ + +NSHumanReadableCopyright = "© __MyCompanyName__, 2006"; diff --git a/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj b/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj index 4fecb2051..e58a6e4dc 100644 --- a/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj +++ b/Frameworks/WavPack/WavPack.xcodeproj/project.pbxproj @@ -73,6 +73,7 @@ 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 = ""; }; 83DD1DD317FA03F900249519 /* tags.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = tags.c; path = Files/tags.c; sourceTree = ""; }; + 83F0E6CD287CAB4400D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8DC2EF5B0486A6940098B216 /* WavPack.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = WavPack.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8E7574AF09F31BB90080F1EE /* md5.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = md5.h; path = Files/md5.h; sourceTree = ""; }; @@ -272,6 +273,7 @@ en, es, Base, + pl, ); mainGroup = 0867D691FE84028FC02AAC07 /* WavPack */; productRefGroup = 034768DFFF38A50411DB9C8B /* Products */; @@ -337,6 +339,7 @@ children = ( 833F683A1CDBCAB200AFB9F0 /* es */, 835C889B22CC188A001B4B3F /* en */, + 83F0E6CD287CAB4400D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/WavPack/pl.lproj/InfoPlist.strings b/Frameworks/WavPack/pl.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/midi_processing/midi_processing.xcodeproj/project.pbxproj b/Frameworks/midi_processing/midi_processing.xcodeproj/project.pbxproj index 1d3574714..a52442419 100644 --- a/Frameworks/midi_processing/midi_processing.xcodeproj/project.pbxproj +++ b/Frameworks/midi_processing/midi_processing.xcodeproj/project.pbxproj @@ -44,6 +44,7 @@ 83B066EE180D5724008E3612 /* midi_processor_syx.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = midi_processor_syx.cpp; sourceTree = ""; }; 83B066EF180D5724008E3612 /* midi_processor_xmi.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = midi_processor_xmi.cpp; sourceTree = ""; }; 83B066F0180D5724008E3612 /* midi_processor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = midi_processor.h; sourceTree = ""; }; + 83F0E6C5287CAB4300D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -186,6 +187,7 @@ en, es, Base, + pl, ); mainGroup = 83B066A2180D56B9008E3612; productRefGroup = 83B066AD180D56B9008E3612 /* Products */; @@ -236,6 +238,7 @@ children = ( 83B066B9180D56B9008E3612 /* en */, 833F68441CDBCABF00AFB9F0 /* es */, + 83F0E6C5287CAB4300D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/midi_processing/midi_processing/pl.lproj/InfoPlist.strings b/Frameworks/midi_processing/midi_processing/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/midi_processing/midi_processing/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/psflib/psflib.xcodeproj/project.pbxproj b/Frameworks/psflib/psflib.xcodeproj/project.pbxproj index 536f010fa..cbae75eee 100644 --- a/Frameworks/psflib/psflib.xcodeproj/project.pbxproj +++ b/Frameworks/psflib/psflib.xcodeproj/project.pbxproj @@ -26,6 +26,7 @@ 8343785717F93D8200584396 /* psflib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = psflib.c; sourceTree = ""; }; 8343785817F93D8200584396 /* psflib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = psflib.h; sourceTree = ""; }; 83747B9D2862D52E0021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; + 83F0E6BA287CAB4200D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -160,6 +161,7 @@ en, es, Base, + pl, ); mainGroup = 8343781217F93CB500584396; productRefGroup = 8343781D17F93CB500584396 /* Products */; @@ -200,6 +202,7 @@ children = ( 8343782917F93CB500584396 /* en */, 833F682C1CDBCAB000AFB9F0 /* es */, + 83F0E6BA287CAB4200D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/psflib/psflib/pl.lproj/InfoPlist.strings b/Frameworks/psflib/psflib/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/psflib/psflib/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj b/Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj index 88751f7a4..029bf332b 100644 --- a/Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj +++ b/Frameworks/vgmstream/libvgmstream.xcodeproj/project.pbxproj @@ -1536,6 +1536,7 @@ 83F0AA5C21E2028B004BBC04 /* smp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = smp.c; sourceTree = ""; }; 83F0AA5D21E2028B004BBC04 /* vsv_streamfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vsv_streamfile.h; sourceTree = ""; }; 83F0AA5E21E2028C004BBC04 /* vsv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vsv.c; sourceTree = ""; }; + 83F0E6CC287CAB4400D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 83F1EE28245D4FB10076E182 /* imuse_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = imuse_decoder.c; sourceTree = ""; }; 83F1EE2C245D4FB20076E182 /* vadpcm_decoder.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = vadpcm_decoder.c; sourceTree = ""; }; 83F1EE2F245D4FC10076E182 /* imuse.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = imuse.c; sourceTree = ""; }; @@ -2661,6 +2662,7 @@ en, es, Base, + pl, ); mainGroup = 836F6B2F18BDB8880095E648; productRefGroup = 836F6B3A18BDB8880095E648 /* Products */; @@ -3328,6 +3330,7 @@ isa = PBXVariantGroup; children = ( 836F6B4618BDB8880095E648 /* en */, + 83F0E6CC287CAB4400D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/vgmstream/vgmstream/pl.lproj/InfoPlist.strings b/Frameworks/vgmstream/vgmstream/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/vgmstream/vgmstream/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj b/Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj index a1a997e63..c1dc1b708 100644 --- a/Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj +++ b/Frameworks/vio2sf/vio2sf.xcodeproj/project.pbxproj @@ -99,6 +99,7 @@ 83DE0C6C180A9CA400269051 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; 83DE0CB7180A9FD000269051 /* state.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = state.c; sourceTree = ""; }; 83DE0CB9180A9FE300269051 /* state.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = state.h; sourceTree = ""; }; + 83F0E6BF287CAB4200D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -309,6 +310,7 @@ en, es, Base, + pl, ); mainGroup = 83DE0BFC180A9BD400269051; productRefGroup = 83DE0C07180A9BD400269051 /* Products */; @@ -363,6 +365,7 @@ children = ( 83DE0C13180A9BD400269051 /* en */, 833F68311CDBCAB100AFB9F0 /* es */, + 83F0E6BF287CAB4200D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Frameworks/vio2sf/vio2sf/pl.lproj/InfoPlist.strings b/Frameworks/vio2sf/vio2sf/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Frameworks/vio2sf/vio2sf/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj b/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj index 3fb853ae2..9c1f52097 100644 --- a/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj +++ b/Plugins/ArchiveSource/ArchiveSource.xcodeproj/project.pbxproj @@ -50,6 +50,7 @@ 8359FF6A17FEF39F0060F3ED /* File_Extractor.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = File_Extractor.xcodeproj; path = ../../Frameworks/File_Extractor/File_Extractor.xcodeproj; sourceTree = ""; }; 83747C632862DDA00021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8384913518081BA000E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../../Utils/Logging.h; sourceTree = ""; }; + 83F0E6B4287CAB4100D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -191,6 +192,7 @@ en, es, Base, + pl, ); mainGroup = 8359FF0E17FEF35C0060F3ED; productRefGroup = 8359FF1817FEF35C0060F3ED /* Products */; @@ -254,6 +256,7 @@ isa = PBXVariantGroup; children = ( 8359FF2417FEF35C0060F3ED /* en */, + 83F0E6B4287CAB4100D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Plugins/ArchiveSource/ArchiveSource/pl.lproj/InfoPlist.strings b/Plugins/ArchiveSource/ArchiveSource/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Plugins/ArchiveSource/ArchiveSource/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj b/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj index 502a71937..93248eb48 100644 --- a/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj +++ b/Plugins/CueSheet/CueSheet.xcodeproj/project.pbxproj @@ -30,6 +30,7 @@ 8384912A180814D900E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; 839DA7D0274A2EA9001B18E5 /* AudioMetadataReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AudioMetadataReader.h; path = ../../Audio/AudioMetadataReader.h; sourceTree = ""; }; 839DA7D3274A2FD4001B18E5 /* NSDictionary+Merge.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "NSDictionary+Merge.h"; path = "../../Utils/NSDictionary+Merge.h"; sourceTree = ""; }; + 83F0E6B5287CAB4100D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* CueSheet.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = CueSheet.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8E8D42240CBB0F5800135C1B /* CueSheetContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CueSheetContainer.h; sourceTree = ""; }; @@ -195,6 +196,7 @@ en, es, Base, + pl, ); mainGroup = 089C166AFE841209C02AAC07 /* CueSheet */; projectDirPath = ""; @@ -237,6 +239,7 @@ children = ( 833F68371CDBCAB200AFB9F0 /* es */, 835C888E22CC1883001B4B3F /* en */, + 83F0E6B5287CAB4100D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Plugins/CueSheet/pl.lproj/InfoPlist.strings b/Plugins/CueSheet/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..99142f9ac324654402807f6015e1c4594ec8981e GIT binary patch literal 204 zcmW-ZOAf&R6h+Utt7r@xK}-z9$bMd*s%ZBv=Kme5Fyy^_xDn;J8+CjLwb{$g|^>;M1& literal 0 HcmV?d00001 diff --git a/Plugins/GME/GME.xcodeproj/project.pbxproj b/Plugins/GME/GME.xcodeproj/project.pbxproj index 4aa981e84..ab8d184c8 100644 --- a/Plugins/GME/GME.xcodeproj/project.pbxproj +++ b/Plugins/GME/GME.xcodeproj/project.pbxproj @@ -67,6 +67,7 @@ 835C888F22CC1883001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747C452862DCD90021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8384912E1808175400E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; + 83F0E6B6287CAB4100D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 83FAF8A518ADD4D100057CAF /* PlaylistController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistController.h; path = ../../Playlist/PlaylistController.h; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* GME.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = GME.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -233,6 +234,7 @@ en, es, Base, + pl, ); mainGroup = 089C166AFE841209C02AAC07 /* GME */; projectDirPath = ""; @@ -298,6 +300,7 @@ children = ( 833F68351CDBCAB200AFB9F0 /* es */, 835C888F22CC1883001B4B3F /* en */, + 83F0E6B6287CAB4100D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Plugins/GME/pl.lproj/InfoPlist.strings b/Plugins/GME/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..948e12b991d433e9dc3ebc46350cb859c5bc1e07 GIT binary patch literal 204 zcmW-a%?`m}5Jk`0Q#6*1sMuJDl?@3NJb)A}LVwaCsWMd*s%ZBv=Kme5Fyy^_xDn;J8+CjLwb{$g|^>;M1& literal 0 HcmV?d00001 diff --git a/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj b/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj index 1fd5879e0..90141ffda 100644 --- a/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj +++ b/Plugins/MIDI/MIDI.xcodeproj/project.pbxproj @@ -155,6 +155,7 @@ 83C35704180EDD1C007E9DF0 /* MIDIMetadataReader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MIDIMetadataReader.h; sourceTree = ""; }; 83E973451C4378880007F413 /* AUPlayer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AUPlayer.mm; sourceTree = ""; }; 83E973461C4378880007F413 /* AUPlayer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUPlayer.h; sourceTree = ""; }; + 83F0E6C4287CAB4300D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 83FAF8A618ADD60100057CAF /* PlaylistController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistController.h; path = ../../../Playlist/PlaylistController.h; sourceTree = ""; }; /* End PBXFileReference section */ @@ -405,6 +406,7 @@ en, es, Base, + pl, ); mainGroup = 83B0667E180D5668008E3612; productRefGroup = 83B06688180D5668008E3612 /* Products */; @@ -484,6 +486,7 @@ children = ( 83B06694180D5668008E3612 /* en */, 833F68431CDBCABE00AFB9F0 /* es */, + 83F0E6C4287CAB4300D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Plugins/MIDI/MIDI/pl.lproj/InfoPlist.strings b/Plugins/MIDI/MIDI/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Plugins/MIDI/MIDI/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Plugins/Opus/Opus/pl.lproj/InfoPlist.strings b/Plugins/Opus/Opus/pl.lproj/InfoPlist.strings new file mode 100644 index 000000000..477b28ff8 --- /dev/null +++ b/Plugins/Opus/Opus/pl.lproj/InfoPlist.strings @@ -0,0 +1,2 @@ +/* Localized versions of Info.plist keys */ + diff --git a/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj b/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj index bbaf6262e..ade5acd5f 100644 --- a/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj +++ b/Plugins/Opus/OpusPlugin.xcodeproj/project.pbxproj @@ -48,6 +48,7 @@ 8375B36B17FFF1CB0092A79F /* OpusDecoder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OpusDecoder.m; sourceTree = ""; }; 8375B36D17FFF1FE0092A79F /* Plugin.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Plugin.h; path = ../../../Audio/Plugin.h; sourceTree = ""; }; 8384913718081F2700E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../../Utils/Logging.h; sourceTree = ""; }; + 83F0E6C7287CAB4300D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -182,6 +183,7 @@ en, es, Base, + pl, ); mainGroup = 8375B03317FFEA400092A79F; productRefGroup = 8375B03D17FFEA400092A79F /* Products */; @@ -222,6 +224,7 @@ children = ( 8375B04917FFEA400092A79F /* en */, 833F68411CDBCABC00AFB9F0 /* es */, + 83F0E6C7287CAB4300D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Plugins/Pls/Pls.xcodeproj/project.pbxproj b/Plugins/Pls/Pls.xcodeproj/project.pbxproj index d2a06dea0..d1cf82b14 100644 --- a/Plugins/Pls/Pls.xcodeproj/project.pbxproj +++ b/Plugins/Pls/Pls.xcodeproj/project.pbxproj @@ -22,6 +22,7 @@ 835C889422CC1887001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747C092862DAA90021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 838491321808193F00E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; + 83F0E6C8287CAB4300D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* Pls.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = Pls.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 8E8D419F0CBB0CA700135C1B /* PlsContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlsContainer.h; sourceTree = ""; }; @@ -171,6 +172,7 @@ en, es, Base, + pl, ); mainGroup = 089C166AFE841209C02AAC07 /* Pls */; projectDirPath = ""; @@ -209,6 +211,7 @@ children = ( 833F68381CDBCAB200AFB9F0 /* es */, 835C889422CC1887001B4B3F /* en */, + 83F0E6C8287CAB4300D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Plugins/Pls/pl.lproj/InfoPlist.strings b/Plugins/Pls/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..99142f9ac324654402807f6015e1c4594ec8981e GIT binary patch literal 204 zcmW-ZOAf&R6h+Utt7r@xK}-z9$bMd*s%ZBv=Kme5Fyy^_xDn;J8+CjLwb{$g|^>;M1& literal 0 HcmV?d00001 diff --git a/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj b/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj index 71abb71c4..af6e605f4 100644 --- a/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj +++ b/Plugins/libvgmPlayer/libvgmPlayer.xcodeproj/project.pbxproj @@ -44,6 +44,7 @@ 835C888F22CC1883001B4B3F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 83747C312862DBE80021245F /* Shared.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Shared.xcconfig; sourceTree = ""; }; 8384912E1808175400E7332D /* Logging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Logging.h; path = ../../Utils/Logging.h; sourceTree = ""; }; + 83F0E6C2287CAB4300D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; 83FAF8A518ADD4D100057CAF /* PlaylistController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaylistController.h; path = ../../Playlist/PlaylistController.h; sourceTree = ""; }; 8D5B49B6048680CD000E48DA /* libvgmPlayer.bundle */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = libvgmPlayer.bundle; sourceTree = BUILT_PRODUCTS_DIR; }; 8D5B49B7048680CD000E48DA /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -224,6 +225,7 @@ en, es, Base, + pl, ); mainGroup = 089C166AFE841209C02AAC07 /* libvgmPlayer */; projectDirPath = ""; @@ -265,6 +267,7 @@ children = ( 833F68351CDBCAB200AFB9F0 /* es */, 835C888F22CC1883001B4B3F /* en */, + 83F0E6C2287CAB4300D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; diff --git a/Plugins/libvgmPlayer/pl.lproj/InfoPlist.strings b/Plugins/libvgmPlayer/pl.lproj/InfoPlist.strings new file mode 100644 index 0000000000000000000000000000000000000000..948e12b991d433e9dc3ebc46350cb859c5bc1e07 GIT binary patch literal 204 zcmW-a%?`m}5Jk`0Q#6*1sMuJDl?@3NJb)A}LVwaCsW Date: Mon, 11 Jul 2022 15:03:19 -0700 Subject: [PATCH 12/12] Fix missing Polish declarations in project There were still missing things. Signed-off-by: Christopher Snowhill --- Cog.xcodeproj/project.pbxproj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Cog.xcodeproj/project.pbxproj b/Cog.xcodeproj/project.pbxproj index 5f258c85b..790c4c940 100644 --- a/Cog.xcodeproj/project.pbxproj +++ b/Cog.xcodeproj/project.pbxproj @@ -1073,6 +1073,9 @@ 83F0E6A9287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/SpectrumWindow.strings; sourceTree = ""; }; 83F0E6AA287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/SpotlightPanel.strings; sourceTree = ""; }; 83F0E6AB287CAB3800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Feedback.strings; sourceTree = ""; }; + 83F0E8AD287CD48800D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = ""; }; + 83F0E8B1287CD50700D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/Localizable.strings; sourceTree = ""; }; + 83F0E8B2287CD52500D84594 /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.html; name = pl; path = pl.lproj/Credits.html; sourceTree = ""; }; 83F9D7F11A884B44007ABEC2 /* SilenceDecoder.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SilenceDecoder.xcodeproj; path = Plugins/SilenceDecoder/SilenceDecoder.xcodeproj; sourceTree = ""; }; 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = ""; }; 8E07AB760AAC930B00A4B32F /* PreferencesController.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = PreferencesController.h; path = Preferences/PreferencesController.h; sourceTree = ""; }; @@ -2844,6 +2847,7 @@ children = ( 833F681E1CDBCAA700AFB9F0 /* es */, 835C888C22CC1882001B4B3F /* en */, + 83F0E8AD287CD48800D84594 /* pl */, ); name = InfoPlist.strings; sourceTree = ""; @@ -2928,6 +2932,7 @@ children = ( 833F68251CDBCAA800AFB9F0 /* es */, 835C888B22CC1881001B4B3F /* en */, + 83F0E8B2287CD52500D84594 /* pl */, ); name = Credits.html; sourceTree = ""; @@ -2970,6 +2975,7 @@ children = ( 833F681F1CDBCAA800AFB9F0 /* es */, 835C888D22CC1882001B4B3F /* en */, + 83F0E8B1287CD50700D84594 /* pl */, ); name = Localizable.strings; sourceTree = "";