Browse Source

mid 轨道静音,如果单乐器,切换原声伴奏不处理静音

Steven 2 years ago
parent
commit
13ace1b22e

+ 8 - 8
KulexiuForStudent/KulexiuForStudent.xcodeproj/project.pbxproj

@@ -823,7 +823,7 @@
 		BCC583D028A9EC6400BAB4CF /* cloud_animation_3.png in Resources */ = {isa = PBXBuildFile; fileRef = BCC583B128A9EC6400BAB4CF /* cloud_animation_3.png */; };
 		BCC583D128A9EC6400BAB4CF /* cloud_animation_2.png in Resources */ = {isa = PBXBuildFile; fileRef = BCC583B228A9EC6400BAB4CF /* cloud_animation_2.png */; };
 		BCC583D228A9EC6400BAB4CF /* cloud_animation.json in Resources */ = {isa = PBXBuildFile; fileRef = BCC583B328A9EC6400BAB4CF /* cloud_animation.json */; };
-		BCC5841E28AA545B00BAB4CF /* icloud_animation_29.png in Resources */ = {isa = PBXBuildFile; fileRef = BCC5841D28AA545B00BAB4CF /* icloud_animation_29.png */; };
+		BCC5841E28AA545B00BAB4CF /* cloud_animation_29.png in Resources */ = {isa = PBXBuildFile; fileRef = BCC5841D28AA545B00BAB4CF /* cloud_animation_29.png */; };
 		BCD457A1286313D70010B493 /* NotiferNavView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD4579E286313D70010B493 /* NotiferNavView.m */; };
 		BCD457A2286313D70010B493 /* NotiferNavView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BCD457A0286313D70010B493 /* NotiferNavView.xib */; };
 		BCD457AB286469600010B493 /* PublicNoticeView.m in Sources */ = {isa = PBXBuildFile; fileRef = BCD457A92864695F0010B493 /* PublicNoticeView.m */; };
@@ -2273,7 +2273,7 @@
 		BCC583B128A9EC6400BAB4CF /* cloud_animation_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cloud_animation_3.png; sourceTree = "<group>"; };
 		BCC583B228A9EC6400BAB4CF /* cloud_animation_2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cloud_animation_2.png; sourceTree = "<group>"; };
 		BCC583B328A9EC6400BAB4CF /* cloud_animation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = cloud_animation.json; sourceTree = "<group>"; };
-		BCC5841D28AA545B00BAB4CF /* icloud_animation_29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = icloud_animation_29.png; sourceTree = "<group>"; };
+		BCC5841D28AA545B00BAB4CF /* cloud_animation_29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = cloud_animation_29.png; sourceTree = "<group>"; };
 		BCD4579E286313D70010B493 /* NotiferNavView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NotiferNavView.m; sourceTree = "<group>"; };
 		BCD4579F286313D70010B493 /* NotiferNavView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NotiferNavView.h; sourceTree = "<group>"; };
 		BCD457A0286313D70010B493 /* NotiferNavView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = NotiferNavView.xib; sourceTree = "<group>"; };
@@ -5534,7 +5534,7 @@
 				BCC5839B28A9EC6400BAB4CF /* cloud_animation_26.png */,
 				BCC5839C28A9EC6400BAB4CF /* cloud_animation_27.png */,
 				BCC583A328A9EC6400BAB4CF /* cloud_animation_28.png */,
-				BCC5841D28AA545B00BAB4CF /* icloud_animation_29.png */,
+				BCC5841D28AA545B00BAB4CF /* cloud_animation_29.png */,
 			);
 			path = images;
 			sourceTree = "<group>";
@@ -5742,7 +5742,7 @@
 				BC71D267288804CD0010F14B /* img_42.png in Resources */,
 				BC71D27A288804CD0010F14B /* img_35.png in Resources */,
 				BC71D25A288804CD0010F14B /* img_46.png in Resources */,
-				BCC5841E28AA545B00BAB4CF /* icloud_animation_29.png in Resources */,
+				BCC5841E28AA545B00BAB4CF /* cloud_animation_29.png in Resources */,
 				BCBFDF5228115DA40052AFE5 /* HomeIntroduceView.xib in Resources */,
 				BC71D277288804CD0010F14B /* img_36.png in Resources */,
 				BC71D250288804CD0010F14B /* img_6.png in Resources */,
