|
@@ -17,10 +17,6 @@
|
|
#import <KSTunerLibrary/KSTunerLibrary-Swift.h>
|
|
#import <KSTunerLibrary/KSTunerLibrary-Swift.h>
|
|
#import "MetronomeManager.h"
|
|
#import "MetronomeManager.h"
|
|
|
|
|
|
-
|
|
|
|
-// 正确后暂停的时间
|
|
|
|
-static float correctTime = 0.5;
|
|
|
|
-
|
|
|
|
@interface ToneTuningViewController ()<TunerDelegate>
|
|
@interface ToneTuningViewController ()<TunerDelegate>
|
|
|
|
|
|
@property (nonatomic, strong) TuningNavView *navView;
|
|
@property (nonatomic, strong) TuningNavView *navView;
|
|
@@ -59,13 +55,6 @@ static float correctTime = 0.5;
|
|
// A4 频率
|
|
// A4 频率
|
|
@property (nonatomic, assign) NSInteger A4Frequence;
|
|
@property (nonatomic, assign) NSInteger A4Frequence;
|
|
|
|
|
|
-/**
|
|
|
|
- 上次显示正确的时间
|
|
|
|
- */
|
|
|
|
-@property(nonatomic, assign) NSTimeInterval lastCorrectTime;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
|
|
|
@end
|
|
@end
|
|
|
|
|
|
@implementation ToneTuningViewController
|
|
@implementation ToneTuningViewController
|
|
@@ -318,6 +307,8 @@ static float correctTime = 0.5;
|
|
case TUNINGACTION_PLAY: // 播放音叉
|
|
case TUNINGACTION_PLAY: // 播放音叉
|
|
{
|
|
{
|
|
[self startForkPlay];
|
|
[self startForkPlay];
|
|
|
|
+ // 停止播放节拍器
|
|
|
|
+ [self stopPlayBeat];
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case TUNINGACTION_STOP: // 停止音叉
|
|
case TUNINGACTION_STOP: // 停止音叉
|
|
@@ -328,6 +319,8 @@ static float correctTime = 0.5;
|
|
case TUNINGACTION_BEATPLAY:
|
|
case TUNINGACTION_BEATPLAY:
|
|
{
|
|
{
|
|
[self startPlayBeat];
|
|
[self startPlayBeat];
|
|
|
|
+ // 停止音叉
|
|
|
|
+ [self stopForkPlay];
|
|
}
|
|
}
|
|
break;
|
|
break;
|
|
case TUNINGACTION_BEATSTOP:
|
|
case TUNINGACTION_BEATSTOP:
|
|
@@ -419,7 +412,8 @@ static float correctTime = 0.5;
|
|
MJWeakSelf;
|
|
MJWeakSelf;
|
|
[_forkView forkSettingAction:^(CGFloat frequence, BOOL isSure) {
|
|
[_forkView forkSettingAction:^(CGFloat frequence, BOOL isSure) {
|
|
NSLog(@"----- frequence %f", frequence);
|
|
NSLog(@"----- frequence %f", frequence);
|
|
-
|
|
|
|
|
|
+ // 停止播放节拍器
|
|
|
|
+ [weakSelf stopPlayBeat];
|
|
weakSelf.chooseFrequence = frequence;
|
|
weakSelf.chooseFrequence = frequence;
|
|
if (weakSelf.bodyView.isPlaying) {
|
|
if (weakSelf.bodyView.isPlaying) {
|
|
CGFloat changefrequence = frequence / A4_FREQUENCE_INTABLE * self.A4Frequence;
|
|
CGFloat changefrequence = frequence / A4_FREQUENCE_INTABLE * self.A4Frequence;
|