Browse Source

1.首页最近课程动效。
2.mid原声伴奏切换逻辑修改

Steven 2 years ago
parent
commit
131ba0dbae
23 changed files with 190 additions and 70 deletions
  1. 64 0
      KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj
  2. BIN
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/UserInterfaceState.xcuserstate
  3. 0 32
      KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist
  4. 10 9
      KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSAccompanyWebViewController.m
  5. 8 6
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m
  6. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/accomapny_animation.json
  7. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png
  8. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___5B0AE074-7E19-4A0D-B01C-380BFC0BE94D.png
  9. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png
  10. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png
  11. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___5___E15887AE-0472-48F6-B4BF-7310E071A33C.png
  12. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___8101F90E-EF42-445A-9B5B-29F652562925.png
  13. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/_____31_550B3F9A-BC60-4669-A0A0-5E315687C2EA.png
  14. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/_____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png
  15. BIN
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/_____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png
  16. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/live_animation.json
  17. 0 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/musicRoom_animation.json
  18. 4 4
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeNewHeadView.xib
  19. 31 2
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.m
  20. 18 10
      KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.xib
  21. 5 0
      KulexiuForTeacher/KulexiuForTeacher/Module/MidiPlayer/MidiPlayerEngine.h
  22. 47 7
      KulexiuForTeacher/KulexiuForTeacher/Module/MidiPlayer/MidiPlayerEngine.m
  23. 3 0
      KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/ModifyNameBodyView.m

+ 64 - 0
KulexiuForTeacher/KulexiuForTeacher.xcodeproj/project.pbxproj

@@ -541,6 +541,18 @@
 		BC4BCE7A2823AB6500522C8B /* KSAddressPickerView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC4BCE792823AB6500522C8B /* KSAddressPickerView.m */; };
 		BC4BCE7D2823B66000522C8B /* AddressDetailBodyView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC4BCE7C2823B66000522C8B /* AddressDetailBodyView.m */; };
 		BC4BCE7F2823B66A00522C8B /* AddressDetailBodyView.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC4BCE7E2823B66A00522C8B /* AddressDetailBodyView.xib */; };
+		BC513E7A28A4D85F003F58C4 /* accomapny_animation.json in Resources */ = {isa = PBXBuildFile; fileRef = BC513E7928A4D85F003F58C4 /* accomapny_animation.json */; };
+		BC513E7C28A4D868003F58C4 /* musicRoom_animation.json in Resources */ = {isa = PBXBuildFile; fileRef = BC513E7B28A4D868003F58C4 /* musicRoom_animation.json */; };
+		BC513E7E28A4D874003F58C4 /* live_animation.json in Resources */ = {isa = PBXBuildFile; fileRef = BC513E7D28A4D874003F58C4 /* live_animation.json */; };
+		BC513E9528A4D9F5003F58C4 /* _____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513E9228A4D9F5003F58C4 /* _____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png */; };
+		BC513E9628A4D9F5003F58C4 /* ___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513E9328A4D9F5003F58C4 /* ___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png */; };
+		BC513E9728A4D9F5003F58C4 /* ___8101F90E-EF42-445A-9B5B-29F652562925.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513E9428A4D9F5003F58C4 /* ___8101F90E-EF42-445A-9B5B-29F652562925.png */; };
+		BC513E9B28A4D9FD003F58C4 /* ___5___E15887AE-0472-48F6-B4BF-7310E071A33C.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513E9828A4D9FC003F58C4 /* ___5___E15887AE-0472-48F6-B4BF-7310E071A33C.png */; };
+		BC513E9C28A4D9FD003F58C4 /* _____31_550B3F9A-BC60-4669-A0A0-5E315687C2EA.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513E9928A4D9FC003F58C4 /* _____31_550B3F9A-BC60-4669-A0A0-5E315687C2EA.png */; };
+		BC513E9D28A4D9FD003F58C4 /* ___5B0AE074-7E19-4A0D-B01C-380BFC0BE94D.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513E9A28A4D9FD003F58C4 /* ___5B0AE074-7E19-4A0D-B01C-380BFC0BE94D.png */; };
+		BC513EA128A4DA05003F58C4 /* _____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513E9E28A4DA05003F58C4 /* _____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png */; };
+		BC513EA228A4DA05003F58C4 /* ___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513E9F28A4DA05003F58C4 /* ___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png */; };
+		BC513EA328A4DA05003F58C4 /* ___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png in Resources */ = {isa = PBXBuildFile; fileRef = BC513EA028A4DA05003F58C4 /* ___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png */; };
 		BC523B04289D00C000E9D66B /* HomeHotMusicCell.m in Sources */ = {isa = PBXBuildFile; fileRef = BC523B02289D00C000E9D66B /* HomeHotMusicCell.m */; };
 		BC523B05289D00C000E9D66B /* HomeHotMusicCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = BC523B03289D00C000E9D66B /* HomeHotMusicCell.xib */; };
 		BC523B08289D015D00E9D66B /* HomeHotMuiscHeadView.m in Sources */ = {isa = PBXBuildFile; fileRef = BC523B07289D015D00E9D66B /* HomeHotMuiscHeadView.m */; };