@@ -6805,7 +6805,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForStudent/KulexiuForStudent.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.3.1;
+				CURRENT_PROJECT_VERSION = 1.3.5;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -6860,7 +6860,7 @@
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.5/SocialLibraries/Sina/SinaSDK",
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.5/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.2.0;
+				MARKETING_VERSION = 1.3.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.Colexiu.KulexiuForStudent;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;
@@ -6876,7 +6876,7 @@
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
 				CODE_SIGN_ENTITLEMENTS = KulexiuForStudent/KulexiuForStudent.entitlements;
 				CODE_SIGN_STYLE = Automatic;
-				CURRENT_PROJECT_VERSION = 1.3.1;
+				CURRENT_PROJECT_VERSION = 1.3.5;
 				DEVELOPMENT_TEAM = B2AP53HHTU;
 				ENABLE_BITCODE = NO;
 				FRAMEWORK_SEARCH_PATHS = (
@@ -6931,7 +6931,7 @@
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.5/SocialLibraries/Sina/SinaSDK",
 					"$(PROJECT_DIR)/KulexiuForStudent/Common/ThirdPart/UMSocialSDK/share/share_ios_6.10.5/UMSocialSDKPlugin",
 				);
-				MARKETING_VERSION = 1.2.0;
+				MARKETING_VERSION = 1.3.0;
 				PRODUCT_BUNDLE_IDENTIFIER = com.Colexiu.KulexiuForStudent;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_EMIT_LOC_STRINGS = YES;

BIN
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate


+ 8 - 8
KulexiuForStudent/KulexiuForStudent.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -446,8 +446,8 @@
             filePath = "KulexiuForStudent/Module/CloudEngine/MidiPlayer/MidiPlayerEngine.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "661"
-            endingLineNumber = "661"
+            startingLineNumber = "665"
+            endingLineNumber = "665"
             landmarkName = "-volumeTrackVolumeWithInstrumentId:volume:"
             landmarkType = "7">
          </BreakpointContent>
@@ -471,16 +471,16 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "79214F67-41AA-4288-A1A1-894D953FE70B"
-            shouldBeEnabled = "Yes"
+            uuid = "66EFE09F-3A08-4750-B3C7-F7E13A774A3E"
+            shouldBeEnabled = "No"
             ignoreCount = "0"
             continueAfterRunningActions = "No"
-            filePath = "KulexiuForStudent/Common/Base/KSAccompanyWebViewController.m"
+            filePath = "KulexiuForStudent/Module/CloudEngine/MidiPlayer/MidiPlayerEngine.m"
             startingColumnNumber = "9223372036854775807"
             endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "645"
-            endingLineNumber = "645"
-            landmarkName = "-userContentController:didReceiveScriptMessage:"
+            startingLineNumber = "652"
+            endingLineNumber = "652"
+            landmarkName = "-volumeTrackVolumeWithInstrumentId:volume:"
             landmarkType = "7">
          </BreakpointContent>
       </BreakpointProxy>

+ 2 - 2
KulexiuForStudent/KulexiuForStudent/Common/Base/AccompanyLoadingView.xib

@@ -17,7 +17,7 @@
                     <rect key="frame" x="0.0" y="0.0" width="699" height="340"/>
                 </imageView>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Gn9-HQ-HPj">
-                    <rect key="frame" x="199.5" y="70" width="300" height="200"/>
+                    <rect key="frame" x="199.5" y="50" width="300" height="200"/>
                     <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
                     <constraints>
                         <constraint firstAttribute="width" constant="300" id="PRt-J4-ryA"/>
@@ -53,7 +53,7 @@
             <constraints>
                 <constraint firstItem="ZV3-qJ-uxE" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="3r2-vl-mBg"/>
                 <constraint firstAttribute="trailing" secondItem="ZV3-qJ-uxE" secondAttribute="trailing" id="QY7-u1-n6M"/>
-                <constraint firstItem="Gn9-HQ-HPj" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="QuP-sd-KI7"/>
+                <constraint firstItem="Gn9-HQ-HPj" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" constant="-20" id="QuP-sd-KI7"/>
                 <constraint firstItem="1Vl-Vy-gg3" firstAttribute="centerY" secondItem="ncV-eS-8Yx" secondAttribute="centerY" id="TSR-47-coa"/>
                 <constraint firstAttribute="bottom" secondItem="Bjn-zM-LJW" secondAttribute="bottom" constant="30" id="YAP-rE-Kfk"/>
                 <constraint firstItem="1Vl-Vy-gg3" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Z4M-rM-8kS"/>

+ 0 - 0
KulexiuForStudent/KulexiuForStudent/Common/CloudLoadingSource/images/icloud_animation_29.png → KulexiuForStudent/KulexiuForStudent/Common/CloudLoadingSource/images/cloud_animation_29.png


