You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I configured this empty method to be the callback:
When starting, I get a lot of exceptions caused by VideoKit:
UnityException: get_isPlaying can only be called from the main thread.
Constructors and field initializers will be executed from the loading thread when loading a scene.
Don't use this function in the constructor or field initializers, instead move initialization code to the Awake or Start function.
UnityEngine.Events.PersistentCall.GetRuntimeCall (UnityEngine.Events.UnityEventBase theEvent) (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:451)
UnityEngine.Events.PersistentCallGroup.Initialize (UnityEngine.Events.InvokableCallList invokableList, UnityEngine.Events.UnityEventBase unityEventBase) (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:656)
UnityEngine.Events.UnityEventBase.RebuildPersistentCallsIfNeeded () (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:837)
UnityEngine.Events.UnityEventBase.PrepareInvoke () (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent.cs:880)
UnityEngine.Events.UnityEvent`1[T0].Invoke (T0 arg0) (at /Users/bokken/buildslave/unity/build/Runtime/Export/UnityEvent/UnityEvent/UnityEvent_1.cs:53)
VideoKit.VideoKitAudioManager.OnSampleBuffer (VideoKit.Devices.AudioBuffer audioBuffer) (at Library/PackageCache/ai.natml.videokit@0.0.15/Runtime/VideoKitAudioManager.cs:187)
VideoKit.Devices.AudioDevice+<>c__DisplayClass11_0.<StartRunning>b__0 (System.IntPtr sampleBuffer) (at Library/PackageCache/ai.natml.videokit@0.0.15/Runtime/Devices/AudioDevice.cs:63)
VideoKit.Devices.AudioDevice.OnAudioBuffer (System.IntPtr context, System.IntPtr sampleBuffer) (at Library/PackageCache/ai.natml.videokit@0.0.15/Runtime/Devices/AudioDevice.cs:185)
UnityEngine.Debug:LogException(Exception)
VideoKit.Devices.AudioDevice:OnAudioBuffer(IntPtr, IntPtr) (at Library/PackageCache/ai.natml.videokit@0.0.15/Runtime/Devices/AudioDevice.cs:188)
The text was updated successfully, but these errors were encountered:
Bump
I came across this issue in one of my other projects when trying to record from Microphone device using VideoKitRecorder. Would be great to see it fixed soon so I can add Videokit's VideoKitRecorder to my project instead of using my own recording logic.
I tried to use the OnAudioBuffer feature of the VideoKitAudioManager.
I assigned a device to the script and called StartRunning
I configured this empty method to be the callback:
![Screenshot 2023-11-01 at 17 32 30](https://private-user-images.githubusercontent.com/10696948/279740053-5519b33e-8314-47fe-971b-ac9899a32442.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTI0NzcsIm5iZiI6MTczOTA5MjE3NywicGF0aCI6Ii8xMDY5Njk0OC8yNzk3NDAwNTMtNTUxOWIzM2UtODMxNC00N2ZlLTk3MWItYWM5ODk5YTMyNDQyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA5MDkzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4ODhhMjY3YWRhYTkzMTAxMTE4NmViODg5MmZjMDU0ZmUzNzgzNWY4YmE2NjM3YmZlODFmZWJlYWM5MjhkMjcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.oREk8ncG99KttmefgF6dgIMv-3M8hCp-m3Cs8H7t9lM)
![Screenshot 2023-11-01 at 17 32 48](https://private-user-images.githubusercontent.com/10696948/279740117-734d4d38-e5c5-4f72-a07a-3901cd0faf46.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkwOTI0NzcsIm5iZiI6MTczOTA5MjE3NywicGF0aCI6Ii8xMDY5Njk0OC8yNzk3NDAxMTctNzM0ZDRkMzgtZTVjNS00ZjcyLWEwN2EtMzkwMWNkMGZhZjQ2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjA5VDA5MDkzN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTBmNmVlMWFhNDg1YTZmODQzN2Y4MWFiMDEyM2YwZjU5OTJiMDRlNzlmMzBmMmIwZmY5ZTgxY2VmYWRmMzg2ZTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.u8eTmU3YS3XvsuJ7Oj7JDyiD1QjfrhJ7PA90VvAxiew)
When starting, I get a lot of exceptions caused by VideoKit:
The text was updated successfully, but these errors were encountered: