My Project
NEPitchSongScore.h
Go to the documentation of this file.
1// Copyright (c) 2022 NetEase, Inc. All rights reserved.
2// Use of this source code is governed by a MIT license that can be
3// found in the LICENSE file.
4
5#import <Foundation/Foundation.h>
6#import "NEPitchAudioData.h"
8
9NS_ASSUME_NONNULL_BEGIN
10
12@interface NEPitchSongScore : NSObject
13
18+ (instancetype)getInstance;
19
22- (void)initialize:(NEPitchRecordSingInfo *)info;
23
25@property(nonatomic, strong) NEPitchRecordSingInfo *info;
26
28@property(nonatomic, assign) NSInteger pitchShift;
29
31@property(nonatomic, copy) NSUInteger (^getCurrentPlayingTime)(void);
32
34@property(nonatomic, copy) void (^onNote)(NEPitchRecordItemModel *item);
36@property(nonatomic, copy) void (^onGrade)(NEPitchRecordSingMarkModel *markModel);
37
41- (void)start;
42
46- (void)pause;
47
51- (void)destroy;
56
61
66- (void)pushAudioData:(NEPitchAudioData *)audioData;
67
72- (void)seekTime:(NSInteger)startTime;
73
77- (void)resetPitch;
78
83- (void)getFinalScoreComplete:
84 (void (^)(NSError *_Nullable error,
85 NEPitchRecordSingInfo *_Nullable pitchRecordSingInfo))callback;
86
87@end
88
89NS_ASSUME_NONNULL_END
打分传入数据对象
Definition: NEPitchAudioData.h:10
打分库回调对象
Definition: NEPitchModel.h:39
打分相关信息对象:包含打分数据对象和歌词数据对象
Definition: NEPitchRecordSingInfo.h:33
分数对象
Definition: NEPitchRecordSingMarkModel.h:11
打分Engine
Definition: NEPitchSongScore.h:13
instancetype getInstance()
NSInteger pitchShift
变调
Definition: NEPitchSongScore.h:28
NEPitchRecordItemModel * lastRecord()
void(^ onNote)(NEPitchRecordItemModel *item)
实时音高回调
void(^ onGrade)(NEPitchRecordSingMarkModel *markModel)
实时打分回调
NEPitchRecordSingInfo * info
录制信息
Definition: NEPitchSongScore.h:25
NEPitchRecordSingMarkModel * lastMark()
NSUInteger(^ getCurrentPlayingTime)(void)
根据时间戳获取当前播放时间,必须实现,计算总分使用