-
Notifications
You must be signed in to change notification settings - Fork 10
/
MixingEngine.kt
69 lines (38 loc) · 2.34 KB
/
MixingEngine.kt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package com.bluehub.mixi.audio
class MixingEngine {
companion object {
init {
System.loadLibrary("audioEngine")
}
@JvmStatic external fun create(): Boolean
@JvmStatic external fun addFile(filePath: String, fd: Int): Boolean
@JvmStatic external fun readSamples(filePath: String, countPoints: Int): Array<Float>
@JvmStatic external fun deleteFile(filePath: String)
@JvmStatic external fun addSources(filePaths: Array<String>)
@JvmStatic external fun clearPlayerSources()
@JvmStatic external fun setPlayerHead(playHead: Int)
@JvmStatic external fun setSourcePlayHead(filePath: String, playHead: Int)
@JvmStatic external fun startPlayback()
@JvmStatic external fun pausePlayback()
@JvmStatic external fun getTotalSamples(filePath: String): Int
@JvmStatic external fun getTotalSampleFrames(): Int
@JvmStatic external fun getCurrentPlaybackProgress(): Int
@JvmStatic external fun gainSourceByDb(filePath: String, db: Float)
@JvmStatic external fun applySourceTransformation(filePath: String)
@JvmStatic external fun clearSourceTransformation(filePath: String)
@JvmStatic external fun setSourceBounds(filePath: String, start: Int, end: Int)
@JvmStatic external fun resetSourceBounds(filePath: String)
@JvmStatic external fun shiftBySamples(filePath: String, position: Int, numSamples: Int): Int
@JvmStatic external fun cutToClipboard(filePath: String, startPosition: Int, endPosition: Int): Int
@JvmStatic external fun copyToClipboard(filePath: String, startPosition: Int, endPosition: Int): Boolean
@JvmStatic external fun muteAndCopyToClipboard(filePath: String, startPosition: Int, endPosition: Int): Boolean
@JvmStatic external fun pasteFromClipboard(filePath: String, position: Int)
@JvmStatic external fun pasteNewFromClipboard(filePath: String)
@JvmStatic external fun setPlayerBoundStart(playerBoundStart: Int)
@JvmStatic external fun setPlayerBoundEnd(playerBoundEnd: Int)
@JvmStatic external fun resetPlayerBoundStart()
@JvmStatic external fun resetPlayerBoundEnd()
@JvmStatic external fun writeToFile(pathList: Array<String>, fd: Int): Boolean
@JvmStatic external fun delete()
}
}