RenderHeads / UnityPlugin-AVProMovieCapture

AVPro Movie Capture is a Unity Plugin for advanced video capture to AVI/MP4/MOV files
https://renderheads.com/products/avpro-movie-capture/
43 stars 8 forks source link

[Bug] Sound not release after capture audio with miscrophone #366

Closed fanghuaiyi closed 5 months ago

fanghuaiyi commented 5 months ago

Unity Version

2018.4.35f1

AVPro Movie Capture Version

5.2.0 mobile

Which platform(s) are you using?

iOS

Which OS version(s) are you using?

No response

Which rendering API(s) are you using?

Metal

Hardware

No response

Which capture component are you using?

Capture From Camera

Capture mode

Realtime

Which output mode are you using?

Video file

Video codecs

H264

Audio source

Microphone

Audio codecs

AAC

Any other component configuration

No response

The issue

Our game use wwsie2021.1.13 and Unity 2018.4.35f1. we use avproVideo to record video with microphone. But after stop record, The sound in our game is gone and never recorved. Is there some method to release sound? Please help, thank you very much!!

our code is in lua like this: function InitCatupre() logEx("vrcameraLog InitCatupre") capture.OutputTarget = RenderHeads.Media.AVProMovieCapture.OutputTarget.VideoFile capture.StopMode = RenderHeads.Media.AVProMovieCapture.StopMode.None capture.OutputFolder = RenderHeads.Media.AVProMovieCapture.CaptureBase.OutputPath.RelativeToPeristentData capture.OutputFolderPath = "Captures" capture.AudioCaptureSource = RenderHeads.Media.AVProMovieCapture.AudioCaptureSource.Microphone capture.NativeForceAudioCodecIndex = 0 capture.FilenameExtension = "mp4" capture:SelectAudioCodec() capture.NativeForceVideoCodecIndex = 1 capture:SelectVideoCodec() capture:SelectAudioInputDevice()

-- logEx("CatupreLog name: ", capture.SelectedVideoCodec.Name, ", idx: ", capture.SelectedVideoCodec.Index, ", MediaApi: ", capture.SelectedVideoCodec.MediaApi) end

Log output

No response

fanghuaiyi commented 5 months ago

finally we fixed it by calling wwsie AkSoundEngine.WakeupFromSuspend(); image