     if 0 < itemsCount {
       
       // 左用の音かどうか判定（Lで終わっていたら左）
-      var regex = NSRegularExpression(pattern: "L$", options: NSRegularExpression.Options.allZeros, error: nil)
+      var regex = NSRegularExpression(pattern: "L$", options: [], error: nil)
       let isLeft: Bool = regex?.firstMatchInString(toneDir, options: NSRegularExpression.MatchingOptions.allZeros, range: NSMakeRange(0, toneDir.count)) != nil
       let _tones = isLeft ? ["02","01"] : ["01","02"]
       

        if 0 < layeredTones.count {
          let filePath = Bundle.main.path(forResource: "tones/\(toneDir)/layered/\(file)", ofType: "wav")!
          let fileURL = URL(fileURLWithPath: filePath)
          let audioFile = AVAudioFile(forWriting: fileURL, settings: nil)
          let audioFileBuffer = AVAudioPCMBuffer(PCMFormat: audioFile.processingFormat, frameCapacity: UInt32(audioFile.length))
          audioFile.readIntoBuffer(audioFileBuffer, error: nil)
          let player = AVAudioPlayerNode()
          engine.attach(player)
          engine.connect(player, to: mixer, format: audioFile.processingFormat)
          player.volume = 0.0
          player.scheduleBuffer(audioFileBuffer, atTime: nil, options:.Loops, completionHandler: nil)
          layeredPlayers += [player]
        }
      }

        for i in 1..<itemsCount+1 {
          let num = NSString(format: "%02d", isLeft ? itemsCount+1 - i : i) // 左車輪の音だったら反転し、２桁で0埋め
          let url = Bundle.main.path(forResource: "tones/\(toneDir)/\(num)", ofType: "wav")!
          let audioFile = AVAudioFile(forReading: URL(fileURLWithPath: url))
          audioFiles += [audioFile]
          
          let player = AVAudioPlayerNode()