@@ -1936,6 +1948,18 @@
 		BC4BCE7B2823B66000522C8B /* AddressDetailBodyView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AddressDetailBodyView.h; sourceTree = "<group>"; };
 		BC4BCE7C2823B66000522C8B /* AddressDetailBodyView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AddressDetailBodyView.m; sourceTree = "<group>"; };
 		BC4BCE7E2823B66A00522C8B /* AddressDetailBodyView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AddressDetailBodyView.xib; sourceTree = "<group>"; };
+		BC513E7928A4D85F003F58C4 /* accomapny_animation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = accomapny_animation.json; sourceTree = "<group>"; };
+		BC513E7B28A4D868003F58C4 /* musicRoom_animation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = musicRoom_animation.json; sourceTree = "<group>"; };
+		BC513E7D28A4D874003F58C4 /* live_animation.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = live_animation.json; sourceTree = "<group>"; };
+		BC513E9228A4D9F5003F58C4 /* _____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "_____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png"; path = "../../../../../../../../../Desktop/陪练课_直播课_琴房课(动效文件)/陪练课/images/_____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png"; sourceTree = "<group>"; };
+		BC513E9328A4D9F5003F58C4 /* ___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png"; path = "../../../../../../../../../Desktop/陪练课_直播课_琴房课(动效文件)/陪练课/images/___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png"; sourceTree = "<group>"; };
+		BC513E9428A4D9F5003F58C4 /* ___8101F90E-EF42-445A-9B5B-29F652562925.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "___8101F90E-EF42-445A-9B5B-29F652562925.png"; path = "../../../../../../../../../Desktop/陪练课_直播课_琴房课(动效文件)/陪练课/images/___8101F90E-EF42-445A-9B5B-29F652562925.png"; sourceTree = "<group>"; };
+		BC513E9828A4D9FC003F58C4 /* ___5___E15887AE-0472-48F6-B4BF-7310E071A33C.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "___5___E15887AE-0472-48F6-B4BF-7310E071A33C.png"; sourceTree = "<group>"; };
+		BC513E9928A4D9FC003F58C4 /* _____31_550B3F9A-BC60-4669-A0A0-5E315687C2EA.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "_____31_550B3F9A-BC60-4669-A0A0-5E315687C2EA.png"; sourceTree = "<group>"; };
+		BC513E9A28A4D9FD003F58C4 /* ___5B0AE074-7E19-4A0D-B01C-380BFC0BE94D.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "___5B0AE074-7E19-4A0D-B01C-380BFC0BE94D.png"; sourceTree = "<group>"; };
+		BC513E9E28A4DA05003F58C4 /* _____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "_____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png"; path = "../../../../../../../../../Desktop/陪练课_直播课_琴房课(动效文件)/直播课/images/_____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png"; sourceTree = "<group>"; };
+		BC513E9F28A4DA05003F58C4 /* ___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png"; path = "../../../../../../../../../Desktop/陪练课_直播课_琴房课(动效文件)/直播课/images/___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png"; sourceTree = "<group>"; };
+		BC513EA028A4DA05003F58C4 /* ___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png"; path = "../../../../../../../../../Desktop/陪练课_直播课_琴房课(动效文件)/直播课/images/___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png"; sourceTree = "<group>"; };
 		BC523B01289D00C000E9D66B /* HomeHotMusicCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HomeHotMusicCell.h; sourceTree = "<group>"; };
 		BC523B02289D00C000E9D66B /* HomeHotMusicCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = HomeHotMusicCell.m; sourceTree = "<group>"; };
 		BC523B03289D00C000E9D66B /* HomeHotMusicCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HomeHotMusicCell.xib; sourceTree = "<group>"; };
@@ -3876,6 +3900,7 @@
 		277935FC27E32BBF0010E277 /* Model */ = {
 			isa = PBXGroup;
 			children = (
+				BCA1136928A4D6E6007FAFB9 /* AnimationSource */,
 				BCDE359D289BC03E00A9A560 /* HomeAlbumModel.h */,
 				BCDE359C289BC03E00A9A560 /* HomeAlbumModel.m */,
 				BC6BEA9E288A4C0900022109 /* HomeMessageModel.h */,
@@ -4977,6 +5002,22 @@
 			path = View;
 			sourceTree = "<group>";
 		};
+		BC513E7F28A4D9BA003F58C4 /* images */ = {
+			isa = PBXGroup;
+			children = (
+				BC513E9228A4D9F5003F58C4 /* _____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png */,
+				BC513E9328A4D9F5003F58C4 /* ___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png */,
+				BC513E9428A4D9F5003F58C4 /* ___8101F90E-EF42-445A-9B5B-29F652562925.png */,
+				BC513E9928A4D9FC003F58C4 /* _____31_550B3F9A-BC60-4669-A0A0-5E315687C2EA.png */,
+				BC513E9828A4D9FC003F58C4 /* ___5___E15887AE-0472-48F6-B4BF-7310E071A33C.png */,
+				BC513E9A28A4D9FD003F58C4 /* ___5B0AE074-7E19-4A0D-B01C-380BFC0BE94D.png */,
+				BC513E9E28A4DA05003F58C4 /* _____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png */,
+				BC513E9F28A4DA05003F58C4 /* ___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png */,
+				BC513EA028A4DA05003F58C4 /* ___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png */,
+			);
+			path = images;
+			sourceTree = "<group>";
+		};
 		BC5EB5AC2804016200B4A3B0 /* CreateStyle */ = {
 			isa = PBXGroup;
 			children = (
@@ -5563,6 +5604,17 @@
 			path = WindowAlertManager;
 			sourceTree = "<group>";
 		};
+		BCA1136928A4D6E6007FAFB9 /* AnimationSource */ = {
+			isa = PBXGroup;
+			children = (
+				BC513E7928A4D85F003F58C4 /* accomapny_animation.json */,
+				BC513E7B28A4D868003F58C4 /* musicRoom_animation.json */,
+				BC513E7D28A4D874003F58C4 /* live_animation.json */,
+				BC513E7F28A4D9BA003F58C4 /* images */,
+			);
+			path = AnimationSource;
+			sourceTree = "<group>";
+		};
 		BCA9CE1827FD5EBF00D558C6 /* LiveCourse */ = {
 			isa = PBXGroup;
 			children = (
@@ -6518,6 +6570,7 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				BC513E9C28A4D9FD003F58C4 /* _____31_550B3F9A-BC60-4669-A0A0-5E315687C2EA.png in Resources */,
 				BC71D2002887FDD40010F14B /* img_9.png in Resources */,
 				BC71D292288811BF0010F14B /* tabbar1.json in Resources */,
 				BCE6A0A027F84E4500C97704 /* MineIntroduceCell.xib in Resources */,
@@ -6560,7 +6613,10 @@
 				27F9030127E864AE00C08A19 /* NetworkBodyView.xib in Resources */,
 				BCB14112288A49710022C13A /* HomeButtonView.xib in Resources */,
 				BC4BCE7F2823B66A00522C8B /* AddressDetailBodyView.xib in Resources */,
+				BC513E7A28A4D85F003F58C4 /* accomapny_animation.json in Resources */,
+				BC513E9728A4D9F5003F58C4 /* ___8101F90E-EF42-445A-9B5B-29F652562925.png in Resources */,
 				BCD457B62865651A0010B493 /* LiveMoreDisplayView.xib in Resources */,
+				BC513E9528A4D9F5003F58C4 /* _____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png in Resources */,
 				BCB908FD2850C9CB00F5FF69 /* MusicChooseSearchView.xib in Resources */,
 				275E8A7227E18F2300DD3F6E /* Main.storyboard in Resources */,
 				2780C92927E490CA00A95A4F /* VefiBodyView.xib in Resources */,
@@ -6572,6 +6628,7 @@
 				BC71D1EA2887FDD40010F14B /* img_10.png in Resources */,
 				BC71D2052887FDD40010F14B /* img_27.png in Resources */,
 				BC542E3828406F8000633781 /* UserAuthBodyView.xib in Resources */,
+				BC513E9D28A4D9FD003F58C4 /* ___5B0AE074-7E19-4A0D-B01C-380BFC0BE94D.png in Resources */,
 				27A54CEE27E9B986007309A3 /* ModifyNameBodyView.xib in Resources */,
 				2708565E27EDA83100EC8E72 /* GroupMemberListCell.xib in Resources */,
 				BCDE359A289BC02200A9A560 /* HomeHotAlbumCell.xib in Resources */,
@@ -6608,6 +6665,7 @@
 				BCAD01C22872F5560002CC40 /* LiveVideoListView.xib in Resources */,
 				275E3DE927F4679E0010EC30 /* LiveRoomHeadView.xib in Resources */,
 				BC6BEAA3288A4C2A00022109 /* KSHomeButton.xib in Resources */,
+				BC513EA328A4DA05003F58C4 /* ___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png in Resources */,
 				27D83F4E27F3EC2100062476 /* CreateLiveBodyView.xib in Resources */,
 				BCEA75282819103B00886A86 /* UnbindBodyView.xib in Resources */,
 				BC8B6E602856ED0600866917 /* WeiboSDK.bundle in Resources */,
@@ -6641,18 +6699,22 @@
 				BC0A22A8284751F80065C1AB /* DownloadStatusCell.xib in Resources */,
 				BC71D1F42887FDD40010F14B /* img_6.png in Resources */,
 				275B170D27EB14AC0081FDEF /* KSChatListSearchView.xib in Resources */,
+				BC513E9B28A4D9FD003F58C4 /* ___5___E15887AE-0472-48F6-B4BF-7310E071A33C.png in Resources */,
 				BC71D1332887ADDA0010F14B /* teacher_refresh.json in Resources */,
 				BC7CFFCA2817F2FF00CAEB21 /* CashRecordListCell.xib in Resources */,
+				BC513EA228A4DA05003F58C4 /* ___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png in Resources */,
 				BCB9FA41286DA337005D766B /* GuideListView.xib in Resources */,
 				BC3ACDA12891261F00060E97 /* MyMusicNavView.xib in Resources */,
 				BCB908DD2850A71800F5FF69 /* ShareMusicCellContentView.xib in Resources */,
 				BC71D2062887FDD40010F14B /* img_23.png in Resources */,
+				BC513E7E28A4D874003F58C4 /* live_animation.json in Resources */,
 				27D83F5927F4225D00062476 /* LivePreviewBodyView.xib in Resources */,
 				BC41104A2806706800800BD9 /* HomeworkListCell.xib in Resources */,
 				BCD457A72863196F0010B493 /* CourseTimeSegView.xib in Resources */,
 				2779362E27E33C360010E277 /* LoginBodyView.xib in Resources */,
 				BC8B6E6E285836B600866917 /* low_staff.png in Resources */,
 				BCB399BD27F9831D00AFF376 /* CourseForLiveCell.xib in Resources */,
+				BC513E9628A4D9F5003F58C4 /* ___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png in Resources */,
 				2723B68927F1643B00E0B90B /* HomeBodyView.xib in Resources */,
 				BCFE541A2817BE0800AD6786 /* IncomeHeaderView.xib in Resources */,
 				BC71D1F32887FDD40010F14B /* img_7.png in Resources */,
@@ -6737,6 +6799,7 @@
 				273C75A027E9681700F7C26F /* SettingBodyView.xib in Resources */,
 				BC71D1F12887FDD40010F14B /* img_12.png in Resources */,
 				BC8C2C662824EB9800FBA5D5 /* NotiferHeadView.xib in Resources */,
+				BC513EA128A4DA05003F58C4 /* _____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png in Resources */,
 				2779329A27E30FEB0010E277 /* mss_browseLoading@2x.png in Resources */,
 				BC71D2042887FDD40010F14B /* img_26.png in Resources */,
 				27F9CAFC27EC1AF3003E0FE4 /* ContractListCell.xib in Resources */,
@@ -6745,6 +6808,7 @@
 				BCA9CE5127FD954800D558C6 /* AccompanyRemarkCell.xib in Resources */,
 				BCB9FA682872C8F0005D766B /* FinishedLiveCell.xib in Resources */,
 				BCF61BDE280417190000ACFE /* MyStyleVideoView.xib in Resources */,
+				BC513E7C28A4D868003F58C4 /* musicRoom_animation.json in Resources */,
 				BCC03F89280460C000461B7C /* InstrumentHeaderView.xib in Resources */,
 				BCD6D16728195A98009A773E /* WithdrawApplyBodyView.xib in Resources */,
 				BC5EB5BC2804083800B4A3B0 /* MyStyleIntroduceCell.xib in Resources */,

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


+ 0 - 32
KulexiuForTeacher/KulexiuForTeacher.xcworkspace/xcuserdata/wangzhi.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -514,22 +514,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "A69885F4-2897-4F2A-B71D-D2D2C7E56B98"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "640"
-            endingLineNumber = "640"
-            landmarkName = "-IMConnetedCallback"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "A6E13BFE-9049-4248-AA95-75744735E63C"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"
@@ -610,22 +594,6 @@
       <BreakpointProxy
          BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
          <BreakpointContent
-            uuid = "9DA8A578-7E23-47BC-B362-75955662F866"
-            shouldBeEnabled = "Yes"
-            ignoreCount = "0"
-            continueAfterRunningActions = "No"
-            filePath = "KulexiuForTeacher/Module/Live/Controller/LiveRoomViewController.m"
-            startingColumnNumber = "9223372036854775807"
-            endingColumnNumber = "9223372036854775807"
-            startingLineNumber = "695"
-            endingLineNumber = "695"
-            landmarkName = "-liveroomQuit"
-            landmarkType = "7">
-         </BreakpointContent>
-      </BreakpointProxy>
-      <BreakpointProxy
-         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
-         <BreakpointContent
             uuid = "59E4C3A1-EF48-4F0D-A4DA-7CBC83CDA2C2"
             shouldBeEnabled = "Yes"
             ignoreCount = "0"

+ 10 - 9
KulexiuForTeacher/KulexiuForTeacher/Common/Base/KSAccompanyWebViewController.m

@@ -604,15 +604,16 @@
                          ]
                      }
                  */
-//                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
-//                for (NSDictionary *dic in [content arrayValueForKey:@"parts"]) {
-//                   NSInteger trackId = [self.playerEngine getSingleTrackNumByName:[dic stringValueForKey:@"name"]];
-//                    if (trackId >= 0) {
-//                        float volume = [dic floatValueForKey:@"volume"];
-//
-//                        [self.playerEngine volume:volume/100 WithTrack:(UInt32)trackId];
-//                    }
-//                }
+                NSLog(@"-cloudVolume -----%@",parm);
+                NSDictionary *content = [parm dictionaryValueForKey:@"content"];
+                int instrumentId = [content intValueForKey:@"activeMidiId"];
+                float volume = [content floatValueForKey:@"activeMidiVolume"];
+                if (instrumentId < 0) {
+                    [self postMessage:parm];
+                    [self.playerEngine getAllTrackVolume];
+                    return;
+                }
+                [self.playerEngine volumeTrackVolumeWithInstrumentId:instrumentId volume:volume/100];
                 [self postMessage:parm];
                 [self.playerEngine getAllTrackVolume];
             }

+ 8 - 6
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Controller/HomeViewController.m

@@ -257,7 +257,7 @@
         [self.courseView mas_remakeConstraints:^(MASConstraintMaker *make) {
             make.left.right.mas_equalTo(self.view);
             make.top.mas_equalTo(self.buttonContainer.mas_bottom);
-            make.height.mas_equalTo(90.0f);
+            make.height.mas_equalTo(91.0f);
         }];
     }
     else {
@@ -1103,11 +1103,13 @@
 - (TYPageControl *)pageControl {
     if (!_pageControl) {
         _pageControl = [[TYPageControl alloc] init];
-        _pageControl.frame = CGRectMake(0, (kScreenWidth - 28) * 132 / 347 - 15, kScreenWidth-28, 10);
-        _pageControl.currentPageIndicatorTintColor = HexRGB(0x2DC7AA);
-        _pageControl.pageIndicatorTintColor = HexRGBAlpha(0xffffff, 0.5);
-        _pageControl.pageIndicatorSize = CGSizeMake(10, 3);
-        _pageControl.currentPageIndicatorSize = CGSizeMake(10, 3);
+        _pageControl.contentHorizontalAlignment = UIControlContentHorizontalAlignmentRight;
+        _pageControl.pageIndicatorSpaing = 4.0f;
+        _pageControl.frame = CGRectMake(0, (kScreenWidth - 28) * 132 / 347 - 20, kScreenWidth-28 - 12, 12);
+        _pageControl.currentPageIndicatorTintColor = HexRGB(0xffffff);
+        _pageControl.pageIndicatorTintColor = HexRGB(0xffffff);
+        _pageControl.pageIndicatorSize = CGSizeMake(5, 5);
+        _pageControl.currentPageIndicatorSize = CGSizeMake(12, 5);
     }
     return _pageControl;
 }

File diff suppressed because it is too large
+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/accomapny_animation.json


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___2C8A75BF-2B66-4F7D-8BC4-EF07BC7C0955.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___5B0AE074-7E19-4A0D-B01C-380BFC0BE94D.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___5___6B54FD2C-7988-4205-B85F-61714D7C29B4.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___5___C8C7A749-87DC-4D99-8F67-2AD2B1D3D5F6.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___5___E15887AE-0472-48F6-B4BF-7310E071A33C.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/___8101F90E-EF42-445A-9B5B-29F652562925.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/_____31_550B3F9A-BC60-4669-A0A0-5E315687C2EA.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/_____31_5E671E04-92B5-414C-A363-CBBFEF2421E6.png


BIN
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/images/_____31_9F12D397-DA84-4B91-9C4B-642DA07045E9.png


File diff suppressed because it is too large
+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/live_animation.json


File diff suppressed because it is too large
+ 0 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Home/Model/AnimationSource/musicRoom_animation.json


+ 4 - 4
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeNewHeadView.xib

@@ -14,7 +14,7 @@
             <autoresizingMask key="autoresizingMask"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="G60-Et-o3r">
-                    <rect key="frame" x="20" y="38" width="114" height="23"/>
+                    <rect key="frame" x="25" y="38" width="114" height="23"/>
                     <subviews>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="mineStyle_nomal" translatesAutoresizingMaskIntoConstraints="NO" id="Cdf-rH-nsz">
                             <rect key="frame" x="0.0" y="0.0" width="23" height="23"/>
@@ -54,13 +54,13 @@
                     </constraints>
                 </view>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="勋章" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sUP-ZP-Dxs">
-                    <rect key="frame" x="141" y="41" width="29" height="17"/>
+                    <rect key="frame" x="146" y="41" width="29" height="17"/>
                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                     <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
                 </label>
                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0/4" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="GIJ-nK-Ul6">
-                    <rect key="frame" x="176" y="41" width="23" height="17"/>
+                    <rect key="frame" x="181" y="41" width="23" height="17"/>
                     <fontDescription key="fontDescription" type="system" weight="medium" pointSize="14"/>
                     <color key="textColor" red="0.59999999999999998" green="0.59999999999999998" blue="0.59999999999999998" alpha="1" colorSpace="calibratedRGB"/>
                     <nil key="highlightedColor"/>
@@ -165,7 +165,7 @@
                 <constraint firstItem="Eh7-SW-rWW" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="Rpf-oZ-a5A"/>
                 <constraint firstItem="Eh7-SW-rWW" firstAttribute="centerY" secondItem="nDP-6c-WeM" secondAttribute="centerY" id="YbM-aK-3Wu"/>
                 <constraint firstItem="nDP-6c-WeM" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="25" id="ZKO-9F-z81"/>
-                <constraint firstItem="G60-Et-o3r" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="20" id="oxP-IZ-oSI"/>
+                <constraint firstItem="G60-Et-o3r" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="25" id="oxP-IZ-oSI"/>
                 <constraint firstItem="sUP-ZP-Dxs" firstAttribute="leading" secondItem="G60-Et-o3r" secondAttribute="trailing" constant="7" id="qQb-Mw-aPM"/>
                 <constraint firstItem="GIJ-nK-Ul6" firstAttribute="leading" secondItem="sUP-ZP-Dxs" secondAttribute="trailing" constant="6" id="uPv-rF-rzz"/>
                 <constraint firstItem="K9c-3E-YUK" firstAttribute="bottom" secondItem="Jce-l2-nVi" secondAttribute="top" constant="5" id="y8F-1z-mAK"/>

+ 31 - 2
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.m

@@ -6,9 +6,14 @@
 //
 
 #import "HomeRecentCourseView.h"
+#import <Lottie/Lottie.h>
 
 @interface HomeRecentCourseView ()
 
+@property (nonatomic, strong) LOTAnimationView *animationView;
+
+@property (weak, nonatomic) IBOutlet UIView *imageBgView;
+
 @property (weak, nonatomic) IBOutlet UILabel *titleLabel;
 
 @property (weak, nonatomic) IBOutlet UILabel *timeLabel;
@@ -34,7 +39,6 @@
 
 - (void)configCourseMessage:(RecentCourseModel *)model {
     self.courseModel = model;
-//    self.titleLabel.text = [NSString stringWithFormat:@"%@即将开始",[NSString returnNoNullStringWithString:model.courseGroupName]];
     NSDateFormatter *formatter = [NSObject getDateformatter];
     [formatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
     NSDate *beginDate = [formatter dateFromString:model.courseStartTime];
@@ -50,7 +54,32 @@
         [formatter setDateFormat:@"yyyy-MM-dd HH:mm"];
         self.timeLabel.text = [NSString returnNoNullStringWithString:[formatter stringFromDate:beginDate]];
     }
-    
+    NSString *jsonString = @"";
+    if ([self.courseModel.courseType isEqualToString:@"LIVE"]) {
+        jsonString = @"live_animation.json";
+    }
+    else if ([self.courseModel.courseType isEqualToString:@"PIANO_ROOM_CLASS"]) {
+        jsonString = @"musicRoom_animation.json";
+    }
+    else {
+        jsonString = @"accomapny_animation.json";
+    }
+    [self configAnimationView:jsonString];
+}
+
+- (void)configAnimationView:(NSString *)jsonString {
+    if ([self.imageBgView.subviews containsObject:self.animationView]) {
+        [self.animationView removeFromSuperview];
+    }
+    self.animationView = [LOTAnimationView animationNamed:jsonString];
+    //2.加载后台给的json(url)
+    self.animationView.frame = CGRectMake(0, 0, 128, 91);
+    self.animationView.loopAnimation = YES;
+    self.animationView.contentMode = UIViewContentModeScaleAspectFill;
+    self.animationView.animationSpeed = 1.0;
+    self.animationView.loopAnimation = YES;
+    [self.imageBgView addSubview:self.animationView];
+    [self.animationView play];
 }
 
 - (IBAction)joinRoomAction:(id)sender {

+ 18 - 10
KulexiuForTeacher/KulexiuForTeacher/Module/Home/View/HomeRecentCourseView.xib

@@ -17,7 +17,7 @@
                     <rect key="frame" x="14" y="20" width="386" height="70"/>
                     <subviews>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="您有新课程即将开始" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lrj-nH-46q">
-                            <rect key="frame" x="120" y="12" width="147" height="28"/>
+                            <rect key="frame" x="128" y="12" width="147" height="28"/>
                             <constraints>
                                 <constraint firstAttribute="height" constant="28" id="sH9-HN-Ism"/>
                             </constraints>
@@ -26,10 +26,10 @@
                             <nil key="highlightedColor"/>
                         </label>
                         <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="course_tips" translatesAutoresizingMaskIntoConstraints="NO" id="pUs-nj-cKV">
-                            <rect key="frame" x="120" y="42" width="15" height="14"/>
+                            <rect key="frame" x="128" y="42" width="15" height="14"/>
                         </imageView>
                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="今日 15:00-15:45" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ebm-D0-ZwZ">
-                            <rect key="frame" x="140" y="41" width="105" height="16"/>
+                            <rect key="frame" x="148" y="41" width="105" height="16"/>
                             <fontDescription key="fontDescription" type="system" pointSize="13"/>
                             <color key="textColor" red="1" green="0.50196078431372548" blue="0.43529411764705883" alpha="1" colorSpace="calibratedRGB"/>
                             <nil key="highlightedColor"/>
@@ -46,7 +46,7 @@
                         <constraint firstAttribute="height" constant="70" id="bQc-MO-m30"/>
                         <constraint firstItem="I3Y-BW-zVy" firstAttribute="centerY" secondItem="Jzj-07-uBu" secondAttribute="centerY" id="cid-QZ-ZHY"/>
                         <constraint firstItem="ebm-D0-ZwZ" firstAttribute="leading" secondItem="pUs-nj-cKV" secondAttribute="trailing" constant="5" id="h4M-10-9kQ"/>
-                        <constraint firstItem="lrj-nH-46q" firstAttribute="leading" secondItem="Jzj-07-uBu" secondAttribute="leading" constant="120" id="qOf-lx-0rA"/>
+                        <constraint firstItem="lrj-nH-46q" firstAttribute="leading" secondItem="Jzj-07-uBu" secondAttribute="leading" constant="128" id="qOf-lx-0rA"/>
                         <constraint firstItem="pUs-nj-cKV" firstAttribute="top" secondItem="lrj-nH-46q" secondAttribute="bottom" constant="2" id="qbO-gb-XFq"/>
                         <constraint firstItem="pUs-nj-cKV" firstAttribute="leading" secondItem="lrj-nH-46q" secondAttribute="leading" id="tuQ-H0-4Df"/>
                         <constraint firstAttribute="trailing" secondItem="I3Y-BW-zVy" secondAttribute="trailing" constant="11" id="txu-hF-IbY"/>
@@ -76,26 +76,35 @@
                         <outletCollection property="gestureRecognizers" destination="rx0-oN-RKL" appends="YES" id="iaQ-no-GiC"/>
                     </connections>
                 </view>
-                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="home_course_video" translatesAutoresizingMaskIntoConstraints="NO" id="vsd-sl-jtT">
-                    <rect key="frame" x="25" y="7" width="105" height="83"/>
+                <imageView hidden="YES" clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="vsd-sl-jtT">
+                    <rect key="frame" x="14" y="-1" width="128" height="91"/>
                     <constraints>
-                        <constraint firstAttribute="height" constant="83" id="mxA-fh-cAU"/>
-                        <constraint firstAttribute="width" constant="105" id="u3O-yc-01G"/>
+                        <constraint firstAttribute="height" constant="91" id="mxA-fh-cAU"/>
+                        <constraint firstAttribute="width" constant="128" id="u3O-yc-01G"/>
                     </constraints>
                 </imageView>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="aUl-ls-p4K">
+                    <rect key="frame" x="14" y="-1" width="128" height="91"/>
+                    <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                </view>
             </subviews>
             <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
             <constraints>
                 <constraint firstAttribute="bottom" secondItem="Jzj-07-uBu" secondAttribute="bottom" id="A8I-iS-zIQ"/>
                 <constraint firstItem="Jzj-07-uBu" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="14" id="DgC-Xy-byN"/>
-                <constraint firstItem="vsd-sl-jtT" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="25" id="GvZ-Oq-MRu"/>
+                <constraint firstItem="aUl-ls-p4K" firstAttribute="bottom" secondItem="vsd-sl-jtT" secondAttribute="bottom" id="ZQt-az-0Mr"/>
                 <constraint firstAttribute="trailing" secondItem="Jzj-07-uBu" secondAttribute="trailing" constant="14" id="feY-bv-SDH"/>
+                <constraint firstItem="aUl-ls-p4K" firstAttribute="trailing" secondItem="vsd-sl-jtT" secondAttribute="trailing" id="g9B-UY-EHi"/>
+                <constraint firstItem="aUl-ls-p4K" firstAttribute="top" secondItem="vsd-sl-jtT" secondAttribute="top" id="gPk-3u-lmO"/>
+                <constraint firstItem="aUl-ls-p4K" firstAttribute="leading" secondItem="vsd-sl-jtT" secondAttribute="leading" id="hcn-Q6-rgN"/>
                 <constraint firstItem="vsd-sl-jtT" firstAttribute="bottom" secondItem="Jzj-07-uBu" secondAttribute="bottom" id="jb1-gr-dzL"/>
+                <constraint firstItem="vsd-sl-jtT" firstAttribute="leading" secondItem="Jzj-07-uBu" secondAttribute="leading" id="lY2-L7-ltx"/>
             </constraints>
             <nil key="simulatedTopBarMetrics"/>
             <nil key="simulatedBottomBarMetrics"/>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
             <connections>
+                <outlet property="imageBgView" destination="aUl-ls-p4K" id="cy9-xy-XoE"/>
                 <outlet property="timeLabel" destination="ebm-D0-ZwZ" id="N8s-Fo-9jS"/>
                 <outlet property="titleLabel" destination="lrj-nH-46q" id="y9y-NQ-vDX"/>
             </connections>
@@ -110,6 +119,5 @@
     <resources>
         <image name="course_tips" width="15" height="14"/>
         <image name="home_courseNext" width="18" height="18"/>
-        <image name="home_course_video" width="105" height="83"/>
     </resources>
 </document>

+ 5 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/MidiPlayer/MidiPlayerEngine.h

@@ -67,6 +67,11 @@ NS_ASSUME_NONNULL_BEGIN
 /* 通过轨道名称获取对应的轨道*/
 - (NSMutableArray *)getTrackNumerFromName:(NSArray *)trackNameArray;
 
+/**根据乐器编号获取所在轨道*/
+- (NSMutableArray *)getTrackWithInstrumentId:(UInt32)instrumentId;
+/**设置对应乐器编号所在轨道的播放音量*/
+- (BOOL)volumeTrackVolumeWithInstrumentId:(UInt32)instrumentId volume:(float)volume;
+
 - (void)getAllTrackVolume;
 
 /*  播放 */

+ 47 - 7
KulexiuForTeacher/KulexiuForTeacher/Module/MidiPlayer/MidiPlayerEngine.m

@@ -42,7 +42,7 @@
 
 @property (nonatomic, assign) BOOL isClickPlayer;
 @property (nonatomic, assign) MusicTimeStamp trackLength;
-
+@property (nonatomic, strong) NSMutableDictionary *instrumentTrackParm; // 乐器编号对应轨道
 @end
 
 @implementation MidiPlayerEngine
@@ -474,6 +474,7 @@
     const void *eventData;
     
     Boolean hasCurrentEvent = NO;
+    BOOL hasRecordTrackInstrument = NO;  // 是否记录了对应轨道的乐器 该判断是为了防止中途存在替换乐器的情况改变了记录的情况
     CheckError(MusicEventIteratorHasCurrentEvent(iterator, &hasCurrentEvent), "MusicEventIteratorHasCurrentEvent");
     while (hasCurrentEvent)
     {
@@ -529,12 +530,22 @@
                 
                 if((channel_evt->status& 0xF0) == 0xC0 ) {
                     
-//                     CHANNEL_PROGRAM_CHANGE 获取instrument id
-//                    NSLog(@"-- track index %d ------ instrument %d ", index, channel_evt->data1);
-                    
-                    if (channel_evt->data1 == self.instrumentId) {
-                        self.baseInstrumentTrack = index;
-                        [self.baseInstrumentArray addObject:@(index)];
+                    NSLog(@"-- track index %d ------ instrument %d ", index, channel_evt->data1);
+                    UInt32 instrumentId = channel_evt->data1;
+                    if (hasRecordTrackInstrument == NO) {
+                        // 0 ~ 7 都为钢琴
+                        if (instrumentId >= 0 && instrumentId <= 7) {
+                            instrumentId = 0;
+                        }
+                        NSString *instruemntKey = [NSString stringWithFormat:@"%d",instrumentId];
+                        NSMutableArray *valueArray = [NSMutableArray array];
+                        if ([[self.instrumentTrackParm allKeys] containsObject:instruemntKey]) {
+                            valueArray = [self.instrumentTrackParm mutableArrayValueForKey:instruemntKey];
+                        }
+                        
+                        [valueArray addObject:@(index)];
+                        [self.instrumentTrackParm setValue:valueArray forKey:instruemntKey];
+                        hasRecordTrackInstrument = YES;
                     }
                     
                     //                    /*
@@ -621,6 +632,27 @@
     return trackArray;
 }
 
+/**根据乐器编号获取所在轨道*/
+- (NSMutableArray *)getTrackWithInstrumentId:(UInt32)instrumentId {
+    NSString *key = [NSString stringWithFormat:@"%d",instrumentId];
+    return [self.instrumentTrackParm mutableArrayValueForKey:key];
+}
+/**设置对应乐器编号所在轨道的播放音量*/
+- (BOOL)volumeTrackVolumeWithInstrumentId:(UInt32)instrumentId volume:(float)volume {
+    // 0~7都是钢琴 全都取0
+    if (instrumentId >= 0 && instrumentId <= 7) {
+        instrumentId = 0;
+    }
+    NSMutableArray *trackArray = [self.instrumentTrackParm mutableArrayValueForKey:[NSString stringWithFormat:@"%d",instrumentId]];
+    if (trackArray.count) {
+        for (NSInteger index = 0; index < trackArray.count; index++) {
+           UInt32 track = [trackArray[index] intValue];
+            [self volume:volume WithTrack:track];
+        }
+    }
+    return NO;
+}
+
 - (void)muteTrackWithTrackNameExclude:(NSMutableArray *)trackNameArray {
     NSMutableArray *unMuteArray = [self getTrackNumerFromName:trackNameArray];
     for (UInt32 i = 0; i < self.trackCount; i++) {
@@ -960,6 +992,14 @@
     return _muteTrackArray;
 }
 
+- (NSMutableDictionary *)instrumentTrackParm {
+    if (!_instrumentTrackParm) {
+        _instrumentTrackParm = [NSMutableDictionary dictionary];
+    }
+    return _instrumentTrackParm;
+}
+
+
 - (void)dealloc {
     NSLog(@"************ player engine dealloc!");
 }

+ 3 - 0
KulexiuForTeacher/KulexiuForTeacher/Module/Mine/Setting/View/ModifyNameBodyView.m

@@ -29,6 +29,9 @@
 }
 
 - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string {
+    if ([string isEqualToString:@" "]) {
+        return NO;
+    }
     if ([string isEqualToString:@"\n"]) {
         [self endEditing:YES];
         return YES;

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