fixes for Swift 6 and threading concerns
This commit is contained in:
@@ -293,7 +293,7 @@ final class SineToneAudioEnvSynth: SynthesizerBase {
|
||||
}
|
||||
}
|
||||
|
||||
func populateControlEnv(_ engine: SynthesisEngine) {
|
||||
@MainActor func populateControlEnv(_ engine: SynthesisEngine) {
|
||||
for i: Int in 0..<16 {
|
||||
do {
|
||||
try engine.add(SineToneControlEnvSynth(freq: 220.0 * pow(2.0, Double(i) / 12.0), bus: 0))
|
||||
@@ -303,7 +303,7 @@ func populateControlEnv(_ engine: SynthesisEngine) {
|
||||
}
|
||||
}
|
||||
|
||||
func populateAudioEnv(_ engine: SynthesisEngine) {
|
||||
@MainActor func populateAudioEnv(_ engine: SynthesisEngine) {
|
||||
for i: Int in 0..<16 {
|
||||
do {
|
||||
try engine.add(SineToneAudioEnvSynth(freq: 220.0 * pow(2.0, Double(i) / 12.0), bus: 0))
|
||||
@@ -405,7 +405,7 @@ final class PitchShiftSynth: SynthesizerBase {
|
||||
}
|
||||
}
|
||||
|
||||
func populatePoolN(_ engine: SynthesisEngine, count: Int, overlap: Int) {
|
||||
@MainActor func populatePoolN(_ engine: SynthesisEngine, count: Int, overlap: Int) {
|
||||
for i: Int in 0..<count {
|
||||
do {
|
||||
try engine.add(TuneablePitchShiftSynth(
|
||||
@@ -419,7 +419,7 @@ func populatePoolN(_ engine: SynthesisEngine, count: Int, overlap: Int) {
|
||||
}
|
||||
}
|
||||
|
||||
func populate4HeadN(_ engine: SynthesisEngine, count: Int) {
|
||||
@MainActor func populate4HeadN(_ engine: SynthesisEngine, count: Int) {
|
||||
for i: Int in 0..<count {
|
||||
do {
|
||||
try engine.add(PitchShiftSynth(
|
||||
|
||||
Reference in New Issue
Block a user