Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering error after edit chapter action with no audio (OT-866 Cont) #1134

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ import org.wycliffeassociates.otter.common.domain.content.WorkbookFileNamerBuild
import org.wycliffeassociates.otter.common.persistence.IDirectoryProvider
import org.wycliffeassociates.otter.common.recorder.WavFileWriter
import java.io.File
import java.lang.Integer.max
import java.time.LocalDate
import java.util.concurrent.atomic.AtomicBoolean
import java.util.concurrent.atomic.AtomicInteger
Expand Down Expand Up @@ -517,15 +518,14 @@ class Narration @AssistedInject constructor(
)
}


val scratchAudio = chapterRepresentation.scratchAudio
var start = if (scratchAudio.totalFrames == 0) 0 else scratchAudio.totalFrames + 1
var end: Int
val frameSizeInBytes = chapterRepresentation.frameSizeInBytes

segments.forEach { (marker, file) ->
val verseAudio = AudioFile(file)
end = start + verseAudio.totalFrames - 1
end = max(start + verseAudio.totalFrames - 1, 0)

val node = VerseNode(
true,
Expand Down
Loading