+ 14 - 14
KulexiuForStudent/KulexiuForStudent/Common/Define/PrefixHeader.pch

@@ -117,24 +117,24 @@ shouldPrevent = NO; \
 
 //#ifdef DEBUG
 
-#define hostURL (@"https://dev.colexiu.com")
-#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
-#define WEBHOST (@"https://dev.colexiu.com/student")
-#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
-#define JSPUSH_ENVIRONMENT (NO)
-#define RCIM_KEY (@"0vnjpoad0jbdz")
-#define SUBMIT_UUID (YES)
+//#define hostURL (@"https://dev.colexiu.com")
+//#define SEALCLASSHOST (@"https://dev.colexiu.com/api-classroom")
+//#define WEBHOST (@"https://dev.colexiu.com/student")
+//#define SOCKET_URL (@"wss://dev.colexiu.com/audioAnalysis")
+//#define JSPUSH_ENVIRONMENT (NO)
+//#define RCIM_KEY (@"0vnjpoad0jbdz")
+//#define SUBMIT_UUID (YES)
 
 
 //#else
 
-//#define hostURL (@"https://online.colexiu.com")
-//#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
-//#define WEBHOST (@"https://online.colexiu.com/student")
-//#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
-//#define JSPUSH_ENVIRONMENT (YES)
-//#define RCIM_KEY (@"e5t4ouvpe42pa")
-//#define SUBMIT_UUID (YES)
+#define hostURL (@"https://online.colexiu.com")
+#define SEALCLASSHOST (@"https://online.colexiu.com/api-classroom")
+#define WEBHOST (@"https://online.colexiu.com/student")
+#define SOCKET_URL (@"wss://online.colexiu.com/audioAnalysis")
+#define JSPUSH_ENVIRONMENT (YES)
+#define RCIM_KEY (@"e5t4ouvpe42pa")
+#define SUBMIT_UUID (YES)
 
 //#endif
 

+ 4 - 0
KulexiuForStudent/KulexiuForStudent/Module/CloudEngine/MidiPlayer/MidiPlayerEngine.m

@@ -647,6 +647,10 @@
 }
 /**设置对应乐器编号所在轨道的播放音量*/
 - (BOOL)volumeTrackVolumeWithInstrumentId:(UInt32)instrumentId volume:(float)volume {
+    NSArray *instrumentArray = [self.instrumentTrackParm allKeys];
+    if (instrumentArray.count < 2) {
+        return NO;
+    }
     // 0~7都是钢琴 全都取0
     if (instrumentId >= 0 && instrumentId <= 7) {
         instrumentId = 0;

+ 26 - 5
KulexiuForStudent/KulexiuForStudent/Module/Mine/Setting/View/ModifyNameBodyView.m

@@ -15,6 +15,7 @@
 - (void)awakeFromNib {
     [super awakeFromNib];
     self.nameField.delegate = self;
+    [self.nameField addTarget:self action:@selector(textFieldDidChange:) forControlEvents:UIControlEventEditingChanged];
 }
 
 + (instancetype)shareInstance {
@@ -34,13 +35,33 @@
         [self endEditing:YES];
         return YES;
     }
-    // 输入控制
-    NSString *newString = [textField.text stringByReplacingCharactersInRange:range withString:string];
-    if (newString.length > 7 && self.isNameModify) {
-        return NO;
-    }
     return YES;
 }
+
+- (void)textFieldDidChange:(UITextField *)textField {
+    if (self.isNameModify) {
+        NSInteger maxLength = 7;
+        NSString *text = textField.text;
+        NSString *lang = [[UIApplication sharedApplication]textInputMode].primaryLanguage;
+        if ([lang isEqualToString:@"zh-Hans"]) { //中文输入
+            UITextRange *selectedRange = [textField markedTextRange];
+            //获取高亮部分
+            UITextPosition *position = [textField positionFromPosition:selectedRange.start offset:0];
+            if (!position) {// 没有高亮选择的字,则对已输入的文字进行字数统计和限制
+                if (text.length > maxLength) {
+                    textField.text = [text substringToIndex:maxLength];
+                }
+            }
+            else{//有高亮选择的字符串,则暂不对文字进行统计和限制
+            }
+        }else{//中文输入法以外的直接对其统计限制即可,不考虑其他语种情况
+            if (text.length > maxLength) {
+                textField.text = [text substringToIndex:maxLength];
+            }
+        }
+    }
+    
+}
 /*
 // Only override drawRect: if you perform custom drawing.
 // An empty implementation adversely affects performance during animation.