From: liangzhenying <867174124@qq.com> Date: Thu, 2 Jan 2025 03:38:48 +0000 (+0800) Subject: 解决other link -ObjC编译提示重复引用问题 X-Git-Tag: deepseek~1 X-Git-Url: http://git.snicker.com.cn/sitemap.xml?a=commitdiff_plain;h=e002376a77839d63c4aee085af4f3827fa230309;p=mirrors%2FMixSdk-iOS.git 解决other link -ObjC编译提示重复引用问题 --- diff --git a/MixSdk/Example/Example.xcodeproj/project.pbxproj b/MixSdk/Example/Example.xcodeproj/project.pbxproj index 21439bd..5cd4265 100644 --- a/MixSdk/Example/Example.xcodeproj/project.pbxproj +++ b/MixSdk/Example/Example.xcodeproj/project.pbxproj @@ -46,6 +46,7 @@ 18EC39D12C4F421C00964461 /* Config.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18EC39D02C4F421C00964461 /* Config.swift */; }; 18FBC2BB2C38E0FC002240AF /* ChatGptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18FBC2BA2C38E0FC002240AF /* ChatGptViewController.swift */; }; 18FF930C2C39263A0006452C /* cat.png in Resources */ = {isa = PBXBuildFile; fileRef = 18FF930A2C39263A0006452C /* cat.png */; }; + 3F3BD3BE2D26326E001D4F6E /* MixTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F3BD3BD2D26326E001D4F6E /* MixTools.framework */; }; F59940004E1C16053FBD42F5 /* Pods_Example.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B555BC40ACD8F31DBCDD1A2 /* Pods_Example.framework */; }; /* End PBXBuildFile section */ @@ -104,6 +105,7 @@ 18EC39D02C4F421C00964461 /* Config.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Config.swift; sourceTree = ""; }; 18FBC2BA2C38E0FC002240AF /* ChatGptViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ChatGptViewController.swift; sourceTree = ""; }; 18FF930A2C39263A0006452C /* cat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cat.png; sourceTree = ""; }; + 3F3BD3BD2D26326E001D4F6E /* MixTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MixTools.framework; sourceTree = ""; }; 4B555BC40ACD8F31DBCDD1A2 /* Pods_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 759E170040ACED4895C8A49D /* Pods-Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.release.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.release.xcconfig"; sourceTree = ""; }; C85BC820E1AA39AC970C9E79 /* Pods-Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Example.debug.xcconfig"; path = "Target Support Files/Pods-Example/Pods-Example.debug.xcconfig"; sourceTree = ""; }; @@ -116,6 +118,7 @@ files = ( 185D665D2C6C4EE0009AE49F /* SCompressLib.framework in Frameworks */, 18C42C862C242B0B000D8860 /* libbz2.tbd in Frameworks */, + 3F3BD3BE2D26326E001D4F6E /* MixTools.framework in Frameworks */, 18C42C842C242B01000D8860 /* libiconv.tbd in Frameworks */, 18C42C822C242AD3000D8860 /* CoreAudio.framework in Frameworks */, 18C42C802C242AAC000D8860 /* liblzma.5.tbd in Frameworks */, @@ -163,6 +166,7 @@ 18204BD22C193F9A00F94E69 /* Example */ = { isa = PBXGroup; children = ( + 3F3BD3BD2D26326E001D4F6E /* MixTools.framework */, 185D665C2C6C4EE0009AE49F /* SCompressLib.framework */, 186E75102C3E33EB0040671B /* Tools */, 18DB20412C213D600070D571 /* Record */, @@ -565,6 +569,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", + "$(PROJECT_DIR)/Example", ); GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Example/Info.plist; @@ -581,6 +586,24 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-l\"swiftCoreGraphics\"", + "-framework", + "\"CoreGraphics\"", + "-framework", + "\"Foundation\"", + "-framework", + "\"IQKeyboardManagerSwift\"", + "-framework", + "\"QuartzCore\"", + "-framework", + "\"SnapKit\"", + "-framework", + "\"Toast_Swift\"", + "-framework", + "\"UIKit\"", + ); PRODUCT_BUNDLE_IDENTIFIER = ZhiHui.Example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; @@ -606,6 +629,7 @@ FRAMEWORK_SEARCH_PATHS = ( "$(inherited)", "$(PROJECT_DIR)", + "$(PROJECT_DIR)/Example", ); GENERATE_INFOPLIST_FILE = YES; INFOPLIST_FILE = Example/Info.plist; @@ -622,6 +646,24 @@ "@executable_path/Frameworks", ); MARKETING_VERSION = 1.0; + OTHER_LDFLAGS = ( + "$(inherited)", + "-l\"swiftCoreGraphics\"", + "-framework", + "\"CoreGraphics\"", + "-framework", + "\"Foundation\"", + "-framework", + "\"IQKeyboardManagerSwift\"", + "-framework", + "\"QuartzCore\"", + "-framework", + "\"SnapKit\"", + "-framework", + "\"Toast_Swift\"", + "-framework", + "\"UIKit\"", + ); PRODUCT_BUNDLE_IDENTIFIER = ZhiHui.Example; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_EMIT_LOC_STRINGS = YES; diff --git a/MixSdk/Example/Example/Config.swift b/MixSdk/Example/Example/Config.swift index 2b3987f..a8650cc 100644 --- a/MixSdk/Example/Example/Config.swift +++ b/MixSdk/Example/Example/Config.swift @@ -13,13 +13,17 @@ let gptKey = "sk-proj-04ogvrZQqyaiv1OWw8OZT3BlbkFJG9Gyr8oFvRdmr3oXQNbX" let gptModel = "gpt-4-turbo" -//let deviceId = "281106AFB0F7" -//let productId = "pafOCKLiUbeVHbdZlddH" -//let productKey = "HHosiYUNdG42t1cTgKOzIUPOvAVMI2QT" +////let deviceId = "281106AFB0F7" +////let productId = "pafOCKLiUbeVHbdZlddH" +////let productKey = "HHosiYUNdG42t1cTgKOzIUPOvAVMI2QT" +// +// +//let deviceId = "28110687C456" +//let productId = "Y1DxRdBfnzVZQrXHdrNl" +//let productKey = "4EepovakpbqhZUnUDwH42KAADYGv4UUe" +//28110687C457 let deviceId = "28110687C456" -let productId = "Y1DxRdBfnzVZQrXHdrNl" -let productKey = "4EepovakpbqhZUnUDwH42KAADYGv4UUe" - - +let productId = "WTxAKo2qD2pXOZZLW3zz" +let productKey = "YqggeKCxfEOVQGjUYrpQQdEstGpvojzn" diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.h b/MixSdk/Example/Example/MixTools.framework/Headers/AiAudioDecoder.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.h rename to MixSdk/Example/Example/MixTools.framework/Headers/AiAudioDecoder.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioTransform/AudioTransform.h b/MixSdk/Example/Example/MixTools.framework/Headers/AudioTransform.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioTransform/AudioTransform.h rename to MixSdk/Example/Example/MixTools.framework/Headers/AudioTransform.h diff --git a/MixSdk/MixTools/MixTools/MixTools/MSUtils.h b/MixSdk/Example/Example/MixTools.framework/Headers/MSUtils.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/MSUtils.h rename to MixSdk/Example/Example/MixTools.framework/Headers/MSUtils.h diff --git a/MixSdk/MixTools/MixTools/MixTools/MixTools.h b/MixSdk/Example/Example/MixTools.framework/Headers/MixTools.h similarity index 95% rename from MixSdk/MixTools/MixTools/MixTools/MixTools.h rename to MixSdk/Example/Example/MixTools.framework/Headers/MixTools.h index efbc856..a294dc0 100644 --- a/MixSdk/MixTools/MixTools/MixTools/MixTools.h +++ b/MixSdk/Example/Example/MixTools.framework/Headers/MixTools.h @@ -16,9 +16,9 @@ FOUNDATION_EXPORT const unsigned char MixToolsVersionString[]; // In this header, you should import all the public headers of your framework using statements like #import -#import #import #import #import +#import //#import "Tools/MSUtils.h" //#import "AudioTransform/AudioTransform.h" diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioTransform/fat-lame/include/lame/lame.h b/MixSdk/Example/Example/MixTools.framework/Headers/lame.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioTransform/fat-lame/include/lame/lame.h rename to MixSdk/Example/Example/MixTools.framework/Headers/lame.h diff --git a/MixSdk/Example/Example/MixTools.framework/Info.plist b/MixSdk/Example/Example/MixTools.framework/Info.plist new file mode 100644 index 0000000..a47ce80 Binary files /dev/null and b/MixSdk/Example/Example/MixTools.framework/Info.plist differ diff --git a/MixSdk/Example/Example/MixTools.framework/MixTools b/MixSdk/Example/Example/MixTools.framework/MixTools new file mode 100644 index 0000000..963aef1 Binary files /dev/null and b/MixSdk/Example/Example/MixTools.framework/MixTools differ diff --git a/MixSdk/Example/Example/MixTools.framework/Modules/module.modulemap b/MixSdk/Example/Example/MixTools.framework/Modules/module.modulemap new file mode 100644 index 0000000..5411693 --- /dev/null +++ b/MixSdk/Example/Example/MixTools.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module MixTools { + umbrella header "MixTools.h" + export * + + module * { export * } +} diff --git a/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeDirectory b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..455c9f3 Binary files /dev/null and b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeDirectory differ diff --git a/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeRequirements b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..80852cb Binary files /dev/null and b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeRequirements differ diff --git a/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeRequirements-1 b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..e078b29 Binary files /dev/null and b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeResources b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..6fbabec --- /dev/null +++ b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeResources @@ -0,0 +1,192 @@ + + + + + files + + Headers/AiAudioDecoder.h + + A3Zh810PyMMUh42ue7ZPXdxJkHU= + + Headers/AudioTransform.h + + k4E9Ansm+wGS/GaZYe+r8NSDQks= + + Headers/MSUtils.h + + 9JoQIG5aFSdCi5mO+iLuouI3/gc= + + Headers/MixTools.h + + 7dx49dGPerakFG4+vcHVOU7AhWo= + + Headers/lame.h + + uin4nurZztUVRe06GNrXXSQBZ8M= + + Info.plist + + N60nQTWU10Y3EI0v3VDJb9MivqA= + + Modules/module.modulemap + + sy6C4XKTiINkeW4ZdQXItvjWwE0= + + + files2 + + Headers/AiAudioDecoder.h + + hash + + A3Zh810PyMMUh42ue7ZPXdxJkHU= + + hash2 + + VFexMWYR14z30ZGKJmUE+FKxJlWBn19ZkjvB0e7wPgA= + + + Headers/AudioTransform.h + + hash + + k4E9Ansm+wGS/GaZYe+r8NSDQks= + + hash2 + + rp7eu2G8ADRKJFAmwraU3+giyPUIXPaKjPl3K/77Bbc= + + + Headers/MSUtils.h + + hash + + 9JoQIG5aFSdCi5mO+iLuouI3/gc= + + hash2 + + uXz8nXhVfeG3WBAF1ci7tPvKlibJvmt6Muc1R2d/ytw= + + + Headers/MixTools.h + + hash + + 7dx49dGPerakFG4+vcHVOU7AhWo= + + hash2 + + YsM0IA31uFfbESPKe75EcJaIHBbt2JzvzpGrUwBP494= + + + Headers/lame.h + + hash + + uin4nurZztUVRe06GNrXXSQBZ8M= + + hash2 + + QU/rVRE7SOSrovYT7AQQCExDi/Nu7ot7Geju6voBIMI= + + + Modules/module.modulemap + + hash + + sy6C4XKTiINkeW4ZdQXItvjWwE0= + + hash2 + + tIe6ZYJmBe39RbkayzNpzmLiJwIpuKZNCe49+esJyC8= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeSignature b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..ab3ca44 Binary files /dev/null and b/MixSdk/Example/Example/MixTools.framework/_CodeSignature/CodeSignature differ diff --git a/MixSdk/Example/MixTools.framework/Headers/AiAudioDecoder.h b/MixSdk/Example/MixTools.framework/Headers/AiAudioDecoder.h new file mode 100644 index 0000000..3db02d8 --- /dev/null +++ b/MixSdk/Example/MixTools.framework/Headers/AiAudioDecoder.h @@ -0,0 +1,21 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AiAudioDecoder : NSObject + +@property (nonatomic,copy) void(^onRecvPCMData)(NSData *pcmData); + ++(AiAudioDecoder *)sharedInstance; + + +-(void)startSBCDecodec; + +-(NSData *)decodeSBCData:(NSData*)data; + +/* 释放SBC解码器 */ +- (void)finishSBCDecode; + + +@end +NS_ASSUME_NONNULL_END diff --git a/MixSdk/Example/MixTools.framework/Headers/AudioTransform.h b/MixSdk/Example/MixTools.framework/Headers/AudioTransform.h new file mode 100644 index 0000000..30e98ce --- /dev/null +++ b/MixSdk/Example/MixTools.framework/Headers/AudioTransform.h @@ -0,0 +1,16 @@ +// +// AudioTransform.h +// ShangWuMiao +// +// Created by ju on 2017/7/19. +// Copyright © 2017å¹´ ju. All rights reserved. +// + +#import + +@interface AudioTransform : NSObject + ++ (BOOL)convertPcm:(NSString *)pcmPath toMp3:(NSString *)mp3Path; + ++ (BOOL)convertPcm:(NSString *)pcmPath pcmSamplerate:(int)samplerate toMp3:(NSString *)mp3Path ; +@end diff --git a/MixSdk/Example/MixTools.framework/Headers/MSUtils.h b/MixSdk/Example/MixTools.framework/Headers/MSUtils.h new file mode 100644 index 0000000..39ed23a --- /dev/null +++ b/MixSdk/Example/MixTools.framework/Headers/MSUtils.h @@ -0,0 +1,40 @@ +// +// AiMouseTools.h +// AiMouse +// +// Created by incar on 2024/2/28. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MSUtils : NSObject ++ (NSArray *)stringToArray:(NSString *)jsonString; ++ (NSString *)arrayToString:(NSArray *)arr; + ++ (NSDictionary *)stringToDictionary:(NSString *)jsonString; ++ (NSString *)dictionaryToString:(NSDictionary *)dic; + ++ (NSDictionary *)dataToDictionary:(NSData *)jsonData; ++ (NSData *)dictionaryToData:(NSDictionary *)dicJson; + + ++ (NSString *)dataToHexString:(NSData *)data; + ++ (NSString *)dataToHexString_placeholder:(NSData *)data; + ++ (NSData *)hexStringToData:(NSString *)hexStr ; + ++ (NSString *)dataToUtf8String:(NSData *)data; + ++ (NSString *)stringTomd5:(NSString *)str; + ++ (NSString *)stringToHmacSha1:(NSString*)key text:(NSString*)text; + ++ (NSString *)MD5ForUpper32:(NSString *)str; + ++ (NSData *)dataWithHexString:(NSString *)hexStr; +@end + +NS_ASSUME_NONNULL_END diff --git a/MixSdk/Example/MixTools.framework/Headers/MixTools.h b/MixSdk/Example/MixTools.framework/Headers/MixTools.h new file mode 100644 index 0000000..a294dc0 --- /dev/null +++ b/MixSdk/Example/MixTools.framework/Headers/MixTools.h @@ -0,0 +1,24 @@ +// +// MixTools.h +// MixTools +// +// Created by incar on 2024/12/31. +// + +#import + +//! Project version number for MixTools. +FOUNDATION_EXPORT double MixToolsVersionNumber; + +//! Project version string for MixTools. +FOUNDATION_EXPORT const unsigned char MixToolsVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import +//#import "Tools/MSUtils.h" +//#import "AudioTransform/AudioTransform.h" diff --git a/MixSdk/Example/MixTools.framework/Headers/lame.h b/MixSdk/Example/MixTools.framework/Headers/lame.h new file mode 100644 index 0000000..791d491 --- /dev/null +++ b/MixSdk/Example/MixTools.framework/Headers/lame.h @@ -0,0 +1,1323 @@ +/* + * Interface to MP3 LAME encoding engine + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* $Id: lame.h,v 1.189.2.1 2012/01/08 23:49:58 robert Exp $ */ + +#ifndef LAME_LAME_H +#define LAME_LAME_H + +/* for size_t typedef */ +#include +/* for va_list typedef */ +#include +/* for FILE typedef, TODO: remove when removing lame_mp3_tags_fid */ +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef void (*lame_report_function)(const char *format, va_list ap); + +#if defined(WIN32) || defined(_WIN32) +#undef CDECL +#define CDECL __cdecl +#else +#define CDECL +#endif + +#define DEPRECATED_OR_OBSOLETE_CODE_REMOVED 1 + +typedef enum vbr_mode_e { + vbr_off=0, + vbr_mt, /* obsolete, same as vbr_mtrh */ + vbr_rh, + vbr_abr, + vbr_mtrh, + vbr_max_indicator, /* Don't use this! It's used for sanity checks. */ + vbr_default=vbr_mtrh /* change this to change the default VBR mode of LAME */ +} vbr_mode; + + +/* MPEG modes */ +typedef enum MPEG_mode_e { + STEREO = 0, + JOINT_STEREO, + DUAL_CHANNEL, /* LAME doesn't supports this! */ + MONO, + NOT_SET, + MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} MPEG_mode; + +/* Padding types */ +typedef enum Padding_type_e { + PAD_NO = 0, + PAD_ALL, + PAD_ADJUST, + PAD_MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} Padding_type; + + + +/*presets*/ +typedef enum preset_mode_e { + /*values from 8 to 320 should be reserved for abr bitrates*/ + /*for abr I'd suggest to directly use the targeted bitrate as a value*/ + ABR_8 = 8, + ABR_320 = 320, + + V9 = 410, /*Vx to match Lame and VBR_xx to match FhG*/ + VBR_10 = 410, + V8 = 420, + VBR_20 = 420, + V7 = 430, + VBR_30 = 430, + V6 = 440, + VBR_40 = 440, + V5 = 450, + VBR_50 = 450, + V4 = 460, + VBR_60 = 460, + V3 = 470, + VBR_70 = 470, + V2 = 480, + VBR_80 = 480, + V1 = 490, + VBR_90 = 490, + V0 = 500, + VBR_100 = 500, + + + + /*still there for compatibility*/ + R3MIX = 1000, + STANDARD = 1001, + EXTREME = 1002, + INSANE = 1003, + STANDARD_FAST = 1004, + EXTREME_FAST = 1005, + MEDIUM = 1006, + MEDIUM_FAST = 1007 +} preset_mode; + + +/*asm optimizations*/ +typedef enum asm_optimizations_e { + MMX = 1, + AMD_3DNOW = 2, + SSE = 3 +} asm_optimizations; + + +/* psychoacoustic model */ +typedef enum Psy_model_e { + PSY_GPSYCHO = 1, + PSY_NSPSYTUNE = 2 +} Psy_model; + + +/* buffer considerations */ +typedef enum buffer_constraint_e { + MDB_DEFAULT=0, + MDB_STRICT_ISO=1, + MDB_MAXIMUM=2 +} buffer_constraint; + + +struct lame_global_struct; +typedef struct lame_global_struct lame_global_flags; +typedef lame_global_flags *lame_t; + + + + +/*********************************************************************** + * + * The LAME API + * These functions should be called, in this order, for each + * MP3 file to be encoded. See the file "API" for more documentation + * + ***********************************************************************/ + + +/* + * REQUIRED: + * initialize the encoder. sets default for all encoder parameters, + * returns NULL if some malloc()'s failed + * otherwise returns pointer to structure needed for all future + * API calls. + */ +lame_global_flags * CDECL lame_init(void); +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* obsolete version */ +int CDECL lame_init_old(lame_global_flags *); +#endif + +/* + * OPTIONAL: + * set as needed to override defaults + */ + +/******************************************************************** + * input stream description + ***********************************************************************/ +/* number of samples. default = 2^32-1 */ +int CDECL lame_set_num_samples(lame_global_flags *, unsigned long); +unsigned long CDECL lame_get_num_samples(const lame_global_flags *); + +/* input sample rate in Hz. default = 44100hz */ +int CDECL lame_set_in_samplerate(lame_global_flags *, int); +int CDECL lame_get_in_samplerate(const lame_global_flags *); + +/* number of channels in input stream. default=2 */ +int CDECL lame_set_num_channels(lame_global_flags *, int); +int CDECL lame_get_num_channels(const lame_global_flags *); + +/* + scale the input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale(lame_global_flags *, float); +float CDECL lame_get_scale(const lame_global_flags *); + +/* + scale the channel 0 (left) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_left(lame_global_flags *, float); +float CDECL lame_get_scale_left(const lame_global_flags *); + +/* + scale the channel 1 (right) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_right(lame_global_flags *, float); +float CDECL lame_get_scale_right(const lame_global_flags *); + +/* + output sample rate in Hz. default = 0, which means LAME picks best value + based on the amount of compression. MPEG only allows: + MPEG1 32, 44.1, 48khz + MPEG2 16, 22.05, 24 + MPEG2.5 8, 11.025, 12 + (not used by decoding routines) +*/ +int CDECL lame_set_out_samplerate(lame_global_flags *, int); +int CDECL lame_get_out_samplerate(const lame_global_flags *); + + +/******************************************************************** + * general control parameters + ***********************************************************************/ +/* 1=cause LAME to collect data for an MP3 frame analyzer. default=0 */ +int CDECL lame_set_analysis(lame_global_flags *, int); +int CDECL lame_get_analysis(const lame_global_flags *); + +/* + 1 = write a Xing VBR header frame. + default = 1 + this variable must have been added by a Hungarian notation Windows programmer :-) +*/ +int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int); +int CDECL lame_get_bWriteVbrTag(const lame_global_flags *); + +/* 1=decode only. use lame/mpglib to convert mp3/ogg to wav. default=0 */ +int CDECL lame_set_decode_only(lame_global_flags *, int); +int CDECL lame_get_decode_only(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* 1=encode a Vorbis .ogg file. default=0 */ +/* DEPRECATED */ +int CDECL lame_set_ogg(lame_global_flags *, int); +int CDECL lame_get_ogg(const lame_global_flags *); +#endif + +/* + internal algorithm selection. True quality is determined by the bitrate + but this variable will effect quality by selecting expensive or cheap algorithms. + quality=0..9. 0=best (very slow). 9=worst. + recommended: 2 near-best quality, not too slow + 5 good quality, fast + 7 ok quality, really fast +*/ +int CDECL lame_set_quality(lame_global_flags *, int); +int CDECL lame_get_quality(const lame_global_flags *); + +/* + mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono + default: lame picks based on compression ration and input channels +*/ +int CDECL lame_set_mode(lame_global_flags *, MPEG_mode); +MPEG_mode CDECL lame_get_mode(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + mode_automs. Use a M/S mode with a switching threshold based on + compression ratio + DEPRECATED +*/ +int CDECL lame_set_mode_automs(lame_global_flags *, int); +int CDECL lame_get_mode_automs(const lame_global_flags *); +#endif + +/* + force_ms. Force M/S for all frames. For testing only. + default = 0 (disabled) +*/ +int CDECL lame_set_force_ms(lame_global_flags *, int); +int CDECL lame_get_force_ms(const lame_global_flags *); + +/* use free_format? default = 0 (disabled) */ +int CDECL lame_set_free_format(lame_global_flags *, int); +int CDECL lame_get_free_format(const lame_global_flags *); + +/* perform ReplayGain analysis? default = 0 (disabled) */ +int CDECL lame_set_findReplayGain(lame_global_flags *, int); +int CDECL lame_get_findReplayGain(const lame_global_flags *); + +/* decode on the fly. Search for the peak sample. If the ReplayGain + * analysis is enabled then perform the analysis on the decoded data + * stream. default = 0 (disabled) + * NOTE: if this option is set the build-in decoder should not be used */ +int CDECL lame_set_decode_on_the_fly(lame_global_flags *, int); +int CDECL lame_get_decode_on_the_fly(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* DEPRECATED: now does the same as lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_input(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_input(const lame_global_flags *); + +/* DEPRECATED: now does the same as + lame_set_decode_on_the_fly() && lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_decode(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_decode(const lame_global_flags *); + +/* DEPRECATED: now does the same as lame_set_decode_on_the_fly() + default = 0 (disabled) */ +int CDECL lame_set_findPeakSample(lame_global_flags *, int); +int CDECL lame_get_findPeakSample(const lame_global_flags *); +#endif + +/* counters for gapless encoding */ +int CDECL lame_set_nogap_total(lame_global_flags*, int); +int CDECL lame_get_nogap_total(const lame_global_flags*); + +int CDECL lame_set_nogap_currentindex(lame_global_flags* , int); +int CDECL lame_get_nogap_currentindex(const lame_global_flags*); + + +/* + * OPTIONAL: + * Set printf like error/debug/message reporting functions. + * The second argument has to be a pointer to a function which looks like + * void my_debugf(const char *format, va_list ap) + * { + * (void) vfprintf(stdout, format, ap); + * } + * If you use NULL as the value of the pointer in the set function, the + * lame buildin function will be used (prints to stderr). + * To quiet any output you have to replace the body of the example function + * with just "return;" and use it in the set function. + */ +int CDECL lame_set_errorf(lame_global_flags *, lame_report_function); +int CDECL lame_set_debugf(lame_global_flags *, lame_report_function); +int CDECL lame_set_msgf (lame_global_flags *, lame_report_function); + + + +/* set one of brate compression ratio. default is compression ratio of 11. */ +int CDECL lame_set_brate(lame_global_flags *, int); +int CDECL lame_get_brate(const lame_global_flags *); +int CDECL lame_set_compression_ratio(lame_global_flags *, float); +float CDECL lame_get_compression_ratio(const lame_global_flags *); + + +int CDECL lame_set_preset( lame_global_flags* gfp, int ); +int CDECL lame_set_asm_optimizations( lame_global_flags* gfp, int, int ); + + + +/******************************************************************** + * frame params + ***********************************************************************/ +/* mark as copyright. default=0 */ +int CDECL lame_set_copyright(lame_global_flags *, int); +int CDECL lame_get_copyright(const lame_global_flags *); + +/* mark as original. default=1 */ +int CDECL lame_set_original(lame_global_flags *, int); +int CDECL lame_get_original(const lame_global_flags *); + +/* error_protection. Use 2 bytes from each frame for CRC checksum. default=0 */ +int CDECL lame_set_error_protection(lame_global_flags *, int); +int CDECL lame_get_error_protection(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* padding_type. 0=pad no frames 1=pad all frames 2=adjust padding(default) */ +int CDECL lame_set_padding_type(lame_global_flags *, Padding_type); +Padding_type CDECL lame_get_padding_type(const lame_global_flags *); +#endif + +/* MP3 'private extension' bit Meaningless. default=0 */ +int CDECL lame_set_extension(lame_global_flags *, int); +int CDECL lame_get_extension(const lame_global_flags *); + +/* enforce strict ISO compliance. default=0 */ +int CDECL lame_set_strict_ISO(lame_global_flags *, int); +int CDECL lame_get_strict_ISO(const lame_global_flags *); + + +/******************************************************************** + * quantization/noise shaping + ***********************************************************************/ + +/* disable the bit reservoir. For testing only. default=0 */ +int CDECL lame_set_disable_reservoir(lame_global_flags *, int); +int CDECL lame_get_disable_reservoir(const lame_global_flags *); + +/* select a different "best quantization" function. default=0 */ +int CDECL lame_set_quant_comp(lame_global_flags *, int); +int CDECL lame_get_quant_comp(const lame_global_flags *); +int CDECL lame_set_quant_comp_short(lame_global_flags *, int); +int CDECL lame_get_quant_comp_short(const lame_global_flags *); + +int CDECL lame_set_experimentalX(lame_global_flags *, int); /* compatibility*/ +int CDECL lame_get_experimentalX(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalY(lame_global_flags *, int); +int CDECL lame_get_experimentalY(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalZ(lame_global_flags *, int); +int CDECL lame_get_experimentalZ(const lame_global_flags *); + +/* Naoki's psycho acoustic model. default=0 */ +int CDECL lame_set_exp_nspsytune(lame_global_flags *, int); +int CDECL lame_get_exp_nspsytune(const lame_global_flags *); + +void CDECL lame_set_msfix(lame_global_flags *, double); +float CDECL lame_get_msfix(const lame_global_flags *); + + +/******************************************************************** + * VBR control + ***********************************************************************/ +/* Types of VBR. default = vbr_off = CBR */ +int CDECL lame_set_VBR(lame_global_flags *, vbr_mode); +vbr_mode CDECL lame_get_VBR(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest */ +int CDECL lame_set_VBR_q(lame_global_flags *, int); +int CDECL lame_get_VBR_q(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest, Range [0,...,10[ */ +int CDECL lame_set_VBR_quality(lame_global_flags *, float); +float CDECL lame_get_VBR_quality(const lame_global_flags *); + +/* Ignored except for VBR=vbr_abr (ABR mode) */ +int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *); + +/* + 1=strictly enforce VBR_min_bitrate. Normally it will be violated for + analog silence +*/ +int CDECL lame_set_VBR_hard_min(lame_global_flags *, int); +int CDECL lame_get_VBR_hard_min(const lame_global_flags *); + +/* for preset */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_set_preset_expopts(lame_global_flags *, int); +#endif + +/******************************************************************** + * Filtering control + ***********************************************************************/ +/* freq in Hz to apply lowpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_lowpassfreq(lame_global_flags *, int); +int CDECL lame_get_lowpassfreq(const lame_global_flags *); +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_lowpasswidth(lame_global_flags *, int); +int CDECL lame_get_lowpasswidth(const lame_global_flags *); + +/* freq in Hz to apply highpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_highpassfreq(lame_global_flags *, int); +int CDECL lame_get_highpassfreq(const lame_global_flags *); +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_highpasswidth(lame_global_flags *, int); +int CDECL lame_get_highpasswidth(const lame_global_flags *); + + +/******************************************************************** + * psycho acoustics and other arguments which you should not change + * unless you know what you are doing + ***********************************************************************/ + +/* only use ATH for masking */ +int CDECL lame_set_ATHonly(lame_global_flags *, int); +int CDECL lame_get_ATHonly(const lame_global_flags *); + +/* only use ATH for short blocks */ +int CDECL lame_set_ATHshort(lame_global_flags *, int); +int CDECL lame_get_ATHshort(const lame_global_flags *); + +/* disable ATH */ +int CDECL lame_set_noATH(lame_global_flags *, int); +int CDECL lame_get_noATH(const lame_global_flags *); + +/* select ATH formula */ +int CDECL lame_set_ATHtype(lame_global_flags *, int); +int CDECL lame_get_ATHtype(const lame_global_flags *); + +/* lower ATH by this many db */ +int CDECL lame_set_ATHlower(lame_global_flags *, float); +float CDECL lame_get_ATHlower(const lame_global_flags *); + +/* select ATH adaptive adjustment type */ +int CDECL lame_set_athaa_type( lame_global_flags *, int); +int CDECL lame_get_athaa_type( const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* select the loudness approximation used by the ATH adaptive auto-leveling */ +int CDECL lame_set_athaa_loudapprox( lame_global_flags *, int); +int CDECL lame_get_athaa_loudapprox( const lame_global_flags *); +#endif + +/* adjust (in dB) the point below which adaptive ATH level adjustment occurs */ +int CDECL lame_set_athaa_sensitivity( lame_global_flags *, float); +float CDECL lame_get_athaa_sensitivity( const lame_global_flags* ); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* OBSOLETE: predictability limit (ISO tonality formula) */ +int CDECL lame_set_cwlimit(lame_global_flags *, int); +int CDECL lame_get_cwlimit(const lame_global_flags *); +#endif + +/* + allow blocktypes to differ between channels? + default: 0 for jstereo, 1 for stereo +*/ +int CDECL lame_set_allow_diff_short(lame_global_flags *, int); +int CDECL lame_get_allow_diff_short(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_useTemporal(lame_global_flags *, int); +int CDECL lame_get_useTemporal(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_interChRatio(lame_global_flags *, float); +float CDECL lame_get_interChRatio(const lame_global_flags *); + +/* disable short blocks */ +int CDECL lame_set_no_short_blocks(lame_global_flags *, int); +int CDECL lame_get_no_short_blocks(const lame_global_flags *); + +/* force short blocks */ +int CDECL lame_set_force_short_blocks(lame_global_flags *, int); +int CDECL lame_get_force_short_blocks(const lame_global_flags *); + +/* Input PCM is emphased PCM (for instance from one of the rarely + emphased CDs), it is STRONGLY not recommended to use this, because + psycho does not take it into account, and last but not least many decoders + ignore these bits */ +int CDECL lame_set_emphasis(lame_global_flags *, int); +int CDECL lame_get_emphasis(const lame_global_flags *); + + + +/************************************************************************/ +/* internal variables, cannot be set... */ +/* provided because they may be of use to calling application */ +/************************************************************************/ +/* version 0=MPEG-2 1=MPEG-1 (2=MPEG-2.5) */ +int CDECL lame_get_version(const lame_global_flags *); + +/* encoder delay */ +int CDECL lame_get_encoder_delay(const lame_global_flags *); + +/* + padding appended to the input to make sure decoder can fully decode + all input. Note that this value can only be calculated during the + call to lame_encoder_flush(). Before lame_encoder_flush() has + been called, the value of encoder_padding = 0. +*/ +int CDECL lame_get_encoder_padding(const lame_global_flags *); + +/* size of MPEG frame */ +int CDECL lame_get_framesize(const lame_global_flags *); + +/* number of PCM samples buffered, but not yet encoded to mp3 data. */ +int CDECL lame_get_mf_samples_to_encode( const lame_global_flags* gfp ); + +/* + size (bytes) of mp3 data buffered, but not yet encoded. + this is the number of bytes which would be output by a call to + lame_encode_flush_nogap. NOTE: lame_encode_flush() will return + more bytes than this because it will encode the reamining buffered + PCM samples before flushing the mp3 buffers. +*/ +int CDECL lame_get_size_mp3buffer( const lame_global_flags* gfp ); + +/* number of frames encoded so far */ +int CDECL lame_get_frameNum(const lame_global_flags *); + +/* + lame's estimate of the total number of frames to be encoded + only valid if calling program set num_samples +*/ +int CDECL lame_get_totalframes(const lame_global_flags *); + +/* RadioGain value. Multiplied by 10 and rounded to the nearest. */ +int CDECL lame_get_RadioGain(const lame_global_flags *); + +/* AudiophileGain value. Multipled by 10 and rounded to the nearest. */ +int CDECL lame_get_AudiophileGain(const lame_global_flags *); + +/* the peak sample */ +float CDECL lame_get_PeakSample(const lame_global_flags *); + +/* Gain change required for preventing clipping. The value is correct only if + peak sample searching was enabled. If negative then the waveform + already does not clip. The value is multiplied by 10 and rounded up. */ +int CDECL lame_get_noclipGainChange(const lame_global_flags *); + +/* user-specified scale factor required for preventing clipping. Value is + correct only if peak sample searching was enabled and no user-specified + scaling was performed. If negative then either the waveform already does + not clip or the value cannot be determined */ +float CDECL lame_get_noclipScale(const lame_global_flags *); + + + + + + + +/* + * REQUIRED: + * sets more internal configuration based on data provided above. + * returns -1 if something failed. + */ +int CDECL lame_init_params(lame_global_flags *); + + +/* + * OPTIONAL: + * get the version number, in a string. of the form: + * "3.63 (beta)" or just "3.63". + */ +const char* CDECL get_lame_version ( void ); +const char* CDECL get_lame_short_version ( void ); +const char* CDECL get_lame_very_short_version ( void ); +const char* CDECL get_psy_version ( void ); +const char* CDECL get_lame_url ( void ); +const char* CDECL get_lame_os_bitness ( void ); + +/* + * OPTIONAL: + * get the version numbers in numerical form. + */ +typedef struct { + /* generic LAME version */ + int major; + int minor; + int alpha; /* 0 if not an alpha version */ + int beta; /* 0 if not a beta version */ + + /* version of the psy model */ + int psy_major; + int psy_minor; + int psy_alpha; /* 0 if not an alpha version */ + int psy_beta; /* 0 if not a beta version */ + + /* compile time features */ + const char *features; /* Don't make assumptions about the contents! */ +} lame_version_t; +void CDECL get_lame_version_numerical(lame_version_t *); + + +/* + * OPTIONAL: + * print internal lame configuration to message handler + */ +void CDECL lame_print_config(const lame_global_flags* gfp); + +void CDECL lame_print_internals( const lame_global_flags *gfp); + + +/* + * input pcm data, output (maybe) mp3 frames. + * This routine handles all buffering, resampling and filtering for you. + * + * return code number of bytes output in mp3buf. Can be 0 + * -1: mp3buf was too small + * -2: malloc() problem + * -3: lame_init_params() not called + * -4: psycho acoustic problems + * + * The required mp3buf_size can be computed from num_samples, + * samplerate and encoding rate, but here is a worst case estimate: + * + * mp3buf_size in bytes = 1.25*num_samples + 7200 + * + * I think a tighter bound could be: (mt, March 2000) + * MPEG1: + * num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512 + * MPEG2: + * num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256 + * + * but test first if you use that! + * + * set mp3buf_size = 0 and LAME will not check if mp3buf_size is + * large enough. + * + * NOTE: + * if gfp->num_channels=2, but gfp->mode = 3 (mono), the L & R channels + * will be averaged into the L channel before encoding only the L channel + * This will overwrite the data in buffer_l[] and buffer_r[]. + * +*/ +int CDECL lame_encode_buffer ( + lame_global_flags* gfp, /* global context handle */ + const short int buffer_l [], /* PCM data for left channel */ + const short int buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* + * as above, but input has L & R channel data interleaved. + * NOTE: + * num_samples = number of samples in the L (or R) + * channel, not the total number of samples in pcm[] + */ +int CDECL lame_encode_buffer_interleaved( + lame_global_flags* gfp, /* global context handlei */ + short int pcm[], /* PCM data for left and right + channel, interleaved */ + int num_samples, /* number of samples per channel, + _not_ number of samples in + pcm[] */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int mp3buf_size ); /* number of valid octets in this + stream */ + + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + */ +int CDECL lame_encode_buffer_float( + lame_global_flags* gfp, /* global context handle */ + const float pcm_l [], /* PCM data for left channel */ + const float pcm_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_float( + lame_t gfp, + const float pcm_l [], /* PCM data for left channel */ + const float pcm_r [], /* PCM data for right channel */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); +int CDECL lame_encode_buffer_interleaved_ieee_float( + lame_t gfp, + const float pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for 'double's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_double( + lame_t gfp, + const double pcm_l [], /* PCM data for left channel */ + const double pcm_r [], /* PCM data for right channel */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); +int CDECL lame_encode_buffer_interleaved_ieee_double( + lame_t gfp, + const double pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for long's + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + * + * This scaling was a mistake (doesn't allow one to exploit full + * precision of type 'long'. Use lame_encode_buffer_long2() instead. + * + */ +int CDECL lame_encode_buffer_long( + lame_global_flags* gfp, /* global context handle */ + const long buffer_l [], /* PCM data for left channel */ + const long buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* Same as lame_encode_buffer_long(), but with correct scaling. + * !! NOTE: !! data must still be scaled to be in the same range as + * type 'long'. Data should be in the range: +/- 2^(8*size(long)-1) + * + */ +int CDECL lame_encode_buffer_long2( + lame_global_flags* gfp, /* global context handle */ + const long buffer_l [], /* PCM data for left channel */ + const long buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for int's + * !! NOTE: !! input should be scaled to the maximum range of 'int' + * If int is 4 bytes, then the values should range from + * +/- 2147483648. + * + * This routine does not (and cannot, without loosing precision) use + * the same scaling as the rest of the lame_encode_buffer() routines. + * + */ +int CDECL lame_encode_buffer_int( + lame_global_flags* gfp, /* global context handle */ + const int buffer_l [], /* PCM data for left channel */ + const int buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + + + + + +/* + * REQUIRED: + * lame_encode_flush will flush the intenal PCM buffers, padding with + * 0's to make sure the final frame is complete, and then flush + * the internal MP3 buffers, and thus may return a + * final few mp3 frames. 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * will also write id3v1 tags (if any) into the bitstream + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush( + lame_global_flags * gfp, /* global context handle */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * lame_encode_flush_nogap will flush the internal mp3 buffers and pad + * the last frame with ancillary data so it is a complete mp3 frame. + * + * 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * After a call to this routine, the outputed mp3 data is complete, but + * you may continue to encode new PCM samples and write future mp3 data + * to a different file. The two mp3 files will play back with no gaps + * if they are concatenated together. + * + * This routine will NOT write id3v1 tags into the bitstream. + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush_nogap( + lame_global_flags * gfp, /* global context handle */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * Normally, this is called by lame_init_params(). It writes id3v2 and + * Xing headers into the front of the bitstream, and sets frame counters + * and bitrate histogram data to 0. You can also call this after + * lame_encode_flush_nogap(). + */ +int CDECL lame_init_bitstream( + lame_global_flags * gfp); /* global context handle */ + + + +/* + * OPTIONAL: some simple statistics + * a bitrate histogram to visualize the distribution of used frame sizes + * a stereo mode histogram to visualize the distribution of used stereo + * modes, useful in joint-stereo mode only + * 0: LR left-right encoded + * 1: LR-I left-right and intensity encoded (currently not supported) + * 2: MS mid-side encoded + * 3: MS-I mid-side and intensity encoded (currently not supported) + * + * attention: don't call them after lame_encode_finish + * suggested: lame_encode_flush -> lame_*_hist -> lame_close + */ + +void CDECL lame_bitrate_hist( + const lame_global_flags * gfp, + int bitrate_count[14] ); +void CDECL lame_bitrate_kbps( + const lame_global_flags * gfp, + int bitrate_kbps [14] ); +void CDECL lame_stereo_mode_hist( + const lame_global_flags * gfp, + int stereo_mode_count[4] ); + +void CDECL lame_bitrate_stereo_mode_hist ( + const lame_global_flags * gfp, + int bitrate_stmode_count[14][4] ); + +void CDECL lame_block_type_hist ( + const lame_global_flags * gfp, + int btype_count[6] ); + +void CDECL lame_bitrate_block_type_hist ( + const lame_global_flags * gfp, + int bitrate_btype_count[14][6] ); + +#if (DEPRECATED_OR_OBSOLETE_CODE_REMOVED && 0) +#else +/* + * OPTIONAL: + * lame_mp3_tags_fid will rewrite a Xing VBR tag to the mp3 file with file + * pointer fid. These calls perform forward and backwards seeks, so make + * sure fid is a real file. Make sure lame_encode_flush has been called, + * and all mp3 data has been written to the file before calling this + * function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME because + * the output is not a regular file, this call does nothing + * NOTE: + * LAME wants to read from the file to skip an optional ID3v2 tag, so + * make sure you opened the file for writing and reading. + * NOTE: + * You can call lame_get_lametag_frame instead, if you want to insert + * the lametag yourself. +*/ +void CDECL lame_mp3_tags_fid(lame_global_flags *, FILE* fid); +#endif + +/* + * OPTIONAL: + * lame_get_lametag_frame copies the final LAME-tag into 'buffer'. + * The function returns the number of bytes copied into buffer, or + * the required buffer size, if the provided buffer is too small. + * Function failed, if the return value is larger than 'size'! + * Make sure lame_encode flush has been called before calling this function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME, + * this call does nothing and returns 0. + * NOTE: + * LAME inserted an empty frame in the beginning of mp3 audio data, + * which you have to replace by the final LAME-tag frame after encoding. + * In case there is no ID3v2 tag, usually this frame will be the very first + * data in your mp3 file. If you put some other leading data into your + * file, you'll have to do some bookkeeping about where to write this buffer. + */ +size_t CDECL lame_get_lametag_frame( + const lame_global_flags *, unsigned char* buffer, size_t size); + +/* + * REQUIRED: + * final call to free all remaining buffers + */ +int CDECL lame_close (lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + * OBSOLETE: + * lame_encode_finish combines lame_encode_flush() and lame_close() in + * one call. However, once this call is made, the statistics routines + * will no longer work because the data will have been cleared, and + * lame_mp3_tags_fid() cannot be called to add data to the VBR header + */ +int CDECL lame_encode_finish( + lame_global_flags* gfp, + unsigned char* mp3buf, + int size ); +#endif + + + + + + +/********************************************************************* + * + * decoding + * + * a simple interface to mpglib, part of mpg123, is also included if + * libmp3lame is compiled with HAVE_MPGLIB + * + *********************************************************************/ + +struct hip_global_struct; +typedef struct hip_global_struct hip_global_flags; +typedef hip_global_flags *hip_t; + + +typedef struct { + int header_parsed; /* 1 if header was parsed and following data was + computed */ + int stereo; /* number of channels */ + int samplerate; /* sample rate */ + int bitrate; /* bitrate */ + int mode; /* mp3 frame type */ + int mode_ext; /* mp3 frame type */ + int framesize; /* number of samples per mp3 frame */ + + /* this data is only computed if mpglib detects a Xing VBR header */ + unsigned long nsamp; /* number of samples in mp3 file. */ + int totalframes; /* total number of frames in mp3 file */ + + /* this data is not currently computed by the mpglib routines */ + int framenum; /* frames decoded counter */ +} mp3data_struct; + +/* required call to initialize decoder */ +hip_t CDECL hip_decode_init(void); + +/* cleanup call to exit decoder */ +int CDECL hip_decode_exit(hip_t gfp); + +/* HIP reporting functions */ +void CDECL hip_set_errorf(hip_t gfp, lame_report_function f); +void CDECL hip_set_debugf(hip_t gfp, lame_report_function f); +void CDECL hip_set_msgf (hip_t gfp, lame_report_function f); + +/********************************************************************* + * input 1 mp3 frame, output (maybe) pcm data. + * + * nout = hip_decode(hip, mp3buf,len,pcm_l,pcm_r); + * + * input: + * len : number of bytes of mp3 data in mp3buf + * mp3buf[len] : mp3 data to be decoded + * + * output: + * nout: -1 : decoding error + * 0 : need more data before we can complete the decode + * >0 : returned 'nout' samples worth of data in pcm_l,pcm_r + * pcm_l[nout] : left channel data + * pcm_r[nout] : right channel data + * + *********************************************************************/ +int CDECL hip_decode( hip_t gfp + , unsigned char * mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + ); + +/* same as hip_decode, and also returns mp3 header data */ +int CDECL hip_decode_headers( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + ); + +/* same as hip_decode, but returns at most one frame */ +int CDECL hip_decode1( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + ); + +/* same as hip_decode1, but returns at most one frame and mp3 header data */ +int CDECL hip_decode1_headers( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + ); + +/* same as hip_decode1_headers, but also returns enc_delay and enc_padding + from VBR Info tag, (-1 if no info tag was found) */ +int CDECL hip_decode1_headersB( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + , int *enc_delay + , int *enc_padding + ); + + + +/* OBSOLETE: + * lame_decode... functions are there to keep old code working + * but it is strongly recommended to replace calls by hip_decode... + * function calls, see above. + */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_decode_init(void); +int CDECL lame_decode( + unsigned char * mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode1_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1_headersB( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data, + int *enc_delay, + int *enc_padding ); +int CDECL lame_decode_exit(void); + +#endif /* obsolete lame_decode API calls */ + + +/********************************************************************* + * + * id3tag stuff + * + *********************************************************************/ + +/* + * id3tag.h -- Interface to write ID3 version 1 and 2 tags. + * + * Copyright (C) 2000 Don Melton. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* utility to obtain alphabetically sorted list of genre names with numbers */ +void CDECL id3tag_genre_list( + void (*handler)(int, const char *, void *), + void* cookie); + +void CDECL id3tag_init (lame_t gfp); + +/* force addition of version 2 tag */ +void CDECL id3tag_add_v2 (lame_t gfp); + +/* add only a version 1 tag */ +void CDECL id3tag_v1_only (lame_t gfp); + +/* add only a version 2 tag */ +void CDECL id3tag_v2_only (lame_t gfp); + +/* pad version 1 tag with spaces instead of nulls */ +void CDECL id3tag_space_v1 (lame_t gfp); + +/* pad version 2 tag with extra 128 bytes */ +void CDECL id3tag_pad_v2 (lame_t gfp); + +/* pad version 2 tag with extra n bytes */ +void CDECL id3tag_set_pad (lame_t gfp, size_t n); + +void CDECL id3tag_set_title(lame_t gfp, const char* title); +void CDECL id3tag_set_artist(lame_t gfp, const char* artist); +void CDECL id3tag_set_album(lame_t gfp, const char* album); +void CDECL id3tag_set_year(lame_t gfp, const char* year); +void CDECL id3tag_set_comment(lame_t gfp, const char* comment); + +/* return -1 result if track number is out of ID3v1 range + and ignored for ID3v1 */ +int CDECL id3tag_set_track(lame_t gfp, const char* track); + +/* return non-zero result if genre name or number is invalid + result 0: OK + result -1: genre number out of range + result -2: no valid ID3v1 genre name, mapped to ID3v1 'Other' + but taken as-is for ID3v2 genre tag */ +int CDECL id3tag_set_genre(lame_t gfp, const char* genre); + +/* return non-zero result if field name is invalid */ +int CDECL id3tag_set_fieldvalue(lame_t gfp, const char* fieldvalue); + +/* return non-zero result if image type is invalid */ +int CDECL id3tag_set_albumart(lame_t gfp, const char* image, size_t size); + +/* lame_get_id3v1_tag copies ID3v1 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v1 tag. + */ +size_t CDECL lame_get_id3v1_tag(lame_t gfp, unsigned char* buffer, size_t size); + +/* lame_get_id3v2_tag copies ID3v2 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v2 tag. + */ +size_t CDECL lame_get_id3v2_tag(lame_t gfp, unsigned char* buffer, size_t size); + +/* normaly lame_init_param writes ID3v2 tags into the audio stream + * Call lame_set_write_id3tag_automatic(gfp, 0) before lame_init_param + * to turn off this behaviour and get ID3v2 tag with above function + * write it yourself into your file. + */ +void CDECL lame_set_write_id3tag_automatic(lame_global_flags * gfp, int); +int CDECL lame_get_write_id3tag_automatic(lame_global_flags const* gfp); + +/* experimental */ +int CDECL id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text); + +/* experimental */ +int CDECL id3tag_set_comment_latin1(lame_t gfp, char const *lang, char const *desc, char const *text); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* experimental */ +int CDECL id3tag_set_textinfo_ucs2(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_ucs2(lame_t gfp, char const *lang, + unsigned short const *desc, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue); +#endif + +/* experimental */ +int CDECL id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue); + +/* experimental */ +int CDECL id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_utf16(lame_t gfp, char const *lang, unsigned short const *desc, unsigned short const *text); + + +/*********************************************************************** +* +* list of valid bitrates [kbps] & sample frequencies [Hz]. +* first index: 0: MPEG-2 values (sample frequencies 16...24 kHz) +* 1: MPEG-1 values (sample frequencies 32...48 kHz) +* 2: MPEG-2.5 values (sample frequencies 8...12 kHz) +***********************************************************************/ + +extern const int bitrate_table [3][16]; +extern const int samplerate_table [3][ 4]; + +/* access functions for use in DLL, global vars are not exported */ +int CDECL lame_get_bitrate(int mpeg_version, int table_index); +int CDECL lame_get_samplerate(int mpeg_version, int table_index); + + +/* maximum size of albumart image (128KB), which affects LAME_MAXMP3BUFFER + as well since lame_encode_buffer() also returns ID3v2 tag data */ +#define LAME_MAXALBUMART (128 * 1024) + +/* maximum size of mp3buffer needed if you encode at most 1152 samples for + each call to lame_encode_buffer. see lame_encode_buffer() below + (LAME_MAXMP3BUFFER is now obsolete) */ +#define LAME_MAXMP3BUFFER (16384 + LAME_MAXALBUMART) + + +typedef enum { + LAME_OKAY = 0, + LAME_NOERROR = 0, + LAME_GENERICERROR = -1, + LAME_NOMEM = -10, + LAME_BADBITRATE = -11, + LAME_BADSAMPFREQ = -12, + LAME_INTERNALERROR = -13, + + FRONTEND_READERROR = -80, + FRONTEND_WRITEERROR = -81, + FRONTEND_FILETOOLARGE = -82 + +} lame_errorcodes_t; + +#if defined(__cplusplus) +} +#endif +#endif /* LAME_LAME_H */ + diff --git a/MixSdk/Example/MixTools.framework/Info.plist b/MixSdk/Example/MixTools.framework/Info.plist new file mode 100644 index 0000000..a47ce80 Binary files /dev/null and b/MixSdk/Example/MixTools.framework/Info.plist differ diff --git a/MixSdk/Example/MixTools.framework/MixTools b/MixSdk/Example/MixTools.framework/MixTools new file mode 100644 index 0000000..963aef1 Binary files /dev/null and b/MixSdk/Example/MixTools.framework/MixTools differ diff --git a/MixSdk/Example/MixTools.framework/Modules/module.modulemap b/MixSdk/Example/MixTools.framework/Modules/module.modulemap new file mode 100644 index 0000000..5411693 --- /dev/null +++ b/MixSdk/Example/MixTools.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module MixTools { + umbrella header "MixTools.h" + export * + + module * { export * } +} diff --git a/MixSdk/Example/MixTools.framework/_CodeSignature/CodeDirectory b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..455c9f3 Binary files /dev/null and b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeDirectory differ diff --git a/MixSdk/Example/MixTools.framework/_CodeSignature/CodeRequirements b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..80852cb Binary files /dev/null and b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeRequirements differ diff --git a/MixSdk/Example/MixTools.framework/_CodeSignature/CodeRequirements-1 b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..e078b29 Binary files /dev/null and b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/MixSdk/Example/MixTools.framework/_CodeSignature/CodeResources b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..6fbabec --- /dev/null +++ b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeResources @@ -0,0 +1,192 @@ + + + + + files + + Headers/AiAudioDecoder.h + + A3Zh810PyMMUh42ue7ZPXdxJkHU= + + Headers/AudioTransform.h + + k4E9Ansm+wGS/GaZYe+r8NSDQks= + + Headers/MSUtils.h + + 9JoQIG5aFSdCi5mO+iLuouI3/gc= + + Headers/MixTools.h + + 7dx49dGPerakFG4+vcHVOU7AhWo= + + Headers/lame.h + + uin4nurZztUVRe06GNrXXSQBZ8M= + + Info.plist + + N60nQTWU10Y3EI0v3VDJb9MivqA= + + Modules/module.modulemap + + sy6C4XKTiINkeW4ZdQXItvjWwE0= + + + files2 + + Headers/AiAudioDecoder.h + + hash + + A3Zh810PyMMUh42ue7ZPXdxJkHU= + + hash2 + + VFexMWYR14z30ZGKJmUE+FKxJlWBn19ZkjvB0e7wPgA= + + + Headers/AudioTransform.h + + hash + + k4E9Ansm+wGS/GaZYe+r8NSDQks= + + hash2 + + rp7eu2G8ADRKJFAmwraU3+giyPUIXPaKjPl3K/77Bbc= + + + Headers/MSUtils.h + + hash + + 9JoQIG5aFSdCi5mO+iLuouI3/gc= + + hash2 + + uXz8nXhVfeG3WBAF1ci7tPvKlibJvmt6Muc1R2d/ytw= + + + Headers/MixTools.h + + hash + + 7dx49dGPerakFG4+vcHVOU7AhWo= + + hash2 + + YsM0IA31uFfbESPKe75EcJaIHBbt2JzvzpGrUwBP494= + + + Headers/lame.h + + hash + + uin4nurZztUVRe06GNrXXSQBZ8M= + + hash2 + + QU/rVRE7SOSrovYT7AQQCExDi/Nu7ot7Geju6voBIMI= + + + Modules/module.modulemap + + hash + + sy6C4XKTiINkeW4ZdQXItvjWwE0= + + hash2 + + tIe6ZYJmBe39RbkayzNpzmLiJwIpuKZNCe49+esJyC8= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/MixSdk/Example/MixTools.framework/_CodeSignature/CodeSignature b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..ab3ca44 Binary files /dev/null and b/MixSdk/Example/MixTools.framework/_CodeSignature/CodeSignature differ diff --git a/MixSdk/MixSdk/MixSdk.xcodeproj/project.pbxproj b/MixSdk/MixSdk/MixSdk.xcodeproj/project.pbxproj index 449b8e4..bae7cda 100644 --- a/MixSdk/MixSdk/MixSdk.xcodeproj/project.pbxproj +++ b/MixSdk/MixSdk/MixSdk.xcodeproj/project.pbxproj @@ -23,7 +23,6 @@ 18132AED2C1C1EA8002F6B52 /* MSTool.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18132AEC2C1C1EA8002F6B52 /* MSTool.swift */; }; 18132AEF2C1C25CC002F6B52 /* MSAigc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18132AEE2C1C25CC002F6B52 /* MSAigc.swift */; }; 18132AF22C1C4938002F6B52 /* SwiftWebSocket.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18132AF12C1C4938002F6B52 /* SwiftWebSocket.swift */; }; - 18132AF52C1C4C85002F6B52 /* libz.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 18132AF42C1C4C85002F6B52 /* libz.tbd */; }; 18204BBF2C193E3D00F94E69 /* MixSdk.h in Headers */ = {isa = PBXBuildFile; fileRef = 18204BBE2C193E3D00F94E69 /* MixSdk.h */; settings = {ATTRIBUTES = (Public, ); }; }; 18204BC62C193E4B00F94E69 /* MSAuth.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18204BC52C193E4B00F94E69 /* MSAuth.swift */; }; 18204BF02C19457600F94E69 /* MSHttpManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18204BEF2C19457600F94E69 /* MSHttpManager.swift */; }; @@ -33,7 +32,6 @@ 18204BFB2C19488900F94E69 /* Upload.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18204BF52C19488800F94E69 /* Upload.swift */; }; 18204BFC2C19488900F94E69 /* HTTPSecurity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18204BF62C19488800F94E69 /* HTTPSecurity.swift */; }; 18204BFD2C19488900F94E69 /* Operation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18204BF72C19488800F94E69 /* Operation.swift */; }; - 1830C7482D23C8C2000DA10D /* MixTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1830C7442D23BEE0000DA10D /* MixTools.framework */; }; 1830C7662D23CCAE000DA10D /* MSAudioConvert.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1830C7652D23CCAE000DA10D /* MSAudioConvert.swift */; }; 18314A892C3CD55E0028CE50 /* MSAuthModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18314A882C3CD55E0028CE50 /* MSAuthModel.swift */; }; 184FFC542C21B091006F664D /* MSAigcModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184FFC532C21B091006F664D /* MSAigcModel.swift */; }; @@ -161,21 +159,11 @@ 18C42B3D2C22F2C4000D8860 /* MSTtsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18C42B3C2C22F2C4000D8860 /* MSTtsModel.swift */; }; 18C42B3F2C22F2E1000D8860 /* MSChatModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18C42B3E2C22F2E1000D8860 /* MSChatModel.swift */; }; 18C42B4B2C23DA29000D8860 /* SbcToPcm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18C42B4A2C23DA29000D8860 /* SbcToPcm.swift */; }; - 18C42C7D2C242A40000D8860 /* liblzma.5.tbd in Frameworks */ = {isa = PBXBuildFile; fileRef = 18C42C7C2C242A40000D8860 /* liblzma.5.tbd */; }; 18FBC2B72C38DA05002240AF /* MSChatGpt.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18FBC2B62C38DA05002240AF /* MSChatGpt.swift */; }; 18FBC2B92C38DA1D002240AF /* MSChatGptModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18FBC2B82C38DA1D002240AF /* MSChatGptModel.swift */; }; + 3F3BD3BC2D2631D5001D4F6E /* MixTools.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3F3BD3BB2D2631D5001D4F6E /* MixTools.framework */; }; /* End PBXBuildFile section */ -/* Begin PBXContainerItemProxy section */ - 1830C7432D23BEE0000DA10D /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1830C73F2D23BEE0000DA10D /* MixTools.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1830C7302D23BD9B000DA10D; - remoteInfo = MixTools; - }; -/* End PBXContainerItemProxy section */ - /* Begin PBXFileReference section */ 180255B72C3BD881005AFC5F /* MSTranscription.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MSTranscription.swift; sourceTree = ""; }; 1811882E2C1A89E600C23FAB /* MixSdk.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MixSdk.swift; sourceTree = ""; }; @@ -204,7 +192,6 @@ 18204BF52C19488800F94E69 /* Upload.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Upload.swift; sourceTree = ""; }; 18204BF62C19488800F94E69 /* HTTPSecurity.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HTTPSecurity.swift; sourceTree = ""; }; 18204BF72C19488800F94E69 /* Operation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Operation.swift; sourceTree = ""; }; - 1830C73F2D23BEE0000DA10D /* MixTools.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = MixTools.xcodeproj; path = ../MixTools/MixTools/MixTools.xcodeproj; sourceTree = ""; }; 1830C7652D23CCAE000DA10D /* MSAudioConvert.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MSAudioConvert.swift; sourceTree = ""; }; 18314A882C3CD55E0028CE50 /* MSAuthModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MSAuthModel.swift; sourceTree = ""; }; 184FFC532C21B091006F664D /* MSAigcModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MSAigcModel.swift; sourceTree = ""; }; @@ -335,6 +322,7 @@ 18C42C7C2C242A40000D8860 /* liblzma.5.tbd */ = {isa = PBXFileReference; lastKnownFileType = "sourcecode.text-based-dylib-definition"; name = liblzma.5.tbd; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.2.sdk/usr/lib/liblzma.5.tbd; sourceTree = DEVELOPER_DIR; }; 18FBC2B62C38DA05002240AF /* MSChatGpt.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MSChatGpt.swift; sourceTree = ""; }; 18FBC2B82C38DA1D002240AF /* MSChatGptModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MSChatGptModel.swift; sourceTree = ""; }; + 3F3BD3BB2D2631D5001D4F6E /* MixTools.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = MixTools.framework; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -342,9 +330,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1830C7482D23C8C2000DA10D /* MixTools.framework in Frameworks */, - 18C42C7D2C242A40000D8860 /* liblzma.5.tbd in Frameworks */, - 18132AF52C1C4C85002F6B52 /* libz.tbd in Frameworks */, + 3F3BD3BC2D2631D5001D4F6E /* MixTools.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -381,7 +367,6 @@ 18204BB12C193E3D00F94E69 = { isa = PBXGroup; children = ( - 1830C73F2D23BEE0000DA10D /* MixTools.xcodeproj */, 18204BBD2C193E3D00F94E69 /* MixSdk */, 18204BBC2C193E3D00F94E69 /* Products */, 18132AF32C1C4C84002F6B52 /* Frameworks */, @@ -399,6 +384,7 @@ 18204BBD2C193E3D00F94E69 /* MixSdk */ = { isa = PBXGroup; children = ( + 3F3BD3BB2D2631D5001D4F6E /* MixTools.framework */, 18A2DC4E2C40D94700A8731B /* CryptoSwift */, 18204BF12C19488800F94E69 /* SwiftHTTP */, 181188302C1A8B5200C23FAB /* Tools */, @@ -442,14 +428,6 @@ path = SwiftHTTP; sourceTree = ""; }; - 1830C7402D23BEE0000DA10D /* Products */ = { - isa = PBXGroup; - children = ( - 1830C7442D23BEE0000DA10D /* MixTools.framework */, - ); - name = Products; - sourceTree = ""; - }; 18A2DC4E2C40D94700A8731B /* CryptoSwift */ = { isa = PBXGroup; children = ( @@ -694,12 +672,6 @@ mainGroup = 18204BB12C193E3D00F94E69; productRefGroup = 18204BB12C193E3D00F94E69; projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1830C7402D23BEE0000DA10D /* Products */; - ProjectRef = 1830C73F2D23BEE0000DA10D /* MixTools.xcodeproj */; - }, - ); projectRoot = ""; targets = ( 18204BBA2C193E3D00F94E69 /* MixSdk */, @@ -707,16 +679,6 @@ }; /* End PBXProject section */ -/* Begin PBXReferenceProxy section */ - 1830C7442D23BEE0000DA10D /* MixTools.framework */ = { - isa = PBXReferenceProxy; - fileType = wrapper.framework; - path = MixTools.framework; - remoteRef = 1830C7432D23BEE0000DA10D /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - /* Begin PBXResourcesBuildPhase section */ 18204BB92C193E3D00F94E69 /* Resources */ = { isa = PBXResourcesBuildPhase; @@ -1028,12 +990,9 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - ); + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/MixSdk"; GENERATE_INFOPLIST_FILE = YES; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/MixSdk/FFmpeg-iOS/include"; + HEADER_SEARCH_PATHS = ""; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1042,11 +1001,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/MixSdk/FFmpeg-iOS/lib", - "$(PROJECT_DIR)/MixSdk/AudioTransform/fat-lame/lib", - ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; MACH_O_TYPE = staticlib; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; @@ -1076,12 +1031,9 @@ DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_MODULE_VERIFIER = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)", - ); + FRAMEWORK_SEARCH_PATHS = "$(PROJECT_DIR)/MixSdk"; GENERATE_INFOPLIST_FILE = YES; - HEADER_SEARCH_PATHS = "$(PROJECT_DIR)/MixSdk/FFmpeg-iOS/include"; + HEADER_SEARCH_PATHS = ""; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; @@ -1090,11 +1042,7 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "$(PROJECT_DIR)/MixSdk/FFmpeg-iOS/lib", - "$(PROJECT_DIR)/MixSdk/AudioTransform/fat-lame/lib", - ); + LIBRARY_SEARCH_PATHS = "$(inherited)"; MACH_O_TYPE = staticlib; MARKETING_VERSION = 1.0; MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; diff --git a/MixSdk/MixSdk/MixSdk/MixSdk.swift b/MixSdk/MixSdk/MixSdk/MixSdk.swift index 0a82c06..cd781ea 100644 --- a/MixSdk/MixSdk/MixSdk/MixSdk.swift +++ b/MixSdk/MixSdk/MixSdk/MixSdk.swift @@ -151,17 +151,22 @@ public class MixSdk:NSObject { /// 初始化工作 public func initSDK() { - Logger.log("MixSdk version:",MixSdk.version) +// Logger.log("MixSdk version:",MixSdk.version) } /// 日志 public var logs: [String] { Logger.logs } /// SDK 版本号 - public let version: String = "1.0.15" + public let version: String = "2025010201" /// 默认为 false public var isDebug: Bool = false { - didSet { Logger.isDebug = isDebug } + didSet { + Logger.isDebug = isDebug + if isDebug{ + Logger.log("MixSdk version:",MixSdk.shared.version) + } + } } diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/AiAudioDecoder.h b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/AiAudioDecoder.h new file mode 100644 index 0000000..3db02d8 --- /dev/null +++ b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/AiAudioDecoder.h @@ -0,0 +1,21 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AiAudioDecoder : NSObject + +@property (nonatomic,copy) void(^onRecvPCMData)(NSData *pcmData); + ++(AiAudioDecoder *)sharedInstance; + + +-(void)startSBCDecodec; + +-(NSData *)decodeSBCData:(NSData*)data; + +/* 释放SBC解码器 */ +- (void)finishSBCDecode; + + +@end +NS_ASSUME_NONNULL_END diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/AudioTransform.h b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/AudioTransform.h new file mode 100644 index 0000000..30e98ce --- /dev/null +++ b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/AudioTransform.h @@ -0,0 +1,16 @@ +// +// AudioTransform.h +// ShangWuMiao +// +// Created by ju on 2017/7/19. +// Copyright © 2017å¹´ ju. All rights reserved. +// + +#import + +@interface AudioTransform : NSObject + ++ (BOOL)convertPcm:(NSString *)pcmPath toMp3:(NSString *)mp3Path; + ++ (BOOL)convertPcm:(NSString *)pcmPath pcmSamplerate:(int)samplerate toMp3:(NSString *)mp3Path ; +@end diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/MSUtils.h b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/MSUtils.h new file mode 100644 index 0000000..39ed23a --- /dev/null +++ b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/MSUtils.h @@ -0,0 +1,40 @@ +// +// AiMouseTools.h +// AiMouse +// +// Created by incar on 2024/2/28. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MSUtils : NSObject ++ (NSArray *)stringToArray:(NSString *)jsonString; ++ (NSString *)arrayToString:(NSArray *)arr; + ++ (NSDictionary *)stringToDictionary:(NSString *)jsonString; ++ (NSString *)dictionaryToString:(NSDictionary *)dic; + ++ (NSDictionary *)dataToDictionary:(NSData *)jsonData; ++ (NSData *)dictionaryToData:(NSDictionary *)dicJson; + + ++ (NSString *)dataToHexString:(NSData *)data; + ++ (NSString *)dataToHexString_placeholder:(NSData *)data; + ++ (NSData *)hexStringToData:(NSString *)hexStr ; + ++ (NSString *)dataToUtf8String:(NSData *)data; + ++ (NSString *)stringTomd5:(NSString *)str; + ++ (NSString *)stringToHmacSha1:(NSString*)key text:(NSString*)text; + ++ (NSString *)MD5ForUpper32:(NSString *)str; + ++ (NSData *)dataWithHexString:(NSString *)hexStr; +@end + +NS_ASSUME_NONNULL_END diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/MixTools.h b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/MixTools.h new file mode 100644 index 0000000..a294dc0 --- /dev/null +++ b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/MixTools.h @@ -0,0 +1,24 @@ +// +// MixTools.h +// MixTools +// +// Created by incar on 2024/12/31. +// + +#import + +//! Project version number for MixTools. +FOUNDATION_EXPORT double MixToolsVersionNumber; + +//! Project version string for MixTools. +FOUNDATION_EXPORT const unsigned char MixToolsVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import +//#import "Tools/MSUtils.h" +//#import "AudioTransform/AudioTransform.h" diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/lame.h b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/lame.h new file mode 100644 index 0000000..791d491 --- /dev/null +++ b/MixSdk/MixSdk/MixSdk/MixTools.framework/Headers/lame.h @@ -0,0 +1,1323 @@ +/* + * Interface to MP3 LAME encoding engine + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* $Id: lame.h,v 1.189.2.1 2012/01/08 23:49:58 robert Exp $ */ + +#ifndef LAME_LAME_H +#define LAME_LAME_H + +/* for size_t typedef */ +#include +/* for va_list typedef */ +#include +/* for FILE typedef, TODO: remove when removing lame_mp3_tags_fid */ +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef void (*lame_report_function)(const char *format, va_list ap); + +#if defined(WIN32) || defined(_WIN32) +#undef CDECL +#define CDECL __cdecl +#else +#define CDECL +#endif + +#define DEPRECATED_OR_OBSOLETE_CODE_REMOVED 1 + +typedef enum vbr_mode_e { + vbr_off=0, + vbr_mt, /* obsolete, same as vbr_mtrh */ + vbr_rh, + vbr_abr, + vbr_mtrh, + vbr_max_indicator, /* Don't use this! It's used for sanity checks. */ + vbr_default=vbr_mtrh /* change this to change the default VBR mode of LAME */ +} vbr_mode; + + +/* MPEG modes */ +typedef enum MPEG_mode_e { + STEREO = 0, + JOINT_STEREO, + DUAL_CHANNEL, /* LAME doesn't supports this! */ + MONO, + NOT_SET, + MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} MPEG_mode; + +/* Padding types */ +typedef enum Padding_type_e { + PAD_NO = 0, + PAD_ALL, + PAD_ADJUST, + PAD_MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} Padding_type; + + + +/*presets*/ +typedef enum preset_mode_e { + /*values from 8 to 320 should be reserved for abr bitrates*/ + /*for abr I'd suggest to directly use the targeted bitrate as a value*/ + ABR_8 = 8, + ABR_320 = 320, + + V9 = 410, /*Vx to match Lame and VBR_xx to match FhG*/ + VBR_10 = 410, + V8 = 420, + VBR_20 = 420, + V7 = 430, + VBR_30 = 430, + V6 = 440, + VBR_40 = 440, + V5 = 450, + VBR_50 = 450, + V4 = 460, + VBR_60 = 460, + V3 = 470, + VBR_70 = 470, + V2 = 480, + VBR_80 = 480, + V1 = 490, + VBR_90 = 490, + V0 = 500, + VBR_100 = 500, + + + + /*still there for compatibility*/ + R3MIX = 1000, + STANDARD = 1001, + EXTREME = 1002, + INSANE = 1003, + STANDARD_FAST = 1004, + EXTREME_FAST = 1005, + MEDIUM = 1006, + MEDIUM_FAST = 1007 +} preset_mode; + + +/*asm optimizations*/ +typedef enum asm_optimizations_e { + MMX = 1, + AMD_3DNOW = 2, + SSE = 3 +} asm_optimizations; + + +/* psychoacoustic model */ +typedef enum Psy_model_e { + PSY_GPSYCHO = 1, + PSY_NSPSYTUNE = 2 +} Psy_model; + + +/* buffer considerations */ +typedef enum buffer_constraint_e { + MDB_DEFAULT=0, + MDB_STRICT_ISO=1, + MDB_MAXIMUM=2 +} buffer_constraint; + + +struct lame_global_struct; +typedef struct lame_global_struct lame_global_flags; +typedef lame_global_flags *lame_t; + + + + +/*********************************************************************** + * + * The LAME API + * These functions should be called, in this order, for each + * MP3 file to be encoded. See the file "API" for more documentation + * + ***********************************************************************/ + + +/* + * REQUIRED: + * initialize the encoder. sets default for all encoder parameters, + * returns NULL if some malloc()'s failed + * otherwise returns pointer to structure needed for all future + * API calls. + */ +lame_global_flags * CDECL lame_init(void); +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* obsolete version */ +int CDECL lame_init_old(lame_global_flags *); +#endif + +/* + * OPTIONAL: + * set as needed to override defaults + */ + +/******************************************************************** + * input stream description + ***********************************************************************/ +/* number of samples. default = 2^32-1 */ +int CDECL lame_set_num_samples(lame_global_flags *, unsigned long); +unsigned long CDECL lame_get_num_samples(const lame_global_flags *); + +/* input sample rate in Hz. default = 44100hz */ +int CDECL lame_set_in_samplerate(lame_global_flags *, int); +int CDECL lame_get_in_samplerate(const lame_global_flags *); + +/* number of channels in input stream. default=2 */ +int CDECL lame_set_num_channels(lame_global_flags *, int); +int CDECL lame_get_num_channels(const lame_global_flags *); + +/* + scale the input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale(lame_global_flags *, float); +float CDECL lame_get_scale(const lame_global_flags *); + +/* + scale the channel 0 (left) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_left(lame_global_flags *, float); +float CDECL lame_get_scale_left(const lame_global_flags *); + +/* + scale the channel 1 (right) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_right(lame_global_flags *, float); +float CDECL lame_get_scale_right(const lame_global_flags *); + +/* + output sample rate in Hz. default = 0, which means LAME picks best value + based on the amount of compression. MPEG only allows: + MPEG1 32, 44.1, 48khz + MPEG2 16, 22.05, 24 + MPEG2.5 8, 11.025, 12 + (not used by decoding routines) +*/ +int CDECL lame_set_out_samplerate(lame_global_flags *, int); +int CDECL lame_get_out_samplerate(const lame_global_flags *); + + +/******************************************************************** + * general control parameters + ***********************************************************************/ +/* 1=cause LAME to collect data for an MP3 frame analyzer. default=0 */ +int CDECL lame_set_analysis(lame_global_flags *, int); +int CDECL lame_get_analysis(const lame_global_flags *); + +/* + 1 = write a Xing VBR header frame. + default = 1 + this variable must have been added by a Hungarian notation Windows programmer :-) +*/ +int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int); +int CDECL lame_get_bWriteVbrTag(const lame_global_flags *); + +/* 1=decode only. use lame/mpglib to convert mp3/ogg to wav. default=0 */ +int CDECL lame_set_decode_only(lame_global_flags *, int); +int CDECL lame_get_decode_only(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* 1=encode a Vorbis .ogg file. default=0 */ +/* DEPRECATED */ +int CDECL lame_set_ogg(lame_global_flags *, int); +int CDECL lame_get_ogg(const lame_global_flags *); +#endif + +/* + internal algorithm selection. True quality is determined by the bitrate + but this variable will effect quality by selecting expensive or cheap algorithms. + quality=0..9. 0=best (very slow). 9=worst. + recommended: 2 near-best quality, not too slow + 5 good quality, fast + 7 ok quality, really fast +*/ +int CDECL lame_set_quality(lame_global_flags *, int); +int CDECL lame_get_quality(const lame_global_flags *); + +/* + mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono + default: lame picks based on compression ration and input channels +*/ +int CDECL lame_set_mode(lame_global_flags *, MPEG_mode); +MPEG_mode CDECL lame_get_mode(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + mode_automs. Use a M/S mode with a switching threshold based on + compression ratio + DEPRECATED +*/ +int CDECL lame_set_mode_automs(lame_global_flags *, int); +int CDECL lame_get_mode_automs(const lame_global_flags *); +#endif + +/* + force_ms. Force M/S for all frames. For testing only. + default = 0 (disabled) +*/ +int CDECL lame_set_force_ms(lame_global_flags *, int); +int CDECL lame_get_force_ms(const lame_global_flags *); + +/* use free_format? default = 0 (disabled) */ +int CDECL lame_set_free_format(lame_global_flags *, int); +int CDECL lame_get_free_format(const lame_global_flags *); + +/* perform ReplayGain analysis? default = 0 (disabled) */ +int CDECL lame_set_findReplayGain(lame_global_flags *, int); +int CDECL lame_get_findReplayGain(const lame_global_flags *); + +/* decode on the fly. Search for the peak sample. If the ReplayGain + * analysis is enabled then perform the analysis on the decoded data + * stream. default = 0 (disabled) + * NOTE: if this option is set the build-in decoder should not be used */ +int CDECL lame_set_decode_on_the_fly(lame_global_flags *, int); +int CDECL lame_get_decode_on_the_fly(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* DEPRECATED: now does the same as lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_input(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_input(const lame_global_flags *); + +/* DEPRECATED: now does the same as + lame_set_decode_on_the_fly() && lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_decode(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_decode(const lame_global_flags *); + +/* DEPRECATED: now does the same as lame_set_decode_on_the_fly() + default = 0 (disabled) */ +int CDECL lame_set_findPeakSample(lame_global_flags *, int); +int CDECL lame_get_findPeakSample(const lame_global_flags *); +#endif + +/* counters for gapless encoding */ +int CDECL lame_set_nogap_total(lame_global_flags*, int); +int CDECL lame_get_nogap_total(const lame_global_flags*); + +int CDECL lame_set_nogap_currentindex(lame_global_flags* , int); +int CDECL lame_get_nogap_currentindex(const lame_global_flags*); + + +/* + * OPTIONAL: + * Set printf like error/debug/message reporting functions. + * The second argument has to be a pointer to a function which looks like + * void my_debugf(const char *format, va_list ap) + * { + * (void) vfprintf(stdout, format, ap); + * } + * If you use NULL as the value of the pointer in the set function, the + * lame buildin function will be used (prints to stderr). + * To quiet any output you have to replace the body of the example function + * with just "return;" and use it in the set function. + */ +int CDECL lame_set_errorf(lame_global_flags *, lame_report_function); +int CDECL lame_set_debugf(lame_global_flags *, lame_report_function); +int CDECL lame_set_msgf (lame_global_flags *, lame_report_function); + + + +/* set one of brate compression ratio. default is compression ratio of 11. */ +int CDECL lame_set_brate(lame_global_flags *, int); +int CDECL lame_get_brate(const lame_global_flags *); +int CDECL lame_set_compression_ratio(lame_global_flags *, float); +float CDECL lame_get_compression_ratio(const lame_global_flags *); + + +int CDECL lame_set_preset( lame_global_flags* gfp, int ); +int CDECL lame_set_asm_optimizations( lame_global_flags* gfp, int, int ); + + + +/******************************************************************** + * frame params + ***********************************************************************/ +/* mark as copyright. default=0 */ +int CDECL lame_set_copyright(lame_global_flags *, int); +int CDECL lame_get_copyright(const lame_global_flags *); + +/* mark as original. default=1 */ +int CDECL lame_set_original(lame_global_flags *, int); +int CDECL lame_get_original(const lame_global_flags *); + +/* error_protection. Use 2 bytes from each frame for CRC checksum. default=0 */ +int CDECL lame_set_error_protection(lame_global_flags *, int); +int CDECL lame_get_error_protection(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* padding_type. 0=pad no frames 1=pad all frames 2=adjust padding(default) */ +int CDECL lame_set_padding_type(lame_global_flags *, Padding_type); +Padding_type CDECL lame_get_padding_type(const lame_global_flags *); +#endif + +/* MP3 'private extension' bit Meaningless. default=0 */ +int CDECL lame_set_extension(lame_global_flags *, int); +int CDECL lame_get_extension(const lame_global_flags *); + +/* enforce strict ISO compliance. default=0 */ +int CDECL lame_set_strict_ISO(lame_global_flags *, int); +int CDECL lame_get_strict_ISO(const lame_global_flags *); + + +/******************************************************************** + * quantization/noise shaping + ***********************************************************************/ + +/* disable the bit reservoir. For testing only. default=0 */ +int CDECL lame_set_disable_reservoir(lame_global_flags *, int); +int CDECL lame_get_disable_reservoir(const lame_global_flags *); + +/* select a different "best quantization" function. default=0 */ +int CDECL lame_set_quant_comp(lame_global_flags *, int); +int CDECL lame_get_quant_comp(const lame_global_flags *); +int CDECL lame_set_quant_comp_short(lame_global_flags *, int); +int CDECL lame_get_quant_comp_short(const lame_global_flags *); + +int CDECL lame_set_experimentalX(lame_global_flags *, int); /* compatibility*/ +int CDECL lame_get_experimentalX(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalY(lame_global_flags *, int); +int CDECL lame_get_experimentalY(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalZ(lame_global_flags *, int); +int CDECL lame_get_experimentalZ(const lame_global_flags *); + +/* Naoki's psycho acoustic model. default=0 */ +int CDECL lame_set_exp_nspsytune(lame_global_flags *, int); +int CDECL lame_get_exp_nspsytune(const lame_global_flags *); + +void CDECL lame_set_msfix(lame_global_flags *, double); +float CDECL lame_get_msfix(const lame_global_flags *); + + +/******************************************************************** + * VBR control + ***********************************************************************/ +/* Types of VBR. default = vbr_off = CBR */ +int CDECL lame_set_VBR(lame_global_flags *, vbr_mode); +vbr_mode CDECL lame_get_VBR(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest */ +int CDECL lame_set_VBR_q(lame_global_flags *, int); +int CDECL lame_get_VBR_q(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest, Range [0,...,10[ */ +int CDECL lame_set_VBR_quality(lame_global_flags *, float); +float CDECL lame_get_VBR_quality(const lame_global_flags *); + +/* Ignored except for VBR=vbr_abr (ABR mode) */ +int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *); + +/* + 1=strictly enforce VBR_min_bitrate. Normally it will be violated for + analog silence +*/ +int CDECL lame_set_VBR_hard_min(lame_global_flags *, int); +int CDECL lame_get_VBR_hard_min(const lame_global_flags *); + +/* for preset */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_set_preset_expopts(lame_global_flags *, int); +#endif + +/******************************************************************** + * Filtering control + ***********************************************************************/ +/* freq in Hz to apply lowpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_lowpassfreq(lame_global_flags *, int); +int CDECL lame_get_lowpassfreq(const lame_global_flags *); +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_lowpasswidth(lame_global_flags *, int); +int CDECL lame_get_lowpasswidth(const lame_global_flags *); + +/* freq in Hz to apply highpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_highpassfreq(lame_global_flags *, int); +int CDECL lame_get_highpassfreq(const lame_global_flags *); +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_highpasswidth(lame_global_flags *, int); +int CDECL lame_get_highpasswidth(const lame_global_flags *); + + +/******************************************************************** + * psycho acoustics and other arguments which you should not change + * unless you know what you are doing + ***********************************************************************/ + +/* only use ATH for masking */ +int CDECL lame_set_ATHonly(lame_global_flags *, int); +int CDECL lame_get_ATHonly(const lame_global_flags *); + +/* only use ATH for short blocks */ +int CDECL lame_set_ATHshort(lame_global_flags *, int); +int CDECL lame_get_ATHshort(const lame_global_flags *); + +/* disable ATH */ +int CDECL lame_set_noATH(lame_global_flags *, int); +int CDECL lame_get_noATH(const lame_global_flags *); + +/* select ATH formula */ +int CDECL lame_set_ATHtype(lame_global_flags *, int); +int CDECL lame_get_ATHtype(const lame_global_flags *); + +/* lower ATH by this many db */ +int CDECL lame_set_ATHlower(lame_global_flags *, float); +float CDECL lame_get_ATHlower(const lame_global_flags *); + +/* select ATH adaptive adjustment type */ +int CDECL lame_set_athaa_type( lame_global_flags *, int); +int CDECL lame_get_athaa_type( const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* select the loudness approximation used by the ATH adaptive auto-leveling */ +int CDECL lame_set_athaa_loudapprox( lame_global_flags *, int); +int CDECL lame_get_athaa_loudapprox( const lame_global_flags *); +#endif + +/* adjust (in dB) the point below which adaptive ATH level adjustment occurs */ +int CDECL lame_set_athaa_sensitivity( lame_global_flags *, float); +float CDECL lame_get_athaa_sensitivity( const lame_global_flags* ); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* OBSOLETE: predictability limit (ISO tonality formula) */ +int CDECL lame_set_cwlimit(lame_global_flags *, int); +int CDECL lame_get_cwlimit(const lame_global_flags *); +#endif + +/* + allow blocktypes to differ between channels? + default: 0 for jstereo, 1 for stereo +*/ +int CDECL lame_set_allow_diff_short(lame_global_flags *, int); +int CDECL lame_get_allow_diff_short(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_useTemporal(lame_global_flags *, int); +int CDECL lame_get_useTemporal(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_interChRatio(lame_global_flags *, float); +float CDECL lame_get_interChRatio(const lame_global_flags *); + +/* disable short blocks */ +int CDECL lame_set_no_short_blocks(lame_global_flags *, int); +int CDECL lame_get_no_short_blocks(const lame_global_flags *); + +/* force short blocks */ +int CDECL lame_set_force_short_blocks(lame_global_flags *, int); +int CDECL lame_get_force_short_blocks(const lame_global_flags *); + +/* Input PCM is emphased PCM (for instance from one of the rarely + emphased CDs), it is STRONGLY not recommended to use this, because + psycho does not take it into account, and last but not least many decoders + ignore these bits */ +int CDECL lame_set_emphasis(lame_global_flags *, int); +int CDECL lame_get_emphasis(const lame_global_flags *); + + + +/************************************************************************/ +/* internal variables, cannot be set... */ +/* provided because they may be of use to calling application */ +/************************************************************************/ +/* version 0=MPEG-2 1=MPEG-1 (2=MPEG-2.5) */ +int CDECL lame_get_version(const lame_global_flags *); + +/* encoder delay */ +int CDECL lame_get_encoder_delay(const lame_global_flags *); + +/* + padding appended to the input to make sure decoder can fully decode + all input. Note that this value can only be calculated during the + call to lame_encoder_flush(). Before lame_encoder_flush() has + been called, the value of encoder_padding = 0. +*/ +int CDECL lame_get_encoder_padding(const lame_global_flags *); + +/* size of MPEG frame */ +int CDECL lame_get_framesize(const lame_global_flags *); + +/* number of PCM samples buffered, but not yet encoded to mp3 data. */ +int CDECL lame_get_mf_samples_to_encode( const lame_global_flags* gfp ); + +/* + size (bytes) of mp3 data buffered, but not yet encoded. + this is the number of bytes which would be output by a call to + lame_encode_flush_nogap. NOTE: lame_encode_flush() will return + more bytes than this because it will encode the reamining buffered + PCM samples before flushing the mp3 buffers. +*/ +int CDECL lame_get_size_mp3buffer( const lame_global_flags* gfp ); + +/* number of frames encoded so far */ +int CDECL lame_get_frameNum(const lame_global_flags *); + +/* + lame's estimate of the total number of frames to be encoded + only valid if calling program set num_samples +*/ +int CDECL lame_get_totalframes(const lame_global_flags *); + +/* RadioGain value. Multiplied by 10 and rounded to the nearest. */ +int CDECL lame_get_RadioGain(const lame_global_flags *); + +/* AudiophileGain value. Multipled by 10 and rounded to the nearest. */ +int CDECL lame_get_AudiophileGain(const lame_global_flags *); + +/* the peak sample */ +float CDECL lame_get_PeakSample(const lame_global_flags *); + +/* Gain change required for preventing clipping. The value is correct only if + peak sample searching was enabled. If negative then the waveform + already does not clip. The value is multiplied by 10 and rounded up. */ +int CDECL lame_get_noclipGainChange(const lame_global_flags *); + +/* user-specified scale factor required for preventing clipping. Value is + correct only if peak sample searching was enabled and no user-specified + scaling was performed. If negative then either the waveform already does + not clip or the value cannot be determined */ +float CDECL lame_get_noclipScale(const lame_global_flags *); + + + + + + + +/* + * REQUIRED: + * sets more internal configuration based on data provided above. + * returns -1 if something failed. + */ +int CDECL lame_init_params(lame_global_flags *); + + +/* + * OPTIONAL: + * get the version number, in a string. of the form: + * "3.63 (beta)" or just "3.63". + */ +const char* CDECL get_lame_version ( void ); +const char* CDECL get_lame_short_version ( void ); +const char* CDECL get_lame_very_short_version ( void ); +const char* CDECL get_psy_version ( void ); +const char* CDECL get_lame_url ( void ); +const char* CDECL get_lame_os_bitness ( void ); + +/* + * OPTIONAL: + * get the version numbers in numerical form. + */ +typedef struct { + /* generic LAME version */ + int major; + int minor; + int alpha; /* 0 if not an alpha version */ + int beta; /* 0 if not a beta version */ + + /* version of the psy model */ + int psy_major; + int psy_minor; + int psy_alpha; /* 0 if not an alpha version */ + int psy_beta; /* 0 if not a beta version */ + + /* compile time features */ + const char *features; /* Don't make assumptions about the contents! */ +} lame_version_t; +void CDECL get_lame_version_numerical(lame_version_t *); + + +/* + * OPTIONAL: + * print internal lame configuration to message handler + */ +void CDECL lame_print_config(const lame_global_flags* gfp); + +void CDECL lame_print_internals( const lame_global_flags *gfp); + + +/* + * input pcm data, output (maybe) mp3 frames. + * This routine handles all buffering, resampling and filtering for you. + * + * return code number of bytes output in mp3buf. Can be 0 + * -1: mp3buf was too small + * -2: malloc() problem + * -3: lame_init_params() not called + * -4: psycho acoustic problems + * + * The required mp3buf_size can be computed from num_samples, + * samplerate and encoding rate, but here is a worst case estimate: + * + * mp3buf_size in bytes = 1.25*num_samples + 7200 + * + * I think a tighter bound could be: (mt, March 2000) + * MPEG1: + * num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512 + * MPEG2: + * num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256 + * + * but test first if you use that! + * + * set mp3buf_size = 0 and LAME will not check if mp3buf_size is + * large enough. + * + * NOTE: + * if gfp->num_channels=2, but gfp->mode = 3 (mono), the L & R channels + * will be averaged into the L channel before encoding only the L channel + * This will overwrite the data in buffer_l[] and buffer_r[]. + * +*/ +int CDECL lame_encode_buffer ( + lame_global_flags* gfp, /* global context handle */ + const short int buffer_l [], /* PCM data for left channel */ + const short int buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* + * as above, but input has L & R channel data interleaved. + * NOTE: + * num_samples = number of samples in the L (or R) + * channel, not the total number of samples in pcm[] + */ +int CDECL lame_encode_buffer_interleaved( + lame_global_flags* gfp, /* global context handlei */ + short int pcm[], /* PCM data for left and right + channel, interleaved */ + int num_samples, /* number of samples per channel, + _not_ number of samples in + pcm[] */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int mp3buf_size ); /* number of valid octets in this + stream */ + + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + */ +int CDECL lame_encode_buffer_float( + lame_global_flags* gfp, /* global context handle */ + const float pcm_l [], /* PCM data for left channel */ + const float pcm_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_float( + lame_t gfp, + const float pcm_l [], /* PCM data for left channel */ + const float pcm_r [], /* PCM data for right channel */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); +int CDECL lame_encode_buffer_interleaved_ieee_float( + lame_t gfp, + const float pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for 'double's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_double( + lame_t gfp, + const double pcm_l [], /* PCM data for left channel */ + const double pcm_r [], /* PCM data for right channel */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); +int CDECL lame_encode_buffer_interleaved_ieee_double( + lame_t gfp, + const double pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for long's + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + * + * This scaling was a mistake (doesn't allow one to exploit full + * precision of type 'long'. Use lame_encode_buffer_long2() instead. + * + */ +int CDECL lame_encode_buffer_long( + lame_global_flags* gfp, /* global context handle */ + const long buffer_l [], /* PCM data for left channel */ + const long buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* Same as lame_encode_buffer_long(), but with correct scaling. + * !! NOTE: !! data must still be scaled to be in the same range as + * type 'long'. Data should be in the range: +/- 2^(8*size(long)-1) + * + */ +int CDECL lame_encode_buffer_long2( + lame_global_flags* gfp, /* global context handle */ + const long buffer_l [], /* PCM data for left channel */ + const long buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for int's + * !! NOTE: !! input should be scaled to the maximum range of 'int' + * If int is 4 bytes, then the values should range from + * +/- 2147483648. + * + * This routine does not (and cannot, without loosing precision) use + * the same scaling as the rest of the lame_encode_buffer() routines. + * + */ +int CDECL lame_encode_buffer_int( + lame_global_flags* gfp, /* global context handle */ + const int buffer_l [], /* PCM data for left channel */ + const int buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + + + + + +/* + * REQUIRED: + * lame_encode_flush will flush the intenal PCM buffers, padding with + * 0's to make sure the final frame is complete, and then flush + * the internal MP3 buffers, and thus may return a + * final few mp3 frames. 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * will also write id3v1 tags (if any) into the bitstream + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush( + lame_global_flags * gfp, /* global context handle */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * lame_encode_flush_nogap will flush the internal mp3 buffers and pad + * the last frame with ancillary data so it is a complete mp3 frame. + * + * 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * After a call to this routine, the outputed mp3 data is complete, but + * you may continue to encode new PCM samples and write future mp3 data + * to a different file. The two mp3 files will play back with no gaps + * if they are concatenated together. + * + * This routine will NOT write id3v1 tags into the bitstream. + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush_nogap( + lame_global_flags * gfp, /* global context handle */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * Normally, this is called by lame_init_params(). It writes id3v2 and + * Xing headers into the front of the bitstream, and sets frame counters + * and bitrate histogram data to 0. You can also call this after + * lame_encode_flush_nogap(). + */ +int CDECL lame_init_bitstream( + lame_global_flags * gfp); /* global context handle */ + + + +/* + * OPTIONAL: some simple statistics + * a bitrate histogram to visualize the distribution of used frame sizes + * a stereo mode histogram to visualize the distribution of used stereo + * modes, useful in joint-stereo mode only + * 0: LR left-right encoded + * 1: LR-I left-right and intensity encoded (currently not supported) + * 2: MS mid-side encoded + * 3: MS-I mid-side and intensity encoded (currently not supported) + * + * attention: don't call them after lame_encode_finish + * suggested: lame_encode_flush -> lame_*_hist -> lame_close + */ + +void CDECL lame_bitrate_hist( + const lame_global_flags * gfp, + int bitrate_count[14] ); +void CDECL lame_bitrate_kbps( + const lame_global_flags * gfp, + int bitrate_kbps [14] ); +void CDECL lame_stereo_mode_hist( + const lame_global_flags * gfp, + int stereo_mode_count[4] ); + +void CDECL lame_bitrate_stereo_mode_hist ( + const lame_global_flags * gfp, + int bitrate_stmode_count[14][4] ); + +void CDECL lame_block_type_hist ( + const lame_global_flags * gfp, + int btype_count[6] ); + +void CDECL lame_bitrate_block_type_hist ( + const lame_global_flags * gfp, + int bitrate_btype_count[14][6] ); + +#if (DEPRECATED_OR_OBSOLETE_CODE_REMOVED && 0) +#else +/* + * OPTIONAL: + * lame_mp3_tags_fid will rewrite a Xing VBR tag to the mp3 file with file + * pointer fid. These calls perform forward and backwards seeks, so make + * sure fid is a real file. Make sure lame_encode_flush has been called, + * and all mp3 data has been written to the file before calling this + * function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME because + * the output is not a regular file, this call does nothing + * NOTE: + * LAME wants to read from the file to skip an optional ID3v2 tag, so + * make sure you opened the file for writing and reading. + * NOTE: + * You can call lame_get_lametag_frame instead, if you want to insert + * the lametag yourself. +*/ +void CDECL lame_mp3_tags_fid(lame_global_flags *, FILE* fid); +#endif + +/* + * OPTIONAL: + * lame_get_lametag_frame copies the final LAME-tag into 'buffer'. + * The function returns the number of bytes copied into buffer, or + * the required buffer size, if the provided buffer is too small. + * Function failed, if the return value is larger than 'size'! + * Make sure lame_encode flush has been called before calling this function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME, + * this call does nothing and returns 0. + * NOTE: + * LAME inserted an empty frame in the beginning of mp3 audio data, + * which you have to replace by the final LAME-tag frame after encoding. + * In case there is no ID3v2 tag, usually this frame will be the very first + * data in your mp3 file. If you put some other leading data into your + * file, you'll have to do some bookkeeping about where to write this buffer. + */ +size_t CDECL lame_get_lametag_frame( + const lame_global_flags *, unsigned char* buffer, size_t size); + +/* + * REQUIRED: + * final call to free all remaining buffers + */ +int CDECL lame_close (lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + * OBSOLETE: + * lame_encode_finish combines lame_encode_flush() and lame_close() in + * one call. However, once this call is made, the statistics routines + * will no longer work because the data will have been cleared, and + * lame_mp3_tags_fid() cannot be called to add data to the VBR header + */ +int CDECL lame_encode_finish( + lame_global_flags* gfp, + unsigned char* mp3buf, + int size ); +#endif + + + + + + +/********************************************************************* + * + * decoding + * + * a simple interface to mpglib, part of mpg123, is also included if + * libmp3lame is compiled with HAVE_MPGLIB + * + *********************************************************************/ + +struct hip_global_struct; +typedef struct hip_global_struct hip_global_flags; +typedef hip_global_flags *hip_t; + + +typedef struct { + int header_parsed; /* 1 if header was parsed and following data was + computed */ + int stereo; /* number of channels */ + int samplerate; /* sample rate */ + int bitrate; /* bitrate */ + int mode; /* mp3 frame type */ + int mode_ext; /* mp3 frame type */ + int framesize; /* number of samples per mp3 frame */ + + /* this data is only computed if mpglib detects a Xing VBR header */ + unsigned long nsamp; /* number of samples in mp3 file. */ + int totalframes; /* total number of frames in mp3 file */ + + /* this data is not currently computed by the mpglib routines */ + int framenum; /* frames decoded counter */ +} mp3data_struct; + +/* required call to initialize decoder */ +hip_t CDECL hip_decode_init(void); + +/* cleanup call to exit decoder */ +int CDECL hip_decode_exit(hip_t gfp); + +/* HIP reporting functions */ +void CDECL hip_set_errorf(hip_t gfp, lame_report_function f); +void CDECL hip_set_debugf(hip_t gfp, lame_report_function f); +void CDECL hip_set_msgf (hip_t gfp, lame_report_function f); + +/********************************************************************* + * input 1 mp3 frame, output (maybe) pcm data. + * + * nout = hip_decode(hip, mp3buf,len,pcm_l,pcm_r); + * + * input: + * len : number of bytes of mp3 data in mp3buf + * mp3buf[len] : mp3 data to be decoded + * + * output: + * nout: -1 : decoding error + * 0 : need more data before we can complete the decode + * >0 : returned 'nout' samples worth of data in pcm_l,pcm_r + * pcm_l[nout] : left channel data + * pcm_r[nout] : right channel data + * + *********************************************************************/ +int CDECL hip_decode( hip_t gfp + , unsigned char * mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + ); + +/* same as hip_decode, and also returns mp3 header data */ +int CDECL hip_decode_headers( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + ); + +/* same as hip_decode, but returns at most one frame */ +int CDECL hip_decode1( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + ); + +/* same as hip_decode1, but returns at most one frame and mp3 header data */ +int CDECL hip_decode1_headers( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + ); + +/* same as hip_decode1_headers, but also returns enc_delay and enc_padding + from VBR Info tag, (-1 if no info tag was found) */ +int CDECL hip_decode1_headersB( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + , int *enc_delay + , int *enc_padding + ); + + + +/* OBSOLETE: + * lame_decode... functions are there to keep old code working + * but it is strongly recommended to replace calls by hip_decode... + * function calls, see above. + */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_decode_init(void); +int CDECL lame_decode( + unsigned char * mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode1_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1_headersB( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data, + int *enc_delay, + int *enc_padding ); +int CDECL lame_decode_exit(void); + +#endif /* obsolete lame_decode API calls */ + + +/********************************************************************* + * + * id3tag stuff + * + *********************************************************************/ + +/* + * id3tag.h -- Interface to write ID3 version 1 and 2 tags. + * + * Copyright (C) 2000 Don Melton. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* utility to obtain alphabetically sorted list of genre names with numbers */ +void CDECL id3tag_genre_list( + void (*handler)(int, const char *, void *), + void* cookie); + +void CDECL id3tag_init (lame_t gfp); + +/* force addition of version 2 tag */ +void CDECL id3tag_add_v2 (lame_t gfp); + +/* add only a version 1 tag */ +void CDECL id3tag_v1_only (lame_t gfp); + +/* add only a version 2 tag */ +void CDECL id3tag_v2_only (lame_t gfp); + +/* pad version 1 tag with spaces instead of nulls */ +void CDECL id3tag_space_v1 (lame_t gfp); + +/* pad version 2 tag with extra 128 bytes */ +void CDECL id3tag_pad_v2 (lame_t gfp); + +/* pad version 2 tag with extra n bytes */ +void CDECL id3tag_set_pad (lame_t gfp, size_t n); + +void CDECL id3tag_set_title(lame_t gfp, const char* title); +void CDECL id3tag_set_artist(lame_t gfp, const char* artist); +void CDECL id3tag_set_album(lame_t gfp, const char* album); +void CDECL id3tag_set_year(lame_t gfp, const char* year); +void CDECL id3tag_set_comment(lame_t gfp, const char* comment); + +/* return -1 result if track number is out of ID3v1 range + and ignored for ID3v1 */ +int CDECL id3tag_set_track(lame_t gfp, const char* track); + +/* return non-zero result if genre name or number is invalid + result 0: OK + result -1: genre number out of range + result -2: no valid ID3v1 genre name, mapped to ID3v1 'Other' + but taken as-is for ID3v2 genre tag */ +int CDECL id3tag_set_genre(lame_t gfp, const char* genre); + +/* return non-zero result if field name is invalid */ +int CDECL id3tag_set_fieldvalue(lame_t gfp, const char* fieldvalue); + +/* return non-zero result if image type is invalid */ +int CDECL id3tag_set_albumart(lame_t gfp, const char* image, size_t size); + +/* lame_get_id3v1_tag copies ID3v1 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v1 tag. + */ +size_t CDECL lame_get_id3v1_tag(lame_t gfp, unsigned char* buffer, size_t size); + +/* lame_get_id3v2_tag copies ID3v2 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v2 tag. + */ +size_t CDECL lame_get_id3v2_tag(lame_t gfp, unsigned char* buffer, size_t size); + +/* normaly lame_init_param writes ID3v2 tags into the audio stream + * Call lame_set_write_id3tag_automatic(gfp, 0) before lame_init_param + * to turn off this behaviour and get ID3v2 tag with above function + * write it yourself into your file. + */ +void CDECL lame_set_write_id3tag_automatic(lame_global_flags * gfp, int); +int CDECL lame_get_write_id3tag_automatic(lame_global_flags const* gfp); + +/* experimental */ +int CDECL id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text); + +/* experimental */ +int CDECL id3tag_set_comment_latin1(lame_t gfp, char const *lang, char const *desc, char const *text); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* experimental */ +int CDECL id3tag_set_textinfo_ucs2(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_ucs2(lame_t gfp, char const *lang, + unsigned short const *desc, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue); +#endif + +/* experimental */ +int CDECL id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue); + +/* experimental */ +int CDECL id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_utf16(lame_t gfp, char const *lang, unsigned short const *desc, unsigned short const *text); + + +/*********************************************************************** +* +* list of valid bitrates [kbps] & sample frequencies [Hz]. +* first index: 0: MPEG-2 values (sample frequencies 16...24 kHz) +* 1: MPEG-1 values (sample frequencies 32...48 kHz) +* 2: MPEG-2.5 values (sample frequencies 8...12 kHz) +***********************************************************************/ + +extern const int bitrate_table [3][16]; +extern const int samplerate_table [3][ 4]; + +/* access functions for use in DLL, global vars are not exported */ +int CDECL lame_get_bitrate(int mpeg_version, int table_index); +int CDECL lame_get_samplerate(int mpeg_version, int table_index); + + +/* maximum size of albumart image (128KB), which affects LAME_MAXMP3BUFFER + as well since lame_encode_buffer() also returns ID3v2 tag data */ +#define LAME_MAXALBUMART (128 * 1024) + +/* maximum size of mp3buffer needed if you encode at most 1152 samples for + each call to lame_encode_buffer. see lame_encode_buffer() below + (LAME_MAXMP3BUFFER is now obsolete) */ +#define LAME_MAXMP3BUFFER (16384 + LAME_MAXALBUMART) + + +typedef enum { + LAME_OKAY = 0, + LAME_NOERROR = 0, + LAME_GENERICERROR = -1, + LAME_NOMEM = -10, + LAME_BADBITRATE = -11, + LAME_BADSAMPFREQ = -12, + LAME_INTERNALERROR = -13, + + FRONTEND_READERROR = -80, + FRONTEND_WRITEERROR = -81, + FRONTEND_FILETOOLARGE = -82 + +} lame_errorcodes_t; + +#if defined(__cplusplus) +} +#endif +#endif /* LAME_LAME_H */ + diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/Info.plist b/MixSdk/MixSdk/MixSdk/MixTools.framework/Info.plist new file mode 100644 index 0000000..a47ce80 Binary files /dev/null and b/MixSdk/MixSdk/MixSdk/MixTools.framework/Info.plist differ diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/MixTools b/MixSdk/MixSdk/MixSdk/MixTools.framework/MixTools new file mode 100644 index 0000000..963aef1 Binary files /dev/null and b/MixSdk/MixSdk/MixSdk/MixTools.framework/MixTools differ diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/Modules/module.modulemap b/MixSdk/MixSdk/MixSdk/MixTools.framework/Modules/module.modulemap new file mode 100644 index 0000000..5411693 --- /dev/null +++ b/MixSdk/MixSdk/MixSdk/MixTools.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module MixTools { + umbrella header "MixTools.h" + export * + + module * { export * } +} diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeDirectory b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..455c9f3 Binary files /dev/null and b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeDirectory differ diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..80852cb Binary files /dev/null and b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements differ diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements-1 b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..e078b29 Binary files /dev/null and b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeResources b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..6fbabec --- /dev/null +++ b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeResources @@ -0,0 +1,192 @@ + + + + + files + + Headers/AiAudioDecoder.h + + A3Zh810PyMMUh42ue7ZPXdxJkHU= + + Headers/AudioTransform.h + + k4E9Ansm+wGS/GaZYe+r8NSDQks= + + Headers/MSUtils.h + + 9JoQIG5aFSdCi5mO+iLuouI3/gc= + + Headers/MixTools.h + + 7dx49dGPerakFG4+vcHVOU7AhWo= + + Headers/lame.h + + uin4nurZztUVRe06GNrXXSQBZ8M= + + Info.plist + + N60nQTWU10Y3EI0v3VDJb9MivqA= + + Modules/module.modulemap + + sy6C4XKTiINkeW4ZdQXItvjWwE0= + + + files2 + + Headers/AiAudioDecoder.h + + hash + + A3Zh810PyMMUh42ue7ZPXdxJkHU= + + hash2 + + VFexMWYR14z30ZGKJmUE+FKxJlWBn19ZkjvB0e7wPgA= + + + Headers/AudioTransform.h + + hash + + k4E9Ansm+wGS/GaZYe+r8NSDQks= + + hash2 + + rp7eu2G8ADRKJFAmwraU3+giyPUIXPaKjPl3K/77Bbc= + + + Headers/MSUtils.h + + hash + + 9JoQIG5aFSdCi5mO+iLuouI3/gc= + + hash2 + + uXz8nXhVfeG3WBAF1ci7tPvKlibJvmt6Muc1R2d/ytw= + + + Headers/MixTools.h + + hash + + 7dx49dGPerakFG4+vcHVOU7AhWo= + + hash2 + + YsM0IA31uFfbESPKe75EcJaIHBbt2JzvzpGrUwBP494= + + + Headers/lame.h + + hash + + uin4nurZztUVRe06GNrXXSQBZ8M= + + hash2 + + QU/rVRE7SOSrovYT7AQQCExDi/Nu7ot7Geju6voBIMI= + + + Modules/module.modulemap + + hash + + sy6C4XKTiINkeW4ZdQXItvjWwE0= + + hash2 + + tIe6ZYJmBe39RbkayzNpzmLiJwIpuKZNCe49+esJyC8= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeSignature b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..ab3ca44 Binary files /dev/null and b/MixSdk/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeSignature differ diff --git a/MixSdk/MixSdk/MixTools.framework/Headers/AiAudioDecoder.h b/MixSdk/MixSdk/MixTools.framework/Headers/AiAudioDecoder.h new file mode 100644 index 0000000..3db02d8 --- /dev/null +++ b/MixSdk/MixSdk/MixTools.framework/Headers/AiAudioDecoder.h @@ -0,0 +1,21 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AiAudioDecoder : NSObject + +@property (nonatomic,copy) void(^onRecvPCMData)(NSData *pcmData); + ++(AiAudioDecoder *)sharedInstance; + + +-(void)startSBCDecodec; + +-(NSData *)decodeSBCData:(NSData*)data; + +/* 释放SBC解码器 */ +- (void)finishSBCDecode; + + +@end +NS_ASSUME_NONNULL_END diff --git a/MixSdk/MixSdk/MixTools.framework/Headers/AudioTransform.h b/MixSdk/MixSdk/MixTools.framework/Headers/AudioTransform.h new file mode 100644 index 0000000..30e98ce --- /dev/null +++ b/MixSdk/MixSdk/MixTools.framework/Headers/AudioTransform.h @@ -0,0 +1,16 @@ +// +// AudioTransform.h +// ShangWuMiao +// +// Created by ju on 2017/7/19. +// Copyright © 2017å¹´ ju. All rights reserved. +// + +#import + +@interface AudioTransform : NSObject + ++ (BOOL)convertPcm:(NSString *)pcmPath toMp3:(NSString *)mp3Path; + ++ (BOOL)convertPcm:(NSString *)pcmPath pcmSamplerate:(int)samplerate toMp3:(NSString *)mp3Path ; +@end diff --git a/MixSdk/MixSdk/MixTools.framework/Headers/MSUtils.h b/MixSdk/MixSdk/MixTools.framework/Headers/MSUtils.h new file mode 100644 index 0000000..39ed23a --- /dev/null +++ b/MixSdk/MixSdk/MixTools.framework/Headers/MSUtils.h @@ -0,0 +1,40 @@ +// +// AiMouseTools.h +// AiMouse +// +// Created by incar on 2024/2/28. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MSUtils : NSObject ++ (NSArray *)stringToArray:(NSString *)jsonString; ++ (NSString *)arrayToString:(NSArray *)arr; + ++ (NSDictionary *)stringToDictionary:(NSString *)jsonString; ++ (NSString *)dictionaryToString:(NSDictionary *)dic; + ++ (NSDictionary *)dataToDictionary:(NSData *)jsonData; ++ (NSData *)dictionaryToData:(NSDictionary *)dicJson; + + ++ (NSString *)dataToHexString:(NSData *)data; + ++ (NSString *)dataToHexString_placeholder:(NSData *)data; + ++ (NSData *)hexStringToData:(NSString *)hexStr ; + ++ (NSString *)dataToUtf8String:(NSData *)data; + ++ (NSString *)stringTomd5:(NSString *)str; + ++ (NSString *)stringToHmacSha1:(NSString*)key text:(NSString*)text; + ++ (NSString *)MD5ForUpper32:(NSString *)str; + ++ (NSData *)dataWithHexString:(NSString *)hexStr; +@end + +NS_ASSUME_NONNULL_END diff --git a/MixSdk/MixSdk/MixTools.framework/Headers/MixTools.h b/MixSdk/MixSdk/MixTools.framework/Headers/MixTools.h new file mode 100644 index 0000000..a294dc0 --- /dev/null +++ b/MixSdk/MixSdk/MixTools.framework/Headers/MixTools.h @@ -0,0 +1,24 @@ +// +// MixTools.h +// MixTools +// +// Created by incar on 2024/12/31. +// + +#import + +//! Project version number for MixTools. +FOUNDATION_EXPORT double MixToolsVersionNumber; + +//! Project version string for MixTools. +FOUNDATION_EXPORT const unsigned char MixToolsVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import +//#import "Tools/MSUtils.h" +//#import "AudioTransform/AudioTransform.h" diff --git a/MixSdk/MixSdk/MixTools.framework/Headers/lame.h b/MixSdk/MixSdk/MixTools.framework/Headers/lame.h new file mode 100644 index 0000000..791d491 --- /dev/null +++ b/MixSdk/MixSdk/MixTools.framework/Headers/lame.h @@ -0,0 +1,1323 @@ +/* + * Interface to MP3 LAME encoding engine + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* $Id: lame.h,v 1.189.2.1 2012/01/08 23:49:58 robert Exp $ */ + +#ifndef LAME_LAME_H +#define LAME_LAME_H + +/* for size_t typedef */ +#include +/* for va_list typedef */ +#include +/* for FILE typedef, TODO: remove when removing lame_mp3_tags_fid */ +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef void (*lame_report_function)(const char *format, va_list ap); + +#if defined(WIN32) || defined(_WIN32) +#undef CDECL +#define CDECL __cdecl +#else +#define CDECL +#endif + +#define DEPRECATED_OR_OBSOLETE_CODE_REMOVED 1 + +typedef enum vbr_mode_e { + vbr_off=0, + vbr_mt, /* obsolete, same as vbr_mtrh */ + vbr_rh, + vbr_abr, + vbr_mtrh, + vbr_max_indicator, /* Don't use this! It's used for sanity checks. */ + vbr_default=vbr_mtrh /* change this to change the default VBR mode of LAME */ +} vbr_mode; + + +/* MPEG modes */ +typedef enum MPEG_mode_e { + STEREO = 0, + JOINT_STEREO, + DUAL_CHANNEL, /* LAME doesn't supports this! */ + MONO, + NOT_SET, + MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} MPEG_mode; + +/* Padding types */ +typedef enum Padding_type_e { + PAD_NO = 0, + PAD_ALL, + PAD_ADJUST, + PAD_MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} Padding_type; + + + +/*presets*/ +typedef enum preset_mode_e { + /*values from 8 to 320 should be reserved for abr bitrates*/ + /*for abr I'd suggest to directly use the targeted bitrate as a value*/ + ABR_8 = 8, + ABR_320 = 320, + + V9 = 410, /*Vx to match Lame and VBR_xx to match FhG*/ + VBR_10 = 410, + V8 = 420, + VBR_20 = 420, + V7 = 430, + VBR_30 = 430, + V6 = 440, + VBR_40 = 440, + V5 = 450, + VBR_50 = 450, + V4 = 460, + VBR_60 = 460, + V3 = 470, + VBR_70 = 470, + V2 = 480, + VBR_80 = 480, + V1 = 490, + VBR_90 = 490, + V0 = 500, + VBR_100 = 500, + + + + /*still there for compatibility*/ + R3MIX = 1000, + STANDARD = 1001, + EXTREME = 1002, + INSANE = 1003, + STANDARD_FAST = 1004, + EXTREME_FAST = 1005, + MEDIUM = 1006, + MEDIUM_FAST = 1007 +} preset_mode; + + +/*asm optimizations*/ +typedef enum asm_optimizations_e { + MMX = 1, + AMD_3DNOW = 2, + SSE = 3 +} asm_optimizations; + + +/* psychoacoustic model */ +typedef enum Psy_model_e { + PSY_GPSYCHO = 1, + PSY_NSPSYTUNE = 2 +} Psy_model; + + +/* buffer considerations */ +typedef enum buffer_constraint_e { + MDB_DEFAULT=0, + MDB_STRICT_ISO=1, + MDB_MAXIMUM=2 +} buffer_constraint; + + +struct lame_global_struct; +typedef struct lame_global_struct lame_global_flags; +typedef lame_global_flags *lame_t; + + + + +/*********************************************************************** + * + * The LAME API + * These functions should be called, in this order, for each + * MP3 file to be encoded. See the file "API" for more documentation + * + ***********************************************************************/ + + +/* + * REQUIRED: + * initialize the encoder. sets default for all encoder parameters, + * returns NULL if some malloc()'s failed + * otherwise returns pointer to structure needed for all future + * API calls. + */ +lame_global_flags * CDECL lame_init(void); +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* obsolete version */ +int CDECL lame_init_old(lame_global_flags *); +#endif + +/* + * OPTIONAL: + * set as needed to override defaults + */ + +/******************************************************************** + * input stream description + ***********************************************************************/ +/* number of samples. default = 2^32-1 */ +int CDECL lame_set_num_samples(lame_global_flags *, unsigned long); +unsigned long CDECL lame_get_num_samples(const lame_global_flags *); + +/* input sample rate in Hz. default = 44100hz */ +int CDECL lame_set_in_samplerate(lame_global_flags *, int); +int CDECL lame_get_in_samplerate(const lame_global_flags *); + +/* number of channels in input stream. default=2 */ +int CDECL lame_set_num_channels(lame_global_flags *, int); +int CDECL lame_get_num_channels(const lame_global_flags *); + +/* + scale the input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale(lame_global_flags *, float); +float CDECL lame_get_scale(const lame_global_flags *); + +/* + scale the channel 0 (left) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_left(lame_global_flags *, float); +float CDECL lame_get_scale_left(const lame_global_flags *); + +/* + scale the channel 1 (right) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_right(lame_global_flags *, float); +float CDECL lame_get_scale_right(const lame_global_flags *); + +/* + output sample rate in Hz. default = 0, which means LAME picks best value + based on the amount of compression. MPEG only allows: + MPEG1 32, 44.1, 48khz + MPEG2 16, 22.05, 24 + MPEG2.5 8, 11.025, 12 + (not used by decoding routines) +*/ +int CDECL lame_set_out_samplerate(lame_global_flags *, int); +int CDECL lame_get_out_samplerate(const lame_global_flags *); + + +/******************************************************************** + * general control parameters + ***********************************************************************/ +/* 1=cause LAME to collect data for an MP3 frame analyzer. default=0 */ +int CDECL lame_set_analysis(lame_global_flags *, int); +int CDECL lame_get_analysis(const lame_global_flags *); + +/* + 1 = write a Xing VBR header frame. + default = 1 + this variable must have been added by a Hungarian notation Windows programmer :-) +*/ +int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int); +int CDECL lame_get_bWriteVbrTag(const lame_global_flags *); + +/* 1=decode only. use lame/mpglib to convert mp3/ogg to wav. default=0 */ +int CDECL lame_set_decode_only(lame_global_flags *, int); +int CDECL lame_get_decode_only(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* 1=encode a Vorbis .ogg file. default=0 */ +/* DEPRECATED */ +int CDECL lame_set_ogg(lame_global_flags *, int); +int CDECL lame_get_ogg(const lame_global_flags *); +#endif + +/* + internal algorithm selection. True quality is determined by the bitrate + but this variable will effect quality by selecting expensive or cheap algorithms. + quality=0..9. 0=best (very slow). 9=worst. + recommended: 2 near-best quality, not too slow + 5 good quality, fast + 7 ok quality, really fast +*/ +int CDECL lame_set_quality(lame_global_flags *, int); +int CDECL lame_get_quality(const lame_global_flags *); + +/* + mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono + default: lame picks based on compression ration and input channels +*/ +int CDECL lame_set_mode(lame_global_flags *, MPEG_mode); +MPEG_mode CDECL lame_get_mode(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + mode_automs. Use a M/S mode with a switching threshold based on + compression ratio + DEPRECATED +*/ +int CDECL lame_set_mode_automs(lame_global_flags *, int); +int CDECL lame_get_mode_automs(const lame_global_flags *); +#endif + +/* + force_ms. Force M/S for all frames. For testing only. + default = 0 (disabled) +*/ +int CDECL lame_set_force_ms(lame_global_flags *, int); +int CDECL lame_get_force_ms(const lame_global_flags *); + +/* use free_format? default = 0 (disabled) */ +int CDECL lame_set_free_format(lame_global_flags *, int); +int CDECL lame_get_free_format(const lame_global_flags *); + +/* perform ReplayGain analysis? default = 0 (disabled) */ +int CDECL lame_set_findReplayGain(lame_global_flags *, int); +int CDECL lame_get_findReplayGain(const lame_global_flags *); + +/* decode on the fly. Search for the peak sample. If the ReplayGain + * analysis is enabled then perform the analysis on the decoded data + * stream. default = 0 (disabled) + * NOTE: if this option is set the build-in decoder should not be used */ +int CDECL lame_set_decode_on_the_fly(lame_global_flags *, int); +int CDECL lame_get_decode_on_the_fly(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* DEPRECATED: now does the same as lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_input(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_input(const lame_global_flags *); + +/* DEPRECATED: now does the same as + lame_set_decode_on_the_fly() && lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_decode(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_decode(const lame_global_flags *); + +/* DEPRECATED: now does the same as lame_set_decode_on_the_fly() + default = 0 (disabled) */ +int CDECL lame_set_findPeakSample(lame_global_flags *, int); +int CDECL lame_get_findPeakSample(const lame_global_flags *); +#endif + +/* counters for gapless encoding */ +int CDECL lame_set_nogap_total(lame_global_flags*, int); +int CDECL lame_get_nogap_total(const lame_global_flags*); + +int CDECL lame_set_nogap_currentindex(lame_global_flags* , int); +int CDECL lame_get_nogap_currentindex(const lame_global_flags*); + + +/* + * OPTIONAL: + * Set printf like error/debug/message reporting functions. + * The second argument has to be a pointer to a function which looks like + * void my_debugf(const char *format, va_list ap) + * { + * (void) vfprintf(stdout, format, ap); + * } + * If you use NULL as the value of the pointer in the set function, the + * lame buildin function will be used (prints to stderr). + * To quiet any output you have to replace the body of the example function + * with just "return;" and use it in the set function. + */ +int CDECL lame_set_errorf(lame_global_flags *, lame_report_function); +int CDECL lame_set_debugf(lame_global_flags *, lame_report_function); +int CDECL lame_set_msgf (lame_global_flags *, lame_report_function); + + + +/* set one of brate compression ratio. default is compression ratio of 11. */ +int CDECL lame_set_brate(lame_global_flags *, int); +int CDECL lame_get_brate(const lame_global_flags *); +int CDECL lame_set_compression_ratio(lame_global_flags *, float); +float CDECL lame_get_compression_ratio(const lame_global_flags *); + + +int CDECL lame_set_preset( lame_global_flags* gfp, int ); +int CDECL lame_set_asm_optimizations( lame_global_flags* gfp, int, int ); + + + +/******************************************************************** + * frame params + ***********************************************************************/ +/* mark as copyright. default=0 */ +int CDECL lame_set_copyright(lame_global_flags *, int); +int CDECL lame_get_copyright(const lame_global_flags *); + +/* mark as original. default=1 */ +int CDECL lame_set_original(lame_global_flags *, int); +int CDECL lame_get_original(const lame_global_flags *); + +/* error_protection. Use 2 bytes from each frame for CRC checksum. default=0 */ +int CDECL lame_set_error_protection(lame_global_flags *, int); +int CDECL lame_get_error_protection(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* padding_type. 0=pad no frames 1=pad all frames 2=adjust padding(default) */ +int CDECL lame_set_padding_type(lame_global_flags *, Padding_type); +Padding_type CDECL lame_get_padding_type(const lame_global_flags *); +#endif + +/* MP3 'private extension' bit Meaningless. default=0 */ +int CDECL lame_set_extension(lame_global_flags *, int); +int CDECL lame_get_extension(const lame_global_flags *); + +/* enforce strict ISO compliance. default=0 */ +int CDECL lame_set_strict_ISO(lame_global_flags *, int); +int CDECL lame_get_strict_ISO(const lame_global_flags *); + + +/******************************************************************** + * quantization/noise shaping + ***********************************************************************/ + +/* disable the bit reservoir. For testing only. default=0 */ +int CDECL lame_set_disable_reservoir(lame_global_flags *, int); +int CDECL lame_get_disable_reservoir(const lame_global_flags *); + +/* select a different "best quantization" function. default=0 */ +int CDECL lame_set_quant_comp(lame_global_flags *, int); +int CDECL lame_get_quant_comp(const lame_global_flags *); +int CDECL lame_set_quant_comp_short(lame_global_flags *, int); +int CDECL lame_get_quant_comp_short(const lame_global_flags *); + +int CDECL lame_set_experimentalX(lame_global_flags *, int); /* compatibility*/ +int CDECL lame_get_experimentalX(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalY(lame_global_flags *, int); +int CDECL lame_get_experimentalY(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalZ(lame_global_flags *, int); +int CDECL lame_get_experimentalZ(const lame_global_flags *); + +/* Naoki's psycho acoustic model. default=0 */ +int CDECL lame_set_exp_nspsytune(lame_global_flags *, int); +int CDECL lame_get_exp_nspsytune(const lame_global_flags *); + +void CDECL lame_set_msfix(lame_global_flags *, double); +float CDECL lame_get_msfix(const lame_global_flags *); + + +/******************************************************************** + * VBR control + ***********************************************************************/ +/* Types of VBR. default = vbr_off = CBR */ +int CDECL lame_set_VBR(lame_global_flags *, vbr_mode); +vbr_mode CDECL lame_get_VBR(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest */ +int CDECL lame_set_VBR_q(lame_global_flags *, int); +int CDECL lame_get_VBR_q(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest, Range [0,...,10[ */ +int CDECL lame_set_VBR_quality(lame_global_flags *, float); +float CDECL lame_get_VBR_quality(const lame_global_flags *); + +/* Ignored except for VBR=vbr_abr (ABR mode) */ +int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *); + +/* + 1=strictly enforce VBR_min_bitrate. Normally it will be violated for + analog silence +*/ +int CDECL lame_set_VBR_hard_min(lame_global_flags *, int); +int CDECL lame_get_VBR_hard_min(const lame_global_flags *); + +/* for preset */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_set_preset_expopts(lame_global_flags *, int); +#endif + +/******************************************************************** + * Filtering control + ***********************************************************************/ +/* freq in Hz to apply lowpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_lowpassfreq(lame_global_flags *, int); +int CDECL lame_get_lowpassfreq(const lame_global_flags *); +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_lowpasswidth(lame_global_flags *, int); +int CDECL lame_get_lowpasswidth(const lame_global_flags *); + +/* freq in Hz to apply highpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_highpassfreq(lame_global_flags *, int); +int CDECL lame_get_highpassfreq(const lame_global_flags *); +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_highpasswidth(lame_global_flags *, int); +int CDECL lame_get_highpasswidth(const lame_global_flags *); + + +/******************************************************************** + * psycho acoustics and other arguments which you should not change + * unless you know what you are doing + ***********************************************************************/ + +/* only use ATH for masking */ +int CDECL lame_set_ATHonly(lame_global_flags *, int); +int CDECL lame_get_ATHonly(const lame_global_flags *); + +/* only use ATH for short blocks */ +int CDECL lame_set_ATHshort(lame_global_flags *, int); +int CDECL lame_get_ATHshort(const lame_global_flags *); + +/* disable ATH */ +int CDECL lame_set_noATH(lame_global_flags *, int); +int CDECL lame_get_noATH(const lame_global_flags *); + +/* select ATH formula */ +int CDECL lame_set_ATHtype(lame_global_flags *, int); +int CDECL lame_get_ATHtype(const lame_global_flags *); + +/* lower ATH by this many db */ +int CDECL lame_set_ATHlower(lame_global_flags *, float); +float CDECL lame_get_ATHlower(const lame_global_flags *); + +/* select ATH adaptive adjustment type */ +int CDECL lame_set_athaa_type( lame_global_flags *, int); +int CDECL lame_get_athaa_type( const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* select the loudness approximation used by the ATH adaptive auto-leveling */ +int CDECL lame_set_athaa_loudapprox( lame_global_flags *, int); +int CDECL lame_get_athaa_loudapprox( const lame_global_flags *); +#endif + +/* adjust (in dB) the point below which adaptive ATH level adjustment occurs */ +int CDECL lame_set_athaa_sensitivity( lame_global_flags *, float); +float CDECL lame_get_athaa_sensitivity( const lame_global_flags* ); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* OBSOLETE: predictability limit (ISO tonality formula) */ +int CDECL lame_set_cwlimit(lame_global_flags *, int); +int CDECL lame_get_cwlimit(const lame_global_flags *); +#endif + +/* + allow blocktypes to differ between channels? + default: 0 for jstereo, 1 for stereo +*/ +int CDECL lame_set_allow_diff_short(lame_global_flags *, int); +int CDECL lame_get_allow_diff_short(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_useTemporal(lame_global_flags *, int); +int CDECL lame_get_useTemporal(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_interChRatio(lame_global_flags *, float); +float CDECL lame_get_interChRatio(const lame_global_flags *); + +/* disable short blocks */ +int CDECL lame_set_no_short_blocks(lame_global_flags *, int); +int CDECL lame_get_no_short_blocks(const lame_global_flags *); + +/* force short blocks */ +int CDECL lame_set_force_short_blocks(lame_global_flags *, int); +int CDECL lame_get_force_short_blocks(const lame_global_flags *); + +/* Input PCM is emphased PCM (for instance from one of the rarely + emphased CDs), it is STRONGLY not recommended to use this, because + psycho does not take it into account, and last but not least many decoders + ignore these bits */ +int CDECL lame_set_emphasis(lame_global_flags *, int); +int CDECL lame_get_emphasis(const lame_global_flags *); + + + +/************************************************************************/ +/* internal variables, cannot be set... */ +/* provided because they may be of use to calling application */ +/************************************************************************/ +/* version 0=MPEG-2 1=MPEG-1 (2=MPEG-2.5) */ +int CDECL lame_get_version(const lame_global_flags *); + +/* encoder delay */ +int CDECL lame_get_encoder_delay(const lame_global_flags *); + +/* + padding appended to the input to make sure decoder can fully decode + all input. Note that this value can only be calculated during the + call to lame_encoder_flush(). Before lame_encoder_flush() has + been called, the value of encoder_padding = 0. +*/ +int CDECL lame_get_encoder_padding(const lame_global_flags *); + +/* size of MPEG frame */ +int CDECL lame_get_framesize(const lame_global_flags *); + +/* number of PCM samples buffered, but not yet encoded to mp3 data. */ +int CDECL lame_get_mf_samples_to_encode( const lame_global_flags* gfp ); + +/* + size (bytes) of mp3 data buffered, but not yet encoded. + this is the number of bytes which would be output by a call to + lame_encode_flush_nogap. NOTE: lame_encode_flush() will return + more bytes than this because it will encode the reamining buffered + PCM samples before flushing the mp3 buffers. +*/ +int CDECL lame_get_size_mp3buffer( const lame_global_flags* gfp ); + +/* number of frames encoded so far */ +int CDECL lame_get_frameNum(const lame_global_flags *); + +/* + lame's estimate of the total number of frames to be encoded + only valid if calling program set num_samples +*/ +int CDECL lame_get_totalframes(const lame_global_flags *); + +/* RadioGain value. Multiplied by 10 and rounded to the nearest. */ +int CDECL lame_get_RadioGain(const lame_global_flags *); + +/* AudiophileGain value. Multipled by 10 and rounded to the nearest. */ +int CDECL lame_get_AudiophileGain(const lame_global_flags *); + +/* the peak sample */ +float CDECL lame_get_PeakSample(const lame_global_flags *); + +/* Gain change required for preventing clipping. The value is correct only if + peak sample searching was enabled. If negative then the waveform + already does not clip. The value is multiplied by 10 and rounded up. */ +int CDECL lame_get_noclipGainChange(const lame_global_flags *); + +/* user-specified scale factor required for preventing clipping. Value is + correct only if peak sample searching was enabled and no user-specified + scaling was performed. If negative then either the waveform already does + not clip or the value cannot be determined */ +float CDECL lame_get_noclipScale(const lame_global_flags *); + + + + + + + +/* + * REQUIRED: + * sets more internal configuration based on data provided above. + * returns -1 if something failed. + */ +int CDECL lame_init_params(lame_global_flags *); + + +/* + * OPTIONAL: + * get the version number, in a string. of the form: + * "3.63 (beta)" or just "3.63". + */ +const char* CDECL get_lame_version ( void ); +const char* CDECL get_lame_short_version ( void ); +const char* CDECL get_lame_very_short_version ( void ); +const char* CDECL get_psy_version ( void ); +const char* CDECL get_lame_url ( void ); +const char* CDECL get_lame_os_bitness ( void ); + +/* + * OPTIONAL: + * get the version numbers in numerical form. + */ +typedef struct { + /* generic LAME version */ + int major; + int minor; + int alpha; /* 0 if not an alpha version */ + int beta; /* 0 if not a beta version */ + + /* version of the psy model */ + int psy_major; + int psy_minor; + int psy_alpha; /* 0 if not an alpha version */ + int psy_beta; /* 0 if not a beta version */ + + /* compile time features */ + const char *features; /* Don't make assumptions about the contents! */ +} lame_version_t; +void CDECL get_lame_version_numerical(lame_version_t *); + + +/* + * OPTIONAL: + * print internal lame configuration to message handler + */ +void CDECL lame_print_config(const lame_global_flags* gfp); + +void CDECL lame_print_internals( const lame_global_flags *gfp); + + +/* + * input pcm data, output (maybe) mp3 frames. + * This routine handles all buffering, resampling and filtering for you. + * + * return code number of bytes output in mp3buf. Can be 0 + * -1: mp3buf was too small + * -2: malloc() problem + * -3: lame_init_params() not called + * -4: psycho acoustic problems + * + * The required mp3buf_size can be computed from num_samples, + * samplerate and encoding rate, but here is a worst case estimate: + * + * mp3buf_size in bytes = 1.25*num_samples + 7200 + * + * I think a tighter bound could be: (mt, March 2000) + * MPEG1: + * num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512 + * MPEG2: + * num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256 + * + * but test first if you use that! + * + * set mp3buf_size = 0 and LAME will not check if mp3buf_size is + * large enough. + * + * NOTE: + * if gfp->num_channels=2, but gfp->mode = 3 (mono), the L & R channels + * will be averaged into the L channel before encoding only the L channel + * This will overwrite the data in buffer_l[] and buffer_r[]. + * +*/ +int CDECL lame_encode_buffer ( + lame_global_flags* gfp, /* global context handle */ + const short int buffer_l [], /* PCM data for left channel */ + const short int buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* + * as above, but input has L & R channel data interleaved. + * NOTE: + * num_samples = number of samples in the L (or R) + * channel, not the total number of samples in pcm[] + */ +int CDECL lame_encode_buffer_interleaved( + lame_global_flags* gfp, /* global context handlei */ + short int pcm[], /* PCM data for left and right + channel, interleaved */ + int num_samples, /* number of samples per channel, + _not_ number of samples in + pcm[] */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int mp3buf_size ); /* number of valid octets in this + stream */ + + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + */ +int CDECL lame_encode_buffer_float( + lame_global_flags* gfp, /* global context handle */ + const float pcm_l [], /* PCM data for left channel */ + const float pcm_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_float( + lame_t gfp, + const float pcm_l [], /* PCM data for left channel */ + const float pcm_r [], /* PCM data for right channel */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); +int CDECL lame_encode_buffer_interleaved_ieee_float( + lame_t gfp, + const float pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for 'double's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_double( + lame_t gfp, + const double pcm_l [], /* PCM data for left channel */ + const double pcm_r [], /* PCM data for right channel */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); +int CDECL lame_encode_buffer_interleaved_ieee_double( + lame_t gfp, + const double pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for long's + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + * + * This scaling was a mistake (doesn't allow one to exploit full + * precision of type 'long'. Use lame_encode_buffer_long2() instead. + * + */ +int CDECL lame_encode_buffer_long( + lame_global_flags* gfp, /* global context handle */ + const long buffer_l [], /* PCM data for left channel */ + const long buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* Same as lame_encode_buffer_long(), but with correct scaling. + * !! NOTE: !! data must still be scaled to be in the same range as + * type 'long'. Data should be in the range: +/- 2^(8*size(long)-1) + * + */ +int CDECL lame_encode_buffer_long2( + lame_global_flags* gfp, /* global context handle */ + const long buffer_l [], /* PCM data for left channel */ + const long buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for int's + * !! NOTE: !! input should be scaled to the maximum range of 'int' + * If int is 4 bytes, then the values should range from + * +/- 2147483648. + * + * This routine does not (and cannot, without loosing precision) use + * the same scaling as the rest of the lame_encode_buffer() routines. + * + */ +int CDECL lame_encode_buffer_int( + lame_global_flags* gfp, /* global context handle */ + const int buffer_l [], /* PCM data for left channel */ + const int buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + + + + + +/* + * REQUIRED: + * lame_encode_flush will flush the intenal PCM buffers, padding with + * 0's to make sure the final frame is complete, and then flush + * the internal MP3 buffers, and thus may return a + * final few mp3 frames. 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * will also write id3v1 tags (if any) into the bitstream + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush( + lame_global_flags * gfp, /* global context handle */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * lame_encode_flush_nogap will flush the internal mp3 buffers and pad + * the last frame with ancillary data so it is a complete mp3 frame. + * + * 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * After a call to this routine, the outputed mp3 data is complete, but + * you may continue to encode new PCM samples and write future mp3 data + * to a different file. The two mp3 files will play back with no gaps + * if they are concatenated together. + * + * This routine will NOT write id3v1 tags into the bitstream. + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush_nogap( + lame_global_flags * gfp, /* global context handle */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * Normally, this is called by lame_init_params(). It writes id3v2 and + * Xing headers into the front of the bitstream, and sets frame counters + * and bitrate histogram data to 0. You can also call this after + * lame_encode_flush_nogap(). + */ +int CDECL lame_init_bitstream( + lame_global_flags * gfp); /* global context handle */ + + + +/* + * OPTIONAL: some simple statistics + * a bitrate histogram to visualize the distribution of used frame sizes + * a stereo mode histogram to visualize the distribution of used stereo + * modes, useful in joint-stereo mode only + * 0: LR left-right encoded + * 1: LR-I left-right and intensity encoded (currently not supported) + * 2: MS mid-side encoded + * 3: MS-I mid-side and intensity encoded (currently not supported) + * + * attention: don't call them after lame_encode_finish + * suggested: lame_encode_flush -> lame_*_hist -> lame_close + */ + +void CDECL lame_bitrate_hist( + const lame_global_flags * gfp, + int bitrate_count[14] ); +void CDECL lame_bitrate_kbps( + const lame_global_flags * gfp, + int bitrate_kbps [14] ); +void CDECL lame_stereo_mode_hist( + const lame_global_flags * gfp, + int stereo_mode_count[4] ); + +void CDECL lame_bitrate_stereo_mode_hist ( + const lame_global_flags * gfp, + int bitrate_stmode_count[14][4] ); + +void CDECL lame_block_type_hist ( + const lame_global_flags * gfp, + int btype_count[6] ); + +void CDECL lame_bitrate_block_type_hist ( + const lame_global_flags * gfp, + int bitrate_btype_count[14][6] ); + +#if (DEPRECATED_OR_OBSOLETE_CODE_REMOVED && 0) +#else +/* + * OPTIONAL: + * lame_mp3_tags_fid will rewrite a Xing VBR tag to the mp3 file with file + * pointer fid. These calls perform forward and backwards seeks, so make + * sure fid is a real file. Make sure lame_encode_flush has been called, + * and all mp3 data has been written to the file before calling this + * function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME because + * the output is not a regular file, this call does nothing + * NOTE: + * LAME wants to read from the file to skip an optional ID3v2 tag, so + * make sure you opened the file for writing and reading. + * NOTE: + * You can call lame_get_lametag_frame instead, if you want to insert + * the lametag yourself. +*/ +void CDECL lame_mp3_tags_fid(lame_global_flags *, FILE* fid); +#endif + +/* + * OPTIONAL: + * lame_get_lametag_frame copies the final LAME-tag into 'buffer'. + * The function returns the number of bytes copied into buffer, or + * the required buffer size, if the provided buffer is too small. + * Function failed, if the return value is larger than 'size'! + * Make sure lame_encode flush has been called before calling this function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME, + * this call does nothing and returns 0. + * NOTE: + * LAME inserted an empty frame in the beginning of mp3 audio data, + * which you have to replace by the final LAME-tag frame after encoding. + * In case there is no ID3v2 tag, usually this frame will be the very first + * data in your mp3 file. If you put some other leading data into your + * file, you'll have to do some bookkeeping about where to write this buffer. + */ +size_t CDECL lame_get_lametag_frame( + const lame_global_flags *, unsigned char* buffer, size_t size); + +/* + * REQUIRED: + * final call to free all remaining buffers + */ +int CDECL lame_close (lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + * OBSOLETE: + * lame_encode_finish combines lame_encode_flush() and lame_close() in + * one call. However, once this call is made, the statistics routines + * will no longer work because the data will have been cleared, and + * lame_mp3_tags_fid() cannot be called to add data to the VBR header + */ +int CDECL lame_encode_finish( + lame_global_flags* gfp, + unsigned char* mp3buf, + int size ); +#endif + + + + + + +/********************************************************************* + * + * decoding + * + * a simple interface to mpglib, part of mpg123, is also included if + * libmp3lame is compiled with HAVE_MPGLIB + * + *********************************************************************/ + +struct hip_global_struct; +typedef struct hip_global_struct hip_global_flags; +typedef hip_global_flags *hip_t; + + +typedef struct { + int header_parsed; /* 1 if header was parsed and following data was + computed */ + int stereo; /* number of channels */ + int samplerate; /* sample rate */ + int bitrate; /* bitrate */ + int mode; /* mp3 frame type */ + int mode_ext; /* mp3 frame type */ + int framesize; /* number of samples per mp3 frame */ + + /* this data is only computed if mpglib detects a Xing VBR header */ + unsigned long nsamp; /* number of samples in mp3 file. */ + int totalframes; /* total number of frames in mp3 file */ + + /* this data is not currently computed by the mpglib routines */ + int framenum; /* frames decoded counter */ +} mp3data_struct; + +/* required call to initialize decoder */ +hip_t CDECL hip_decode_init(void); + +/* cleanup call to exit decoder */ +int CDECL hip_decode_exit(hip_t gfp); + +/* HIP reporting functions */ +void CDECL hip_set_errorf(hip_t gfp, lame_report_function f); +void CDECL hip_set_debugf(hip_t gfp, lame_report_function f); +void CDECL hip_set_msgf (hip_t gfp, lame_report_function f); + +/********************************************************************* + * input 1 mp3 frame, output (maybe) pcm data. + * + * nout = hip_decode(hip, mp3buf,len,pcm_l,pcm_r); + * + * input: + * len : number of bytes of mp3 data in mp3buf + * mp3buf[len] : mp3 data to be decoded + * + * output: + * nout: -1 : decoding error + * 0 : need more data before we can complete the decode + * >0 : returned 'nout' samples worth of data in pcm_l,pcm_r + * pcm_l[nout] : left channel data + * pcm_r[nout] : right channel data + * + *********************************************************************/ +int CDECL hip_decode( hip_t gfp + , unsigned char * mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + ); + +/* same as hip_decode, and also returns mp3 header data */ +int CDECL hip_decode_headers( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + ); + +/* same as hip_decode, but returns at most one frame */ +int CDECL hip_decode1( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + ); + +/* same as hip_decode1, but returns at most one frame and mp3 header data */ +int CDECL hip_decode1_headers( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + ); + +/* same as hip_decode1_headers, but also returns enc_delay and enc_padding + from VBR Info tag, (-1 if no info tag was found) */ +int CDECL hip_decode1_headersB( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + , int *enc_delay + , int *enc_padding + ); + + + +/* OBSOLETE: + * lame_decode... functions are there to keep old code working + * but it is strongly recommended to replace calls by hip_decode... + * function calls, see above. + */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_decode_init(void); +int CDECL lame_decode( + unsigned char * mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode1_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1_headersB( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data, + int *enc_delay, + int *enc_padding ); +int CDECL lame_decode_exit(void); + +#endif /* obsolete lame_decode API calls */ + + +/********************************************************************* + * + * id3tag stuff + * + *********************************************************************/ + +/* + * id3tag.h -- Interface to write ID3 version 1 and 2 tags. + * + * Copyright (C) 2000 Don Melton. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* utility to obtain alphabetically sorted list of genre names with numbers */ +void CDECL id3tag_genre_list( + void (*handler)(int, const char *, void *), + void* cookie); + +void CDECL id3tag_init (lame_t gfp); + +/* force addition of version 2 tag */ +void CDECL id3tag_add_v2 (lame_t gfp); + +/* add only a version 1 tag */ +void CDECL id3tag_v1_only (lame_t gfp); + +/* add only a version 2 tag */ +void CDECL id3tag_v2_only (lame_t gfp); + +/* pad version 1 tag with spaces instead of nulls */ +void CDECL id3tag_space_v1 (lame_t gfp); + +/* pad version 2 tag with extra 128 bytes */ +void CDECL id3tag_pad_v2 (lame_t gfp); + +/* pad version 2 tag with extra n bytes */ +void CDECL id3tag_set_pad (lame_t gfp, size_t n); + +void CDECL id3tag_set_title(lame_t gfp, const char* title); +void CDECL id3tag_set_artist(lame_t gfp, const char* artist); +void CDECL id3tag_set_album(lame_t gfp, const char* album); +void CDECL id3tag_set_year(lame_t gfp, const char* year); +void CDECL id3tag_set_comment(lame_t gfp, const char* comment); + +/* return -1 result if track number is out of ID3v1 range + and ignored for ID3v1 */ +int CDECL id3tag_set_track(lame_t gfp, const char* track); + +/* return non-zero result if genre name or number is invalid + result 0: OK + result -1: genre number out of range + result -2: no valid ID3v1 genre name, mapped to ID3v1 'Other' + but taken as-is for ID3v2 genre tag */ +int CDECL id3tag_set_genre(lame_t gfp, const char* genre); + +/* return non-zero result if field name is invalid */ +int CDECL id3tag_set_fieldvalue(lame_t gfp, const char* fieldvalue); + +/* return non-zero result if image type is invalid */ +int CDECL id3tag_set_albumart(lame_t gfp, const char* image, size_t size); + +/* lame_get_id3v1_tag copies ID3v1 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v1 tag. + */ +size_t CDECL lame_get_id3v1_tag(lame_t gfp, unsigned char* buffer, size_t size); + +/* lame_get_id3v2_tag copies ID3v2 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v2 tag. + */ +size_t CDECL lame_get_id3v2_tag(lame_t gfp, unsigned char* buffer, size_t size); + +/* normaly lame_init_param writes ID3v2 tags into the audio stream + * Call lame_set_write_id3tag_automatic(gfp, 0) before lame_init_param + * to turn off this behaviour and get ID3v2 tag with above function + * write it yourself into your file. + */ +void CDECL lame_set_write_id3tag_automatic(lame_global_flags * gfp, int); +int CDECL lame_get_write_id3tag_automatic(lame_global_flags const* gfp); + +/* experimental */ +int CDECL id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text); + +/* experimental */ +int CDECL id3tag_set_comment_latin1(lame_t gfp, char const *lang, char const *desc, char const *text); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* experimental */ +int CDECL id3tag_set_textinfo_ucs2(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_ucs2(lame_t gfp, char const *lang, + unsigned short const *desc, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue); +#endif + +/* experimental */ +int CDECL id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue); + +/* experimental */ +int CDECL id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_utf16(lame_t gfp, char const *lang, unsigned short const *desc, unsigned short const *text); + + +/*********************************************************************** +* +* list of valid bitrates [kbps] & sample frequencies [Hz]. +* first index: 0: MPEG-2 values (sample frequencies 16...24 kHz) +* 1: MPEG-1 values (sample frequencies 32...48 kHz) +* 2: MPEG-2.5 values (sample frequencies 8...12 kHz) +***********************************************************************/ + +extern const int bitrate_table [3][16]; +extern const int samplerate_table [3][ 4]; + +/* access functions for use in DLL, global vars are not exported */ +int CDECL lame_get_bitrate(int mpeg_version, int table_index); +int CDECL lame_get_samplerate(int mpeg_version, int table_index); + + +/* maximum size of albumart image (128KB), which affects LAME_MAXMP3BUFFER + as well since lame_encode_buffer() also returns ID3v2 tag data */ +#define LAME_MAXALBUMART (128 * 1024) + +/* maximum size of mp3buffer needed if you encode at most 1152 samples for + each call to lame_encode_buffer. see lame_encode_buffer() below + (LAME_MAXMP3BUFFER is now obsolete) */ +#define LAME_MAXMP3BUFFER (16384 + LAME_MAXALBUMART) + + +typedef enum { + LAME_OKAY = 0, + LAME_NOERROR = 0, + LAME_GENERICERROR = -1, + LAME_NOMEM = -10, + LAME_BADBITRATE = -11, + LAME_BADSAMPFREQ = -12, + LAME_INTERNALERROR = -13, + + FRONTEND_READERROR = -80, + FRONTEND_WRITEERROR = -81, + FRONTEND_FILETOOLARGE = -82 + +} lame_errorcodes_t; + +#if defined(__cplusplus) +} +#endif +#endif /* LAME_LAME_H */ + diff --git a/MixSdk/MixSdk/MixTools.framework/Info.plist b/MixSdk/MixSdk/MixTools.framework/Info.plist new file mode 100644 index 0000000..a47ce80 Binary files /dev/null and b/MixSdk/MixSdk/MixTools.framework/Info.plist differ diff --git a/MixSdk/MixSdk/MixTools.framework/MixTools b/MixSdk/MixSdk/MixTools.framework/MixTools new file mode 100644 index 0000000..963aef1 Binary files /dev/null and b/MixSdk/MixSdk/MixTools.framework/MixTools differ diff --git a/MixSdk/MixSdk/MixTools.framework/Modules/module.modulemap b/MixSdk/MixSdk/MixTools.framework/Modules/module.modulemap new file mode 100644 index 0000000..5411693 --- /dev/null +++ b/MixSdk/MixSdk/MixTools.framework/Modules/module.modulemap @@ -0,0 +1,6 @@ +framework module MixTools { + umbrella header "MixTools.h" + export * + + module * { export * } +} diff --git a/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeDirectory b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeDirectory new file mode 100644 index 0000000..455c9f3 Binary files /dev/null and b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeDirectory differ diff --git a/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements new file mode 100644 index 0000000..80852cb Binary files /dev/null and b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements differ diff --git a/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements-1 b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements-1 new file mode 100644 index 0000000..e078b29 Binary files /dev/null and b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeRequirements-1 differ diff --git a/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeResources b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeResources new file mode 100644 index 0000000..6fbabec --- /dev/null +++ b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeResources @@ -0,0 +1,192 @@ + + + + + files + + Headers/AiAudioDecoder.h + + A3Zh810PyMMUh42ue7ZPXdxJkHU= + + Headers/AudioTransform.h + + k4E9Ansm+wGS/GaZYe+r8NSDQks= + + Headers/MSUtils.h + + 9JoQIG5aFSdCi5mO+iLuouI3/gc= + + Headers/MixTools.h + + 7dx49dGPerakFG4+vcHVOU7AhWo= + + Headers/lame.h + + uin4nurZztUVRe06GNrXXSQBZ8M= + + Info.plist + + N60nQTWU10Y3EI0v3VDJb9MivqA= + + Modules/module.modulemap + + sy6C4XKTiINkeW4ZdQXItvjWwE0= + + + files2 + + Headers/AiAudioDecoder.h + + hash + + A3Zh810PyMMUh42ue7ZPXdxJkHU= + + hash2 + + VFexMWYR14z30ZGKJmUE+FKxJlWBn19ZkjvB0e7wPgA= + + + Headers/AudioTransform.h + + hash + + k4E9Ansm+wGS/GaZYe+r8NSDQks= + + hash2 + + rp7eu2G8ADRKJFAmwraU3+giyPUIXPaKjPl3K/77Bbc= + + + Headers/MSUtils.h + + hash + + 9JoQIG5aFSdCi5mO+iLuouI3/gc= + + hash2 + + uXz8nXhVfeG3WBAF1ci7tPvKlibJvmt6Muc1R2d/ytw= + + + Headers/MixTools.h + + hash + + 7dx49dGPerakFG4+vcHVOU7AhWo= + + hash2 + + YsM0IA31uFfbESPKe75EcJaIHBbt2JzvzpGrUwBP494= + + + Headers/lame.h + + hash + + uin4nurZztUVRe06GNrXXSQBZ8M= + + hash2 + + QU/rVRE7SOSrovYT7AQQCExDi/Nu7ot7Geju6voBIMI= + + + Modules/module.modulemap + + hash + + sy6C4XKTiINkeW4ZdQXItvjWwE0= + + hash2 + + tIe6ZYJmBe39RbkayzNpzmLiJwIpuKZNCe49+esJyC8= + + + + rules + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^version.plist$ + + + rules2 + + .*\.dSYM($|/) + + weight + 11 + + ^(.*/)?\.DS_Store$ + + omit + + weight + 2000 + + ^.* + + ^.*\.lproj/ + + optional + + weight + 1000 + + ^.*\.lproj/locversion.plist$ + + omit + + weight + 1100 + + ^Base\.lproj/ + + weight + 1010 + + ^Info\.plist$ + + omit + + weight + 20 + + ^PkgInfo$ + + omit + + weight + 20 + + ^embedded\.provisionprofile$ + + weight + 20 + + ^version\.plist$ + + weight + 20 + + + + diff --git a/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeSignature b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeSignature new file mode 100644 index 0000000..ab3ca44 Binary files /dev/null and b/MixSdk/MixSdk/MixTools.framework/_CodeSignature/CodeSignature differ diff --git a/MixSdk/MixTools/MixTools/Test.h b/MixSdk/MixTools/MixTools/Test.h deleted file mode 100644 index 3a53e8f..0000000 --- a/MixSdk/MixTools/MixTools/Test.h +++ /dev/null @@ -1,18 +0,0 @@ -// -// Test.h -// MixTools -// -// Created by incar on 2024/12/31. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface Test : NSObject - -- (void)add; - -@end - -NS_ASSUME_NONNULL_END diff --git a/MixSdk/MixTools/MixTools/Test.m b/MixSdk/MixTools/MixTools/Test.m deleted file mode 100644 index 5d99b52..0000000 --- a/MixSdk/MixTools/MixTools/Test.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// Test.m -// MixTools -// -// Created by incar on 2024/12/31. -// - -#import "Test.h" - -@implementation Test - -- (void)add{ - NSLog(@"00000000"); -} -@end diff --git a/MixSdk_iOS_v2025010201.zip b/MixSdk_iOS_v2025010201.zip new file mode 100644 index 0000000..97bacbc Binary files /dev/null and b/MixSdk_iOS_v2025010201.zip differ diff --git a/MixSdk/MixTools/MixTools/MixTools.xcodeproj/project.pbxproj b/MixTools/MixTools/MixTools.xcodeproj/project.pbxproj similarity index 98% rename from MixSdk/MixTools/MixTools/MixTools.xcodeproj/project.pbxproj rename to MixTools/MixTools/MixTools.xcodeproj/project.pbxproj index efdc595..0b2d26b 100644 --- a/MixSdk/MixTools/MixTools/MixTools.xcodeproj/project.pbxproj +++ b/MixTools/MixTools/MixTools.xcodeproj/project.pbxproj @@ -8,11 +8,9 @@ /* Begin PBXBuildFile section */ 1830C7342D23BD9B000DA10D /* MixTools.h in Headers */ = {isa = PBXBuildFile; fileRef = 1830C7332D23BD9B000DA10D /* MixTools.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1830C73C2D23BDF3000DA10D /* Test.h in Headers */ = {isa = PBXBuildFile; fileRef = 1830C73A2D23BDF3000DA10D /* Test.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1830C73D2D23BDF3000DA10D /* Test.m in Sources */ = {isa = PBXBuildFile; fileRef = 1830C73B2D23BDF3000DA10D /* Test.m */; }; 1830C74B2D23C9BC000DA10D /* MSUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1830C7492D23C9BC000DA10D /* MSUtils.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1830C74C2D23C9BC000DA10D /* MSUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 1830C74A2D23C9BC000DA10D /* MSUtils.m */; }; - 1830C7562D23CB86000DA10D /* lame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1830C7512D23CB86000DA10D /* lame.h */; }; + 1830C7562D23CB86000DA10D /* lame.h in Headers */ = {isa = PBXBuildFile; fileRef = 1830C7512D23CB86000DA10D /* lame.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1830C7572D23CB86000DA10D /* libmp3lame.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1830C7532D23CB86000DA10D /* libmp3lame.a */; }; 1830C7582D23CB86000DA10D /* AudioTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = 1830C7542D23CB86000DA10D /* AudioTransform.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1830C7592D23CB86000DA10D /* AudioTransform.m in Sources */ = {isa = PBXBuildFile; fileRef = 1830C7552D23CB86000DA10D /* AudioTransform.m */; }; @@ -155,8 +153,6 @@ /* Begin PBXFileReference section */ 1830C7302D23BD9B000DA10D /* MixTools.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MixTools.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1830C7332D23BD9B000DA10D /* MixTools.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MixTools.h; sourceTree = ""; }; - 1830C73A2D23BDF3000DA10D /* Test.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Test.h; sourceTree = ""; }; - 1830C73B2D23BDF3000DA10D /* Test.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = Test.m; sourceTree = ""; }; 1830C7492D23C9BC000DA10D /* MSUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MSUtils.h; sourceTree = ""; }; 1830C74A2D23C9BC000DA10D /* MSUtils.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MSUtils.m; sourceTree = ""; }; 1830C7512D23CB86000DA10D /* lame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lame.h; sourceTree = ""; }; @@ -321,8 +317,6 @@ 1830C7262D23BD9B000DA10D = { isa = PBXGroup; children = ( - 1830C73A2D23BDF3000DA10D /* Test.h */, - 1830C73B2D23BDF3000DA10D /* Test.m */, 1830C7322D23BD9B000DA10D /* MixTools */, 1830C7312D23BD9B000DA10D /* Products */, ); @@ -395,9 +389,9 @@ isa = PBXGroup; children = ( 1830C7672D23CCDF000DA10D /* FFmpeg-iOS */, + 1830C75D2D23CC6D000DA10D /* AiAudioDecoder.h */, 1830C75B2D23CC6D000DA10D /* AiAudioDecoder.m */, 1830C75C2D23CC6D000DA10D /* AudioConvert.m */, - 1830C75D2D23CC6D000DA10D /* AiAudioDecoder.h */, 1830C75E2D23CC6D000DA10D /* AudioConvert.h */, ); path = AudioDecode; @@ -663,7 +657,6 @@ 1830C8592D23CCE0000DA10D /* qsv.h in Headers */, 1830C8022D23CCDF000DA10D /* stereo3d.h in Headers */, 1830C8302D23CCE0000DA10D /* aes.h in Headers */, - 1830C73C2D23BDF3000DA10D /* Test.h in Headers */, 1830C8372D23CCE0000DA10D /* des.h in Headers */, 1830C8362D23CCE0000DA10D /* lzo.h in Headers */, 1830C86A2D23CCE0000DA10D /* dxva2.h in Headers */, @@ -821,7 +814,6 @@ buildActionMask = 2147483647; files = ( 1830C7612D23CC6D000DA10D /* AudioConvert.m in Sources */, - 1830C73D2D23BDF3000DA10D /* Test.m in Sources */, 1830C7602D23CC6D000DA10D /* AiAudioDecoder.m in Sources */, 1830C7592D23CB86000DA10D /* AudioTransform.m in Sources */, 1830C74C2D23C9BC000DA10D /* MSUtils.m in Sources */, diff --git a/MixSdk/MixTools/MixTools/MixTools.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/MixTools/MixTools/MixTools.xcodeproj/project.xcworkspace/contents.xcworkspacedata similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename to MixTools/MixTools/MixTools.xcodeproj/project.xcworkspace/contents.xcworkspacedata diff --git a/MixSdk/MixTools/MixTools/MixTools.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/MixTools/MixTools/MixTools.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist rename to MixTools/MixTools/MixTools.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist diff --git a/MixSdk/MixTools/MixTools/MixTools.xcodeproj/xcshareddata/xcschemes/MixTools.xcscheme b/MixTools/MixTools/MixTools.xcodeproj/xcshareddata/xcschemes/MixTools.xcscheme similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools.xcodeproj/xcshareddata/xcschemes/MixTools.xcscheme rename to MixTools/MixTools/MixTools.xcodeproj/xcshareddata/xcschemes/MixTools.xcscheme diff --git a/MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.h b/MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.h new file mode 100644 index 0000000..3db02d8 --- /dev/null +++ b/MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.h @@ -0,0 +1,21 @@ +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface AiAudioDecoder : NSObject + +@property (nonatomic,copy) void(^onRecvPCMData)(NSData *pcmData); + ++(AiAudioDecoder *)sharedInstance; + + +-(void)startSBCDecodec; + +-(NSData *)decodeSBCData:(NSData*)data; + +/* 释放SBC解码器 */ +- (void)finishSBCDecode; + + +@end +NS_ASSUME_NONNULL_END diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.m b/MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.m similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.m rename to MixTools/MixTools/MixTools/AudioDecode/AiAudioDecoder.m diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/AudioConvert.h b/MixTools/MixTools/MixTools/AudioDecode/AudioConvert.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/AudioConvert.h rename to MixTools/MixTools/MixTools/AudioDecode/AudioConvert.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/AudioConvert.m b/MixTools/MixTools/MixTools/AudioDecode/AudioConvert.m similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/AudioConvert.m rename to MixTools/MixTools/MixTools/AudioDecode/AudioConvert.m diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/ac3_parser.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/ac3_parser.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/ac3_parser.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/ac3_parser.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/adts_parser.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/adts_parser.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/adts_parser.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/adts_parser.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avcodec.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avcodec.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avcodec.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avcodec.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avdct.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avdct.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avdct.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avdct.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avfft.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avfft.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avfft.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/avfft.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/bsf.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/bsf.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/bsf.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/bsf.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_desc.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_desc.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_desc.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_desc.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_id.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_id.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_id.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_id.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_par.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_par.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_par.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/codec_par.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/d3d11va.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/d3d11va.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/d3d11va.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/d3d11va.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dirac.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dirac.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dirac.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dirac.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dv_profile.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dv_profile.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dv_profile.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dv_profile.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dxva2.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dxva2.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dxva2.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/dxva2.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/jni.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/jni.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/jni.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/jni.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/mediacodec.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/mediacodec.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/mediacodec.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/mediacodec.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/packet.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/packet.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/packet.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/packet.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/qsv.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/qsv.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/qsv.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/qsv.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vaapi.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vaapi.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vaapi.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vaapi.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vdpau.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vdpau.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vdpau.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vdpau.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/version.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/version.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/version.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/version.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/videotoolbox.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/videotoolbox.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/videotoolbox.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/videotoolbox.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vorbis_parser.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vorbis_parser.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vorbis_parser.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/vorbis_parser.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/xvmc.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/xvmc.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/xvmc.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavcodec/xvmc.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavdevice/avdevice.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavdevice/avdevice.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavdevice/avdevice.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavdevice/avdevice.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavdevice/version.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavdevice/version.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavdevice/version.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavdevice/version.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/avfilter.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/avfilter.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/avfilter.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/avfilter.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/buffersink.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/buffersink.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/buffersink.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/buffersink.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/buffersrc.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/buffersrc.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/buffersrc.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/buffersrc.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/version.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/version.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/version.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavfilter/version.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/avformat.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/avformat.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/avformat.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/avformat.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/avio.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/avio.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/avio.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/avio.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/version.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/version.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/version.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavformat/version.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/adler32.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/adler32.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/adler32.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/adler32.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/aes.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/aes.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/aes.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/aes.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/aes_ctr.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/aes_ctr.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/aes_ctr.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/aes_ctr.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/attributes.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/attributes.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/attributes.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/attributes.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/audio_fifo.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/audio_fifo.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/audio_fifo.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/audio_fifo.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avassert.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avassert.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avassert.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avassert.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avconfig.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avconfig.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avconfig.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avconfig.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avstring.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avstring.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avstring.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avstring.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avutil.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avutil.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avutil.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/avutil.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/base64.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/base64.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/base64.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/base64.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/blowfish.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/blowfish.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/blowfish.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/blowfish.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/bprint.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/bprint.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/bprint.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/bprint.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/bswap.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/bswap.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/bswap.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/bswap.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/buffer.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/buffer.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/buffer.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/buffer.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/camellia.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/camellia.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/camellia.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/camellia.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/cast5.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/cast5.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/cast5.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/cast5.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/channel_layout.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/channel_layout.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/channel_layout.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/channel_layout.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/common.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/common.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/common.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/common.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/cpu.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/cpu.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/cpu.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/cpu.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/crc.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/crc.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/crc.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/crc.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/des.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/des.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/des.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/des.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/dict.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/dict.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/dict.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/dict.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/display.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/display.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/display.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/display.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/dovi_meta.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/dovi_meta.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/dovi_meta.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/dovi_meta.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/downmix_info.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/downmix_info.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/downmix_info.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/downmix_info.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/encryption_info.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/encryption_info.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/encryption_info.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/encryption_info.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/error.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/error.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/error.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/error.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/eval.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/eval.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/eval.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/eval.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/ffversion.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/ffversion.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/ffversion.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/ffversion.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/fifo.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/fifo.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/fifo.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/fifo.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/file.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/file.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/file.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/file.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/frame.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/frame.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/frame.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/frame.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hash.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hash.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hash.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hash.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hdr_dynamic_metadata.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hdr_dynamic_metadata.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hdr_dynamic_metadata.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hdr_dynamic_metadata.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hmac.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hmac.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hmac.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hmac.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_cuda.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_cuda.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_cuda.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_cuda.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_d3d11va.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_d3d11va.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_d3d11va.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_d3d11va.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_drm.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_drm.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_drm.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_drm.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_dxva2.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_dxva2.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_dxva2.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_dxva2.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_mediacodec.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_mediacodec.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_mediacodec.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_mediacodec.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_opencl.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_opencl.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_opencl.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_opencl.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_qsv.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_qsv.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_qsv.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_qsv.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vaapi.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vaapi.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vaapi.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vaapi.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vdpau.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vdpau.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vdpau.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vdpau.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_videotoolbox.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_videotoolbox.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_videotoolbox.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_videotoolbox.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vulkan.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vulkan.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vulkan.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/hwcontext_vulkan.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/imgutils.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/imgutils.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/imgutils.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/imgutils.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/intfloat.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/intfloat.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/intfloat.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/intfloat.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/intreadwrite.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/intreadwrite.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/intreadwrite.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/intreadwrite.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/lfg.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/lfg.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/lfg.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/lfg.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/log.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/log.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/log.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/log.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/lzo.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/lzo.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/lzo.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/lzo.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/macros.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/macros.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/macros.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/macros.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mastering_display_metadata.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mastering_display_metadata.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mastering_display_metadata.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mastering_display_metadata.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mathematics.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mathematics.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mathematics.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mathematics.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/md5.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/md5.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/md5.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/md5.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mem.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mem.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mem.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/mem.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/motion_vector.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/motion_vector.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/motion_vector.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/motion_vector.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/murmur3.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/murmur3.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/murmur3.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/murmur3.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/opt.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/opt.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/opt.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/opt.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/parseutils.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/parseutils.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/parseutils.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/parseutils.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixdesc.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixdesc.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixdesc.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixdesc.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixelutils.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixelutils.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixelutils.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixelutils.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixfmt.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixfmt.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixfmt.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/pixfmt.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/random_seed.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/random_seed.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/random_seed.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/random_seed.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/rational.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/rational.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/rational.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/rational.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/rc4.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/rc4.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/rc4.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/rc4.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/replaygain.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/replaygain.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/replaygain.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/replaygain.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/ripemd.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/ripemd.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/ripemd.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/ripemd.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/samplefmt.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/samplefmt.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/samplefmt.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/samplefmt.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/sha.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/sha.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/sha.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/sha.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/sha512.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/sha512.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/sha512.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/sha512.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/spherical.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/spherical.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/spherical.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/spherical.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/stereo3d.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/stereo3d.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/stereo3d.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/stereo3d.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tea.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tea.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tea.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tea.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/threadmessage.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/threadmessage.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/threadmessage.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/threadmessage.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/time.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/time.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/time.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/time.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/timecode.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/timecode.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/timecode.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/timecode.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/timestamp.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/timestamp.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/timestamp.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/timestamp.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tree.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tree.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tree.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tree.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/twofish.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/twofish.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/twofish.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/twofish.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tx.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tx.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tx.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/tx.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/version.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/version.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/version.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/version.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/video_enc_params.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/video_enc_params.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/video_enc_params.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/video_enc_params.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/xtea.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/xtea.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/xtea.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libavutil/xtea.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswresample/swresample.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswresample/swresample.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswresample/swresample.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswresample/swresample.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswresample/version.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswresample/version.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswresample/version.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswresample/version.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswscale/swscale.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswscale/swscale.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswscale/swscale.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswscale/swscale.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswscale/version.h b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswscale/version.h similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswscale/version.h rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/include/libswscale/version.h diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavcodec.a b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavcodec.a similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavcodec.a rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavcodec.a diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavdevice.a b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavdevice.a similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavdevice.a rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavdevice.a diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavfilter.a b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavfilter.a similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavfilter.a rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavfilter.a diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavformat.a b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavformat.a similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavformat.a rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavformat.a diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavutil.a b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavutil.a similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavutil.a rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libavutil.a diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libswresample.a b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libswresample.a similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libswresample.a rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libswresample.a diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libswscale.a b/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libswscale.a similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libswscale.a rename to MixTools/MixTools/MixTools/AudioDecode/FFmpeg-iOS/lib/libswscale.a diff --git a/MixTools/MixTools/MixTools/AudioTransform/AudioTransform.h b/MixTools/MixTools/MixTools/AudioTransform/AudioTransform.h new file mode 100644 index 0000000..30e98ce --- /dev/null +++ b/MixTools/MixTools/MixTools/AudioTransform/AudioTransform.h @@ -0,0 +1,16 @@ +// +// AudioTransform.h +// ShangWuMiao +// +// Created by ju on 2017/7/19. +// Copyright © 2017å¹´ ju. All rights reserved. +// + +#import + +@interface AudioTransform : NSObject + ++ (BOOL)convertPcm:(NSString *)pcmPath toMp3:(NSString *)mp3Path; + ++ (BOOL)convertPcm:(NSString *)pcmPath pcmSamplerate:(int)samplerate toMp3:(NSString *)mp3Path ; +@end diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioTransform/AudioTransform.m b/MixTools/MixTools/MixTools/AudioTransform/AudioTransform.m similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioTransform/AudioTransform.m rename to MixTools/MixTools/MixTools/AudioTransform/AudioTransform.m diff --git a/MixTools/MixTools/MixTools/AudioTransform/fat-lame/include/lame/lame.h b/MixTools/MixTools/MixTools/AudioTransform/fat-lame/include/lame/lame.h new file mode 100644 index 0000000..791d491 --- /dev/null +++ b/MixTools/MixTools/MixTools/AudioTransform/fat-lame/include/lame/lame.h @@ -0,0 +1,1323 @@ +/* + * Interface to MP3 LAME encoding engine + * + * Copyright (c) 1999 Mark Taylor + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/* $Id: lame.h,v 1.189.2.1 2012/01/08 23:49:58 robert Exp $ */ + +#ifndef LAME_LAME_H +#define LAME_LAME_H + +/* for size_t typedef */ +#include +/* for va_list typedef */ +#include +/* for FILE typedef, TODO: remove when removing lame_mp3_tags_fid */ +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +typedef void (*lame_report_function)(const char *format, va_list ap); + +#if defined(WIN32) || defined(_WIN32) +#undef CDECL +#define CDECL __cdecl +#else +#define CDECL +#endif + +#define DEPRECATED_OR_OBSOLETE_CODE_REMOVED 1 + +typedef enum vbr_mode_e { + vbr_off=0, + vbr_mt, /* obsolete, same as vbr_mtrh */ + vbr_rh, + vbr_abr, + vbr_mtrh, + vbr_max_indicator, /* Don't use this! It's used for sanity checks. */ + vbr_default=vbr_mtrh /* change this to change the default VBR mode of LAME */ +} vbr_mode; + + +/* MPEG modes */ +typedef enum MPEG_mode_e { + STEREO = 0, + JOINT_STEREO, + DUAL_CHANNEL, /* LAME doesn't supports this! */ + MONO, + NOT_SET, + MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} MPEG_mode; + +/* Padding types */ +typedef enum Padding_type_e { + PAD_NO = 0, + PAD_ALL, + PAD_ADJUST, + PAD_MAX_INDICATOR /* Don't use this! It's used for sanity checks. */ +} Padding_type; + + + +/*presets*/ +typedef enum preset_mode_e { + /*values from 8 to 320 should be reserved for abr bitrates*/ + /*for abr I'd suggest to directly use the targeted bitrate as a value*/ + ABR_8 = 8, + ABR_320 = 320, + + V9 = 410, /*Vx to match Lame and VBR_xx to match FhG*/ + VBR_10 = 410, + V8 = 420, + VBR_20 = 420, + V7 = 430, + VBR_30 = 430, + V6 = 440, + VBR_40 = 440, + V5 = 450, + VBR_50 = 450, + V4 = 460, + VBR_60 = 460, + V3 = 470, + VBR_70 = 470, + V2 = 480, + VBR_80 = 480, + V1 = 490, + VBR_90 = 490, + V0 = 500, + VBR_100 = 500, + + + + /*still there for compatibility*/ + R3MIX = 1000, + STANDARD = 1001, + EXTREME = 1002, + INSANE = 1003, + STANDARD_FAST = 1004, + EXTREME_FAST = 1005, + MEDIUM = 1006, + MEDIUM_FAST = 1007 +} preset_mode; + + +/*asm optimizations*/ +typedef enum asm_optimizations_e { + MMX = 1, + AMD_3DNOW = 2, + SSE = 3 +} asm_optimizations; + + +/* psychoacoustic model */ +typedef enum Psy_model_e { + PSY_GPSYCHO = 1, + PSY_NSPSYTUNE = 2 +} Psy_model; + + +/* buffer considerations */ +typedef enum buffer_constraint_e { + MDB_DEFAULT=0, + MDB_STRICT_ISO=1, + MDB_MAXIMUM=2 +} buffer_constraint; + + +struct lame_global_struct; +typedef struct lame_global_struct lame_global_flags; +typedef lame_global_flags *lame_t; + + + + +/*********************************************************************** + * + * The LAME API + * These functions should be called, in this order, for each + * MP3 file to be encoded. See the file "API" for more documentation + * + ***********************************************************************/ + + +/* + * REQUIRED: + * initialize the encoder. sets default for all encoder parameters, + * returns NULL if some malloc()'s failed + * otherwise returns pointer to structure needed for all future + * API calls. + */ +lame_global_flags * CDECL lame_init(void); +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* obsolete version */ +int CDECL lame_init_old(lame_global_flags *); +#endif + +/* + * OPTIONAL: + * set as needed to override defaults + */ + +/******************************************************************** + * input stream description + ***********************************************************************/ +/* number of samples. default = 2^32-1 */ +int CDECL lame_set_num_samples(lame_global_flags *, unsigned long); +unsigned long CDECL lame_get_num_samples(const lame_global_flags *); + +/* input sample rate in Hz. default = 44100hz */ +int CDECL lame_set_in_samplerate(lame_global_flags *, int); +int CDECL lame_get_in_samplerate(const lame_global_flags *); + +/* number of channels in input stream. default=2 */ +int CDECL lame_set_num_channels(lame_global_flags *, int); +int CDECL lame_get_num_channels(const lame_global_flags *); + +/* + scale the input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale(lame_global_flags *, float); +float CDECL lame_get_scale(const lame_global_flags *); + +/* + scale the channel 0 (left) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_left(lame_global_flags *, float); +float CDECL lame_get_scale_left(const lame_global_flags *); + +/* + scale the channel 1 (right) input by this amount before encoding. default=1 + (not used by decoding routines) +*/ +int CDECL lame_set_scale_right(lame_global_flags *, float); +float CDECL lame_get_scale_right(const lame_global_flags *); + +/* + output sample rate in Hz. default = 0, which means LAME picks best value + based on the amount of compression. MPEG only allows: + MPEG1 32, 44.1, 48khz + MPEG2 16, 22.05, 24 + MPEG2.5 8, 11.025, 12 + (not used by decoding routines) +*/ +int CDECL lame_set_out_samplerate(lame_global_flags *, int); +int CDECL lame_get_out_samplerate(const lame_global_flags *); + + +/******************************************************************** + * general control parameters + ***********************************************************************/ +/* 1=cause LAME to collect data for an MP3 frame analyzer. default=0 */ +int CDECL lame_set_analysis(lame_global_flags *, int); +int CDECL lame_get_analysis(const lame_global_flags *); + +/* + 1 = write a Xing VBR header frame. + default = 1 + this variable must have been added by a Hungarian notation Windows programmer :-) +*/ +int CDECL lame_set_bWriteVbrTag(lame_global_flags *, int); +int CDECL lame_get_bWriteVbrTag(const lame_global_flags *); + +/* 1=decode only. use lame/mpglib to convert mp3/ogg to wav. default=0 */ +int CDECL lame_set_decode_only(lame_global_flags *, int); +int CDECL lame_get_decode_only(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* 1=encode a Vorbis .ogg file. default=0 */ +/* DEPRECATED */ +int CDECL lame_set_ogg(lame_global_flags *, int); +int CDECL lame_get_ogg(const lame_global_flags *); +#endif + +/* + internal algorithm selection. True quality is determined by the bitrate + but this variable will effect quality by selecting expensive or cheap algorithms. + quality=0..9. 0=best (very slow). 9=worst. + recommended: 2 near-best quality, not too slow + 5 good quality, fast + 7 ok quality, really fast +*/ +int CDECL lame_set_quality(lame_global_flags *, int); +int CDECL lame_get_quality(const lame_global_flags *); + +/* + mode = 0,1,2,3 = stereo, jstereo, dual channel (not supported), mono + default: lame picks based on compression ration and input channels +*/ +int CDECL lame_set_mode(lame_global_flags *, MPEG_mode); +MPEG_mode CDECL lame_get_mode(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + mode_automs. Use a M/S mode with a switching threshold based on + compression ratio + DEPRECATED +*/ +int CDECL lame_set_mode_automs(lame_global_flags *, int); +int CDECL lame_get_mode_automs(const lame_global_flags *); +#endif + +/* + force_ms. Force M/S for all frames. For testing only. + default = 0 (disabled) +*/ +int CDECL lame_set_force_ms(lame_global_flags *, int); +int CDECL lame_get_force_ms(const lame_global_flags *); + +/* use free_format? default = 0 (disabled) */ +int CDECL lame_set_free_format(lame_global_flags *, int); +int CDECL lame_get_free_format(const lame_global_flags *); + +/* perform ReplayGain analysis? default = 0 (disabled) */ +int CDECL lame_set_findReplayGain(lame_global_flags *, int); +int CDECL lame_get_findReplayGain(const lame_global_flags *); + +/* decode on the fly. Search for the peak sample. If the ReplayGain + * analysis is enabled then perform the analysis on the decoded data + * stream. default = 0 (disabled) + * NOTE: if this option is set the build-in decoder should not be used */ +int CDECL lame_set_decode_on_the_fly(lame_global_flags *, int); +int CDECL lame_get_decode_on_the_fly(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* DEPRECATED: now does the same as lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_input(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_input(const lame_global_flags *); + +/* DEPRECATED: now does the same as + lame_set_decode_on_the_fly() && lame_set_findReplayGain() + default = 0 (disabled) */ +int CDECL lame_set_ReplayGain_decode(lame_global_flags *, int); +int CDECL lame_get_ReplayGain_decode(const lame_global_flags *); + +/* DEPRECATED: now does the same as lame_set_decode_on_the_fly() + default = 0 (disabled) */ +int CDECL lame_set_findPeakSample(lame_global_flags *, int); +int CDECL lame_get_findPeakSample(const lame_global_flags *); +#endif + +/* counters for gapless encoding */ +int CDECL lame_set_nogap_total(lame_global_flags*, int); +int CDECL lame_get_nogap_total(const lame_global_flags*); + +int CDECL lame_set_nogap_currentindex(lame_global_flags* , int); +int CDECL lame_get_nogap_currentindex(const lame_global_flags*); + + +/* + * OPTIONAL: + * Set printf like error/debug/message reporting functions. + * The second argument has to be a pointer to a function which looks like + * void my_debugf(const char *format, va_list ap) + * { + * (void) vfprintf(stdout, format, ap); + * } + * If you use NULL as the value of the pointer in the set function, the + * lame buildin function will be used (prints to stderr). + * To quiet any output you have to replace the body of the example function + * with just "return;" and use it in the set function. + */ +int CDECL lame_set_errorf(lame_global_flags *, lame_report_function); +int CDECL lame_set_debugf(lame_global_flags *, lame_report_function); +int CDECL lame_set_msgf (lame_global_flags *, lame_report_function); + + + +/* set one of brate compression ratio. default is compression ratio of 11. */ +int CDECL lame_set_brate(lame_global_flags *, int); +int CDECL lame_get_brate(const lame_global_flags *); +int CDECL lame_set_compression_ratio(lame_global_flags *, float); +float CDECL lame_get_compression_ratio(const lame_global_flags *); + + +int CDECL lame_set_preset( lame_global_flags* gfp, int ); +int CDECL lame_set_asm_optimizations( lame_global_flags* gfp, int, int ); + + + +/******************************************************************** + * frame params + ***********************************************************************/ +/* mark as copyright. default=0 */ +int CDECL lame_set_copyright(lame_global_flags *, int); +int CDECL lame_get_copyright(const lame_global_flags *); + +/* mark as original. default=1 */ +int CDECL lame_set_original(lame_global_flags *, int); +int CDECL lame_get_original(const lame_global_flags *); + +/* error_protection. Use 2 bytes from each frame for CRC checksum. default=0 */ +int CDECL lame_set_error_protection(lame_global_flags *, int); +int CDECL lame_get_error_protection(const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* padding_type. 0=pad no frames 1=pad all frames 2=adjust padding(default) */ +int CDECL lame_set_padding_type(lame_global_flags *, Padding_type); +Padding_type CDECL lame_get_padding_type(const lame_global_flags *); +#endif + +/* MP3 'private extension' bit Meaningless. default=0 */ +int CDECL lame_set_extension(lame_global_flags *, int); +int CDECL lame_get_extension(const lame_global_flags *); + +/* enforce strict ISO compliance. default=0 */ +int CDECL lame_set_strict_ISO(lame_global_flags *, int); +int CDECL lame_get_strict_ISO(const lame_global_flags *); + + +/******************************************************************** + * quantization/noise shaping + ***********************************************************************/ + +/* disable the bit reservoir. For testing only. default=0 */ +int CDECL lame_set_disable_reservoir(lame_global_flags *, int); +int CDECL lame_get_disable_reservoir(const lame_global_flags *); + +/* select a different "best quantization" function. default=0 */ +int CDECL lame_set_quant_comp(lame_global_flags *, int); +int CDECL lame_get_quant_comp(const lame_global_flags *); +int CDECL lame_set_quant_comp_short(lame_global_flags *, int); +int CDECL lame_get_quant_comp_short(const lame_global_flags *); + +int CDECL lame_set_experimentalX(lame_global_flags *, int); /* compatibility*/ +int CDECL lame_get_experimentalX(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalY(lame_global_flags *, int); +int CDECL lame_get_experimentalY(const lame_global_flags *); + +/* another experimental option. for testing only */ +int CDECL lame_set_experimentalZ(lame_global_flags *, int); +int CDECL lame_get_experimentalZ(const lame_global_flags *); + +/* Naoki's psycho acoustic model. default=0 */ +int CDECL lame_set_exp_nspsytune(lame_global_flags *, int); +int CDECL lame_get_exp_nspsytune(const lame_global_flags *); + +void CDECL lame_set_msfix(lame_global_flags *, double); +float CDECL lame_get_msfix(const lame_global_flags *); + + +/******************************************************************** + * VBR control + ***********************************************************************/ +/* Types of VBR. default = vbr_off = CBR */ +int CDECL lame_set_VBR(lame_global_flags *, vbr_mode); +vbr_mode CDECL lame_get_VBR(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest */ +int CDECL lame_set_VBR_q(lame_global_flags *, int); +int CDECL lame_get_VBR_q(const lame_global_flags *); + +/* VBR quality level. 0=highest 9=lowest, Range [0,...,10[ */ +int CDECL lame_set_VBR_quality(lame_global_flags *, float); +float CDECL lame_get_VBR_quality(const lame_global_flags *); + +/* Ignored except for VBR=vbr_abr (ABR mode) */ +int CDECL lame_set_VBR_mean_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_mean_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_min_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_min_bitrate_kbps(const lame_global_flags *); + +int CDECL lame_set_VBR_max_bitrate_kbps(lame_global_flags *, int); +int CDECL lame_get_VBR_max_bitrate_kbps(const lame_global_flags *); + +/* + 1=strictly enforce VBR_min_bitrate. Normally it will be violated for + analog silence +*/ +int CDECL lame_set_VBR_hard_min(lame_global_flags *, int); +int CDECL lame_get_VBR_hard_min(const lame_global_flags *); + +/* for preset */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_set_preset_expopts(lame_global_flags *, int); +#endif + +/******************************************************************** + * Filtering control + ***********************************************************************/ +/* freq in Hz to apply lowpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_lowpassfreq(lame_global_flags *, int); +int CDECL lame_get_lowpassfreq(const lame_global_flags *); +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_lowpasswidth(lame_global_flags *, int); +int CDECL lame_get_lowpasswidth(const lame_global_flags *); + +/* freq in Hz to apply highpass. Default = 0 = lame chooses. -1 = disabled */ +int CDECL lame_set_highpassfreq(lame_global_flags *, int); +int CDECL lame_get_highpassfreq(const lame_global_flags *); +/* width of transition band, in Hz. Default = one polyphase filter band */ +int CDECL lame_set_highpasswidth(lame_global_flags *, int); +int CDECL lame_get_highpasswidth(const lame_global_flags *); + + +/******************************************************************** + * psycho acoustics and other arguments which you should not change + * unless you know what you are doing + ***********************************************************************/ + +/* only use ATH for masking */ +int CDECL lame_set_ATHonly(lame_global_flags *, int); +int CDECL lame_get_ATHonly(const lame_global_flags *); + +/* only use ATH for short blocks */ +int CDECL lame_set_ATHshort(lame_global_flags *, int); +int CDECL lame_get_ATHshort(const lame_global_flags *); + +/* disable ATH */ +int CDECL lame_set_noATH(lame_global_flags *, int); +int CDECL lame_get_noATH(const lame_global_flags *); + +/* select ATH formula */ +int CDECL lame_set_ATHtype(lame_global_flags *, int); +int CDECL lame_get_ATHtype(const lame_global_flags *); + +/* lower ATH by this many db */ +int CDECL lame_set_ATHlower(lame_global_flags *, float); +float CDECL lame_get_ATHlower(const lame_global_flags *); + +/* select ATH adaptive adjustment type */ +int CDECL lame_set_athaa_type( lame_global_flags *, int); +int CDECL lame_get_athaa_type( const lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* select the loudness approximation used by the ATH adaptive auto-leveling */ +int CDECL lame_set_athaa_loudapprox( lame_global_flags *, int); +int CDECL lame_get_athaa_loudapprox( const lame_global_flags *); +#endif + +/* adjust (in dB) the point below which adaptive ATH level adjustment occurs */ +int CDECL lame_set_athaa_sensitivity( lame_global_flags *, float); +float CDECL lame_get_athaa_sensitivity( const lame_global_flags* ); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* OBSOLETE: predictability limit (ISO tonality formula) */ +int CDECL lame_set_cwlimit(lame_global_flags *, int); +int CDECL lame_get_cwlimit(const lame_global_flags *); +#endif + +/* + allow blocktypes to differ between channels? + default: 0 for jstereo, 1 for stereo +*/ +int CDECL lame_set_allow_diff_short(lame_global_flags *, int); +int CDECL lame_get_allow_diff_short(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_useTemporal(lame_global_flags *, int); +int CDECL lame_get_useTemporal(const lame_global_flags *); + +/* use temporal masking effect (default = 1) */ +int CDECL lame_set_interChRatio(lame_global_flags *, float); +float CDECL lame_get_interChRatio(const lame_global_flags *); + +/* disable short blocks */ +int CDECL lame_set_no_short_blocks(lame_global_flags *, int); +int CDECL lame_get_no_short_blocks(const lame_global_flags *); + +/* force short blocks */ +int CDECL lame_set_force_short_blocks(lame_global_flags *, int); +int CDECL lame_get_force_short_blocks(const lame_global_flags *); + +/* Input PCM is emphased PCM (for instance from one of the rarely + emphased CDs), it is STRONGLY not recommended to use this, because + psycho does not take it into account, and last but not least many decoders + ignore these bits */ +int CDECL lame_set_emphasis(lame_global_flags *, int); +int CDECL lame_get_emphasis(const lame_global_flags *); + + + +/************************************************************************/ +/* internal variables, cannot be set... */ +/* provided because they may be of use to calling application */ +/************************************************************************/ +/* version 0=MPEG-2 1=MPEG-1 (2=MPEG-2.5) */ +int CDECL lame_get_version(const lame_global_flags *); + +/* encoder delay */ +int CDECL lame_get_encoder_delay(const lame_global_flags *); + +/* + padding appended to the input to make sure decoder can fully decode + all input. Note that this value can only be calculated during the + call to lame_encoder_flush(). Before lame_encoder_flush() has + been called, the value of encoder_padding = 0. +*/ +int CDECL lame_get_encoder_padding(const lame_global_flags *); + +/* size of MPEG frame */ +int CDECL lame_get_framesize(const lame_global_flags *); + +/* number of PCM samples buffered, but not yet encoded to mp3 data. */ +int CDECL lame_get_mf_samples_to_encode( const lame_global_flags* gfp ); + +/* + size (bytes) of mp3 data buffered, but not yet encoded. + this is the number of bytes which would be output by a call to + lame_encode_flush_nogap. NOTE: lame_encode_flush() will return + more bytes than this because it will encode the reamining buffered + PCM samples before flushing the mp3 buffers. +*/ +int CDECL lame_get_size_mp3buffer( const lame_global_flags* gfp ); + +/* number of frames encoded so far */ +int CDECL lame_get_frameNum(const lame_global_flags *); + +/* + lame's estimate of the total number of frames to be encoded + only valid if calling program set num_samples +*/ +int CDECL lame_get_totalframes(const lame_global_flags *); + +/* RadioGain value. Multiplied by 10 and rounded to the nearest. */ +int CDECL lame_get_RadioGain(const lame_global_flags *); + +/* AudiophileGain value. Multipled by 10 and rounded to the nearest. */ +int CDECL lame_get_AudiophileGain(const lame_global_flags *); + +/* the peak sample */ +float CDECL lame_get_PeakSample(const lame_global_flags *); + +/* Gain change required for preventing clipping. The value is correct only if + peak sample searching was enabled. If negative then the waveform + already does not clip. The value is multiplied by 10 and rounded up. */ +int CDECL lame_get_noclipGainChange(const lame_global_flags *); + +/* user-specified scale factor required for preventing clipping. Value is + correct only if peak sample searching was enabled and no user-specified + scaling was performed. If negative then either the waveform already does + not clip or the value cannot be determined */ +float CDECL lame_get_noclipScale(const lame_global_flags *); + + + + + + + +/* + * REQUIRED: + * sets more internal configuration based on data provided above. + * returns -1 if something failed. + */ +int CDECL lame_init_params(lame_global_flags *); + + +/* + * OPTIONAL: + * get the version number, in a string. of the form: + * "3.63 (beta)" or just "3.63". + */ +const char* CDECL get_lame_version ( void ); +const char* CDECL get_lame_short_version ( void ); +const char* CDECL get_lame_very_short_version ( void ); +const char* CDECL get_psy_version ( void ); +const char* CDECL get_lame_url ( void ); +const char* CDECL get_lame_os_bitness ( void ); + +/* + * OPTIONAL: + * get the version numbers in numerical form. + */ +typedef struct { + /* generic LAME version */ + int major; + int minor; + int alpha; /* 0 if not an alpha version */ + int beta; /* 0 if not a beta version */ + + /* version of the psy model */ + int psy_major; + int psy_minor; + int psy_alpha; /* 0 if not an alpha version */ + int psy_beta; /* 0 if not a beta version */ + + /* compile time features */ + const char *features; /* Don't make assumptions about the contents! */ +} lame_version_t; +void CDECL get_lame_version_numerical(lame_version_t *); + + +/* + * OPTIONAL: + * print internal lame configuration to message handler + */ +void CDECL lame_print_config(const lame_global_flags* gfp); + +void CDECL lame_print_internals( const lame_global_flags *gfp); + + +/* + * input pcm data, output (maybe) mp3 frames. + * This routine handles all buffering, resampling and filtering for you. + * + * return code number of bytes output in mp3buf. Can be 0 + * -1: mp3buf was too small + * -2: malloc() problem + * -3: lame_init_params() not called + * -4: psycho acoustic problems + * + * The required mp3buf_size can be computed from num_samples, + * samplerate and encoding rate, but here is a worst case estimate: + * + * mp3buf_size in bytes = 1.25*num_samples + 7200 + * + * I think a tighter bound could be: (mt, March 2000) + * MPEG1: + * num_samples*(bitrate/8)/samplerate + 4*1152*(bitrate/8)/samplerate + 512 + * MPEG2: + * num_samples*(bitrate/8)/samplerate + 4*576*(bitrate/8)/samplerate + 256 + * + * but test first if you use that! + * + * set mp3buf_size = 0 and LAME will not check if mp3buf_size is + * large enough. + * + * NOTE: + * if gfp->num_channels=2, but gfp->mode = 3 (mono), the L & R channels + * will be averaged into the L channel before encoding only the L channel + * This will overwrite the data in buffer_l[] and buffer_r[]. + * +*/ +int CDECL lame_encode_buffer ( + lame_global_flags* gfp, /* global context handle */ + const short int buffer_l [], /* PCM data for left channel */ + const short int buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* + * as above, but input has L & R channel data interleaved. + * NOTE: + * num_samples = number of samples in the L (or R) + * channel, not the total number of samples in pcm[] + */ +int CDECL lame_encode_buffer_interleaved( + lame_global_flags* gfp, /* global context handlei */ + short int pcm[], /* PCM data for left and right + channel, interleaved */ + int num_samples, /* number of samples per channel, + _not_ number of samples in + pcm[] */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int mp3buf_size ); /* number of valid octets in this + stream */ + + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + */ +int CDECL lame_encode_buffer_float( + lame_global_flags* gfp, /* global context handle */ + const float pcm_l [], /* PCM data for left channel */ + const float pcm_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for 'float's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_float( + lame_t gfp, + const float pcm_l [], /* PCM data for left channel */ + const float pcm_r [], /* PCM data for right channel */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); +int CDECL lame_encode_buffer_interleaved_ieee_float( + lame_t gfp, + const float pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for 'double's. + * !! NOTE: !! data must be scaled to +/- 1 full scale + */ +int CDECL lame_encode_buffer_ieee_double( + lame_t gfp, + const double pcm_l [], /* PCM data for left channel */ + const double pcm_r [], /* PCM data for right channel */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); +int CDECL lame_encode_buffer_interleaved_ieee_double( + lame_t gfp, + const double pcm[], /* PCM data for left and right + channel, interleaved */ + const int nsamples, + unsigned char * mp3buf, + const int mp3buf_size); + +/* as lame_encode_buffer, but for long's + * !! NOTE: !! data must still be scaled to be in the same range as + * short int, +/- 32768 + * + * This scaling was a mistake (doesn't allow one to exploit full + * precision of type 'long'. Use lame_encode_buffer_long2() instead. + * + */ +int CDECL lame_encode_buffer_long( + lame_global_flags* gfp, /* global context handle */ + const long buffer_l [], /* PCM data for left channel */ + const long buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* Same as lame_encode_buffer_long(), but with correct scaling. + * !! NOTE: !! data must still be scaled to be in the same range as + * type 'long'. Data should be in the range: +/- 2^(8*size(long)-1) + * + */ +int CDECL lame_encode_buffer_long2( + lame_global_flags* gfp, /* global context handle */ + const long buffer_l [], /* PCM data for left channel */ + const long buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + +/* as lame_encode_buffer, but for int's + * !! NOTE: !! input should be scaled to the maximum range of 'int' + * If int is 4 bytes, then the values should range from + * +/- 2147483648. + * + * This routine does not (and cannot, without loosing precision) use + * the same scaling as the rest of the lame_encode_buffer() routines. + * + */ +int CDECL lame_encode_buffer_int( + lame_global_flags* gfp, /* global context handle */ + const int buffer_l [], /* PCM data for left channel */ + const int buffer_r [], /* PCM data for right channel */ + const int nsamples, /* number of samples per channel */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + const int mp3buf_size ); /* number of valid octets in this + stream */ + + + + + +/* + * REQUIRED: + * lame_encode_flush will flush the intenal PCM buffers, padding with + * 0's to make sure the final frame is complete, and then flush + * the internal MP3 buffers, and thus may return a + * final few mp3 frames. 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * will also write id3v1 tags (if any) into the bitstream + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush( + lame_global_flags * gfp, /* global context handle */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * lame_encode_flush_nogap will flush the internal mp3 buffers and pad + * the last frame with ancillary data so it is a complete mp3 frame. + * + * 'mp3buf' should be at least 7200 bytes long + * to hold all possible emitted data. + * + * After a call to this routine, the outputed mp3 data is complete, but + * you may continue to encode new PCM samples and write future mp3 data + * to a different file. The two mp3 files will play back with no gaps + * if they are concatenated together. + * + * This routine will NOT write id3v1 tags into the bitstream. + * + * return code = number of bytes output to mp3buf. Can be 0 + */ +int CDECL lame_encode_flush_nogap( + lame_global_flags * gfp, /* global context handle */ + unsigned char* mp3buf, /* pointer to encoded MP3 stream */ + int size); /* number of valid octets in this stream */ + +/* + * OPTIONAL: + * Normally, this is called by lame_init_params(). It writes id3v2 and + * Xing headers into the front of the bitstream, and sets frame counters + * and bitrate histogram data to 0. You can also call this after + * lame_encode_flush_nogap(). + */ +int CDECL lame_init_bitstream( + lame_global_flags * gfp); /* global context handle */ + + + +/* + * OPTIONAL: some simple statistics + * a bitrate histogram to visualize the distribution of used frame sizes + * a stereo mode histogram to visualize the distribution of used stereo + * modes, useful in joint-stereo mode only + * 0: LR left-right encoded + * 1: LR-I left-right and intensity encoded (currently not supported) + * 2: MS mid-side encoded + * 3: MS-I mid-side and intensity encoded (currently not supported) + * + * attention: don't call them after lame_encode_finish + * suggested: lame_encode_flush -> lame_*_hist -> lame_close + */ + +void CDECL lame_bitrate_hist( + const lame_global_flags * gfp, + int bitrate_count[14] ); +void CDECL lame_bitrate_kbps( + const lame_global_flags * gfp, + int bitrate_kbps [14] ); +void CDECL lame_stereo_mode_hist( + const lame_global_flags * gfp, + int stereo_mode_count[4] ); + +void CDECL lame_bitrate_stereo_mode_hist ( + const lame_global_flags * gfp, + int bitrate_stmode_count[14][4] ); + +void CDECL lame_block_type_hist ( + const lame_global_flags * gfp, + int btype_count[6] ); + +void CDECL lame_bitrate_block_type_hist ( + const lame_global_flags * gfp, + int bitrate_btype_count[14][6] ); + +#if (DEPRECATED_OR_OBSOLETE_CODE_REMOVED && 0) +#else +/* + * OPTIONAL: + * lame_mp3_tags_fid will rewrite a Xing VBR tag to the mp3 file with file + * pointer fid. These calls perform forward and backwards seeks, so make + * sure fid is a real file. Make sure lame_encode_flush has been called, + * and all mp3 data has been written to the file before calling this + * function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME because + * the output is not a regular file, this call does nothing + * NOTE: + * LAME wants to read from the file to skip an optional ID3v2 tag, so + * make sure you opened the file for writing and reading. + * NOTE: + * You can call lame_get_lametag_frame instead, if you want to insert + * the lametag yourself. +*/ +void CDECL lame_mp3_tags_fid(lame_global_flags *, FILE* fid); +#endif + +/* + * OPTIONAL: + * lame_get_lametag_frame copies the final LAME-tag into 'buffer'. + * The function returns the number of bytes copied into buffer, or + * the required buffer size, if the provided buffer is too small. + * Function failed, if the return value is larger than 'size'! + * Make sure lame_encode flush has been called before calling this function. + * NOTE: + * if VBR tags are turned off by the user, or turned off by LAME, + * this call does nothing and returns 0. + * NOTE: + * LAME inserted an empty frame in the beginning of mp3 audio data, + * which you have to replace by the final LAME-tag frame after encoding. + * In case there is no ID3v2 tag, usually this frame will be the very first + * data in your mp3 file. If you put some other leading data into your + * file, you'll have to do some bookkeeping about where to write this buffer. + */ +size_t CDECL lame_get_lametag_frame( + const lame_global_flags *, unsigned char* buffer, size_t size); + +/* + * REQUIRED: + * final call to free all remaining buffers + */ +int CDECL lame_close (lame_global_flags *); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* + * OBSOLETE: + * lame_encode_finish combines lame_encode_flush() and lame_close() in + * one call. However, once this call is made, the statistics routines + * will no longer work because the data will have been cleared, and + * lame_mp3_tags_fid() cannot be called to add data to the VBR header + */ +int CDECL lame_encode_finish( + lame_global_flags* gfp, + unsigned char* mp3buf, + int size ); +#endif + + + + + + +/********************************************************************* + * + * decoding + * + * a simple interface to mpglib, part of mpg123, is also included if + * libmp3lame is compiled with HAVE_MPGLIB + * + *********************************************************************/ + +struct hip_global_struct; +typedef struct hip_global_struct hip_global_flags; +typedef hip_global_flags *hip_t; + + +typedef struct { + int header_parsed; /* 1 if header was parsed and following data was + computed */ + int stereo; /* number of channels */ + int samplerate; /* sample rate */ + int bitrate; /* bitrate */ + int mode; /* mp3 frame type */ + int mode_ext; /* mp3 frame type */ + int framesize; /* number of samples per mp3 frame */ + + /* this data is only computed if mpglib detects a Xing VBR header */ + unsigned long nsamp; /* number of samples in mp3 file. */ + int totalframes; /* total number of frames in mp3 file */ + + /* this data is not currently computed by the mpglib routines */ + int framenum; /* frames decoded counter */ +} mp3data_struct; + +/* required call to initialize decoder */ +hip_t CDECL hip_decode_init(void); + +/* cleanup call to exit decoder */ +int CDECL hip_decode_exit(hip_t gfp); + +/* HIP reporting functions */ +void CDECL hip_set_errorf(hip_t gfp, lame_report_function f); +void CDECL hip_set_debugf(hip_t gfp, lame_report_function f); +void CDECL hip_set_msgf (hip_t gfp, lame_report_function f); + +/********************************************************************* + * input 1 mp3 frame, output (maybe) pcm data. + * + * nout = hip_decode(hip, mp3buf,len,pcm_l,pcm_r); + * + * input: + * len : number of bytes of mp3 data in mp3buf + * mp3buf[len] : mp3 data to be decoded + * + * output: + * nout: -1 : decoding error + * 0 : need more data before we can complete the decode + * >0 : returned 'nout' samples worth of data in pcm_l,pcm_r + * pcm_l[nout] : left channel data + * pcm_r[nout] : right channel data + * + *********************************************************************/ +int CDECL hip_decode( hip_t gfp + , unsigned char * mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + ); + +/* same as hip_decode, and also returns mp3 header data */ +int CDECL hip_decode_headers( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + ); + +/* same as hip_decode, but returns at most one frame */ +int CDECL hip_decode1( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + ); + +/* same as hip_decode1, but returns at most one frame and mp3 header data */ +int CDECL hip_decode1_headers( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + ); + +/* same as hip_decode1_headers, but also returns enc_delay and enc_padding + from VBR Info tag, (-1 if no info tag was found) */ +int CDECL hip_decode1_headersB( hip_t gfp + , unsigned char* mp3buf + , size_t len + , short pcm_l[] + , short pcm_r[] + , mp3data_struct* mp3data + , int *enc_delay + , int *enc_padding + ); + + + +/* OBSOLETE: + * lame_decode... functions are there to keep old code working + * but it is strongly recommended to replace calls by hip_decode... + * function calls, see above. + */ +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +int CDECL lame_decode_init(void); +int CDECL lame_decode( + unsigned char * mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[] ); +int CDECL lame_decode1_headers( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data ); +int CDECL lame_decode1_headersB( + unsigned char* mp3buf, + int len, + short pcm_l[], + short pcm_r[], + mp3data_struct* mp3data, + int *enc_delay, + int *enc_padding ); +int CDECL lame_decode_exit(void); + +#endif /* obsolete lame_decode API calls */ + + +/********************************************************************* + * + * id3tag stuff + * + *********************************************************************/ + +/* + * id3tag.h -- Interface to write ID3 version 1 and 2 tags. + * + * Copyright (C) 2000 Don Melton. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA. + */ + +/* utility to obtain alphabetically sorted list of genre names with numbers */ +void CDECL id3tag_genre_list( + void (*handler)(int, const char *, void *), + void* cookie); + +void CDECL id3tag_init (lame_t gfp); + +/* force addition of version 2 tag */ +void CDECL id3tag_add_v2 (lame_t gfp); + +/* add only a version 1 tag */ +void CDECL id3tag_v1_only (lame_t gfp); + +/* add only a version 2 tag */ +void CDECL id3tag_v2_only (lame_t gfp); + +/* pad version 1 tag with spaces instead of nulls */ +void CDECL id3tag_space_v1 (lame_t gfp); + +/* pad version 2 tag with extra 128 bytes */ +void CDECL id3tag_pad_v2 (lame_t gfp); + +/* pad version 2 tag with extra n bytes */ +void CDECL id3tag_set_pad (lame_t gfp, size_t n); + +void CDECL id3tag_set_title(lame_t gfp, const char* title); +void CDECL id3tag_set_artist(lame_t gfp, const char* artist); +void CDECL id3tag_set_album(lame_t gfp, const char* album); +void CDECL id3tag_set_year(lame_t gfp, const char* year); +void CDECL id3tag_set_comment(lame_t gfp, const char* comment); + +/* return -1 result if track number is out of ID3v1 range + and ignored for ID3v1 */ +int CDECL id3tag_set_track(lame_t gfp, const char* track); + +/* return non-zero result if genre name or number is invalid + result 0: OK + result -1: genre number out of range + result -2: no valid ID3v1 genre name, mapped to ID3v1 'Other' + but taken as-is for ID3v2 genre tag */ +int CDECL id3tag_set_genre(lame_t gfp, const char* genre); + +/* return non-zero result if field name is invalid */ +int CDECL id3tag_set_fieldvalue(lame_t gfp, const char* fieldvalue); + +/* return non-zero result if image type is invalid */ +int CDECL id3tag_set_albumart(lame_t gfp, const char* image, size_t size); + +/* lame_get_id3v1_tag copies ID3v1 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v1 tag. + */ +size_t CDECL lame_get_id3v1_tag(lame_t gfp, unsigned char* buffer, size_t size); + +/* lame_get_id3v2_tag copies ID3v2 tag into buffer. + * Function returns number of bytes copied into buffer, or number + * of bytes rquired if buffer 'size' is too small. + * Function fails, if returned value is larger than 'size'. + * NOTE: + * This functions does nothing, if user/LAME disabled ID3v2 tag. + */ +size_t CDECL lame_get_id3v2_tag(lame_t gfp, unsigned char* buffer, size_t size); + +/* normaly lame_init_param writes ID3v2 tags into the audio stream + * Call lame_set_write_id3tag_automatic(gfp, 0) before lame_init_param + * to turn off this behaviour and get ID3v2 tag with above function + * write it yourself into your file. + */ +void CDECL lame_set_write_id3tag_automatic(lame_global_flags * gfp, int); +int CDECL lame_get_write_id3tag_automatic(lame_global_flags const* gfp); + +/* experimental */ +int CDECL id3tag_set_textinfo_latin1(lame_t gfp, char const *id, char const *text); + +/* experimental */ +int CDECL id3tag_set_comment_latin1(lame_t gfp, char const *lang, char const *desc, char const *text); + +#if DEPRECATED_OR_OBSOLETE_CODE_REMOVED +#else +/* experimental */ +int CDECL id3tag_set_textinfo_ucs2(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_ucs2(lame_t gfp, char const *lang, + unsigned short const *desc, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_fieldvalue_ucs2(lame_t gfp, const unsigned short *fieldvalue); +#endif + +/* experimental */ +int CDECL id3tag_set_fieldvalue_utf16(lame_t gfp, const unsigned short *fieldvalue); + +/* experimental */ +int CDECL id3tag_set_textinfo_utf16(lame_t gfp, char const *id, unsigned short const *text); + +/* experimental */ +int CDECL id3tag_set_comment_utf16(lame_t gfp, char const *lang, unsigned short const *desc, unsigned short const *text); + + +/*********************************************************************** +* +* list of valid bitrates [kbps] & sample frequencies [Hz]. +* first index: 0: MPEG-2 values (sample frequencies 16...24 kHz) +* 1: MPEG-1 values (sample frequencies 32...48 kHz) +* 2: MPEG-2.5 values (sample frequencies 8...12 kHz) +***********************************************************************/ + +extern const int bitrate_table [3][16]; +extern const int samplerate_table [3][ 4]; + +/* access functions for use in DLL, global vars are not exported */ +int CDECL lame_get_bitrate(int mpeg_version, int table_index); +int CDECL lame_get_samplerate(int mpeg_version, int table_index); + + +/* maximum size of albumart image (128KB), which affects LAME_MAXMP3BUFFER + as well since lame_encode_buffer() also returns ID3v2 tag data */ +#define LAME_MAXALBUMART (128 * 1024) + +/* maximum size of mp3buffer needed if you encode at most 1152 samples for + each call to lame_encode_buffer. see lame_encode_buffer() below + (LAME_MAXMP3BUFFER is now obsolete) */ +#define LAME_MAXMP3BUFFER (16384 + LAME_MAXALBUMART) + + +typedef enum { + LAME_OKAY = 0, + LAME_NOERROR = 0, + LAME_GENERICERROR = -1, + LAME_NOMEM = -10, + LAME_BADBITRATE = -11, + LAME_BADSAMPFREQ = -12, + LAME_INTERNALERROR = -13, + + FRONTEND_READERROR = -80, + FRONTEND_WRITEERROR = -81, + FRONTEND_FILETOOLARGE = -82 + +} lame_errorcodes_t; + +#if defined(__cplusplus) +} +#endif +#endif /* LAME_LAME_H */ + diff --git a/MixSdk/MixTools/MixTools/MixTools/AudioTransform/fat-lame/lib/libmp3lame.a b/MixTools/MixTools/MixTools/AudioTransform/fat-lame/lib/libmp3lame.a similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/AudioTransform/fat-lame/lib/libmp3lame.a rename to MixTools/MixTools/MixTools/AudioTransform/fat-lame/lib/libmp3lame.a diff --git a/MixTools/MixTools/MixTools/MSUtils.h b/MixTools/MixTools/MixTools/MSUtils.h new file mode 100644 index 0000000..39ed23a --- /dev/null +++ b/MixTools/MixTools/MixTools/MSUtils.h @@ -0,0 +1,40 @@ +// +// AiMouseTools.h +// AiMouse +// +// Created by incar on 2024/2/28. +// + +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MSUtils : NSObject ++ (NSArray *)stringToArray:(NSString *)jsonString; ++ (NSString *)arrayToString:(NSArray *)arr; + ++ (NSDictionary *)stringToDictionary:(NSString *)jsonString; ++ (NSString *)dictionaryToString:(NSDictionary *)dic; + ++ (NSDictionary *)dataToDictionary:(NSData *)jsonData; ++ (NSData *)dictionaryToData:(NSDictionary *)dicJson; + + ++ (NSString *)dataToHexString:(NSData *)data; + ++ (NSString *)dataToHexString_placeholder:(NSData *)data; + ++ (NSData *)hexStringToData:(NSString *)hexStr ; + ++ (NSString *)dataToUtf8String:(NSData *)data; + ++ (NSString *)stringTomd5:(NSString *)str; + ++ (NSString *)stringToHmacSha1:(NSString*)key text:(NSString*)text; + ++ (NSString *)MD5ForUpper32:(NSString *)str; + ++ (NSData *)dataWithHexString:(NSString *)hexStr; +@end + +NS_ASSUME_NONNULL_END diff --git a/MixSdk/MixTools/MixTools/MixTools/MSUtils.m b/MixTools/MixTools/MixTools/MSUtils.m similarity index 100% rename from MixSdk/MixTools/MixTools/MixTools/MSUtils.m rename to MixTools/MixTools/MixTools/MSUtils.m diff --git a/MixTools/MixTools/MixTools/MixTools.h b/MixTools/MixTools/MixTools/MixTools.h new file mode 100644 index 0000000..a294dc0 --- /dev/null +++ b/MixTools/MixTools/MixTools/MixTools.h @@ -0,0 +1,24 @@ +// +// MixTools.h +// MixTools +// +// Created by incar on 2024/12/31. +// + +#import + +//! Project version number for MixTools. +FOUNDATION_EXPORT double MixToolsVersionNumber; + +//! Project version string for MixTools. +FOUNDATION_EXPORT const unsigned char MixToolsVersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + +#import +#import +#import +#import +//#import "Tools/MSUtils.h" +//#import "AudioTransform/AudioTransform.h" diff --git "a/document/MixSdk\346\216\245\345\217\243\346\226\207\346\241\243.md" "b/document/MixSdk\346\216\245\345\217\243\346\226\207\346\241\243.md" index 3965564..503ddbc 100644 --- "a/document/MixSdk\346\216\245\345\217\243\346\226\207\346\241\243.md" +++ "b/document/MixSdk\346\216\245\345\217\243\346\226\207\346\241\243.md" @@ -2,10 +2,10 @@ ## 介绍 -- 当前版本:v1.0.15 +- 当前版本:v2025010201 -- 更新内容20240904: - 1. 修复切换模型多回end 问题 +- 更新内容: + 1. 兼容xcode16.2 @@ -17,7 +17,7 @@ ## 安装教程 -1. 把 MixSdk.Framework 拖入项目中 +1. 把 MixSdk.Framework 、MixTools拖入项目中 1. 在 Build Phases 选项卡中,添加以下依赖库:libz.tbd 2. 在使用的文件中`#import MixSdk`