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

App freezes for a moment when starting recording #135

Open
nazdream opened this issue Feb 8, 2022 · 4 comments
Open

App freezes for a moment when starting recording #135

nazdream opened this issue Feb 8, 2022 · 4 comments

Comments

@nazdream
Copy link

nazdream commented Feb 8, 2022

I am trying to record ARSKView with RecordAR. The problem I am facing is that every time I call RecordAR.record() the app freezes for a moment. Also, text-to-speech pronunciation is very laggy if I call it right after the record function.

Is there any way to avoid this issue? I couldn't find any possible way to prevent this issue in docs and in the internet. Any feedback is highly appreciated, thank you!

@hypafrag
Copy link

hypafrag commented Apr 9, 2022

Did you try dispatching record() call to background queue? I'm having same issue with freeze, that's first thing I wanna try.

@Ashes1st
Copy link

Ashes1st commented May 5, 2022

Try to call record with viewDidLoad. It's work for me. Issue looks like specific initialisation when first time starting record.

let recThread = Thread() {
self.recorder?.record()
sleep(1)
self.recorder?.stop()
}
recThread.name = "rec"
recThread.start()

@CaglarDemirci
Copy link

CaglarDemirci commented Dec 10, 2022

I am trying to record ARSKView with RecordAR. The problem I am facing is that every time I call RecordAR.record() the app freezes for a moment. Also, text-to-speech pronunciation is very laggy if I call it right after the record function.

Is there any way to avoid this issue? I couldn't find any possible way to prevent this issue in docs and in the internet. Any feedback is highly appreciated, thank you!

I have the same problem did you find something ? @nazdream

@DangHung301
Copy link

DangHung301 commented Aug 28, 2023

self.showLoading()
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(1), execute: {
self.startTimer(recoder: record)
DispatchQueue.main.asyncAfter(deadline: .now() + .seconds(3), execute: {
print("done")
self.resetCoudown()
self.showView()
isFirstApp = false
})
})

I also had the same problem and solved it by adding the above code after I initialized RecordAR @nazdream

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants