Skip to content

Commit

Permalink
Bugfix in processor
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanntg committed Oct 10, 2016
1 parent 98c64bf commit 6fd171d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions SyllableDetector/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>0.3.1</string>
<string>0.3.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>13</string>
<string>14</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.education</string>
<key>LSMinimumSystemVersion</key>
Expand Down
2 changes: 2 additions & 0 deletions SyllableDetector/Processor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -289,5 +289,7 @@ final class ProcessorArduino: ProcessorBase {
}
}
}

super.prepareOutputFor(index: index, seenSyllable: seen)
}
}
6 changes: 5 additions & 1 deletion SyllableDetector/ViewControllerProcessor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,16 @@ class ViewControllerProcessor: NSViewController, NSTableViewDelegate, NSTableVie
else {
// create process
do {
// initialize processor
switch deviceOutput! {
case .arduino(let port):
processor = try ProcessorArduino(deviceInput: deviceInput, deviceOutput: port, entries: processorEntries)
case .audio(let interface):
processor = try ProcessorAudio(deviceInput: deviceInput, deviceOutput: interface, entries: processorEntries)
}

// setup
try processor!.setUp()
}
catch {
// show an error message
Expand Down Expand Up @@ -241,7 +245,7 @@ class ViewControllerProcessor: NSViewController, NSTableViewDelegate, NSTableVie

// check sampling rate
if (1 < abs(config.samplingRate - self.deviceInput.sampleRateInput)) {
DLog("Mismatched sampling rates. Expecting: \(config.samplingRate). Device: \(self.deviceInput.sampleRateInput).")
print("Mismatched sampling rates. Expecting: \(config.samplingRate). Device: \(self.deviceInput.sampleRateInput).")
self.processorEntries[row].resampler = ResamplerLinear(fromRate: self.deviceInput.sampleRateInput, toRate: config.samplingRate)
}

Expand Down

0 comments on commit 6fd171d

Please sign in to comment.