Skip to content

Commit

Permalink
One console log, crashed the entire app
Browse files Browse the repository at this point in the history
  • Loading branch information
MatejMecka committed Nov 25, 2023
1 parent fd0c1e6 commit e1e507b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/audio/ExtractAudioTracks.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,12 @@
offlineContext.oncomplete = function(renderedBuffer) {
console.log(renderedBuffer)
console.log(renderedBuffer.renderedBuffer.getChannelData(0))
console.log(renderedBuffer.renderedBuffer.getChannelData(1))
try {
console.log(renderedBuffer.renderedBuffer.getChannelData(1))
} catch(e) {
console.log("Doesn't have a second channel!")
console.error(e.message)
}
BUFFER_AUDIO_DATA = renderedBuffer.renderedBuffer.getChannelData(0)
return renderedBuffer.renderedBuffer.getChannelData(0)
};
Expand Down

0 comments on commit e1e507b

Please sign in to comment.