Skip to content

Commit 36e4c73

Browse files
committed
Sliding window for debugging
1 parent 75011a7 commit 36e4c73

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

AudioCoder/src/main/java/org/operatorfoundation/audiocoder/WSPRProcessor.kt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,14 @@ class WSPRProcessor
135135
*/
136136
private fun generateSlidingWindows(): List<DecodeWindow>
137137
{
138-
// Single window if buffer fits within decoder limits
138+
// Check if we have enough audio
139+
if (audioBuffer.size < REQUIRED_DECODE_SAMPLES)
140+
{
141+
Timber.w("Insufficient audio for decode: ${audioBuffer.size} samples < ${REQUIRED_DECODE_SAMPLES} required")
142+
return emptyList()
143+
}
144+
145+
// Single window if buffer fits exactly within decoder limits
139146
if (audioBuffer.size <= REQUIRED_DECODE_SAMPLES)
140147
{
141148
return listOf(DecodeWindow(0, audioBuffer.size, "Full buffer"))

AudioCoder/src/main/java/org/operatorfoundation/audiocoder/models/WSPRStationConfiguration.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ data class WSPRStationConfiguration(
3434
return WSPRStationConfiguration(
3535
operatingFrequencyMHz = WSPRBandplan.getDefaultFrequency(),
3636
useLowerSidebandMode = false,
37-
useTimeAlignedDecoding = true,
37+
useTimeAlignedDecoding = false,
3838
stationCallsign = null,
3939
stationGridSquare = null
4040
)

0 commit comments

Comments
 (0)