NPLRuntime icon indicating copy to clipboard operation
NPLRuntime copied to clipboard

录音支持

Open e-setup opened this issue 6 years ago • 12 comments

希望NPLRuntime可以有调用系统默认录音设备录制声音的支持。 录制的声音可以输出到文件。

e-setup avatar May 22 '18 10:05 e-setup

what is the audio format? and we can only provide win32 solution for the moment

LiXizhi avatar May 22 '18 11:05 LiXizhi

@SleepingBuffer we can add an recording API in MovieCodec plugin. And give an API to record microphone only.

LiXizhi avatar May 22 '18 11:05 LiXizhi

format can be any type that nplruntime's audio engine can play.

e-setup avatar May 23 '18 01:05 e-setup

got it

SleepingBuffer avatar May 23 '18 02:05 SleepingBuffer

这个进展到哪一步了?

xixichen007 avatar May 28 '18 03:05 xixichen007

it will be done today

SleepingBuffer avatar May 29 '18 06:05 SleepingBuffer

Please let us know when u commit this API, we'll merge it immediately into our branch. @SleepingBuffer

e-setup avatar May 30 '18 03:05 e-setup

// start recording 
ParaEngine::CAudioEngine2::GetInstance()->getMCIController()->Start();
// stop recording when you finish
ParaEngine::CAudioEngine2::GetInstance()->getMCIController()->Stop();
// save to the file
ParaEngine::CAudioEngine2::GetInstance()->getMCIController()->Save("C:/Users/azoth/Desktop/test.wav");

SleepingBuffer avatar May 31 '18 02:05 SleepingBuffer

@e-setup

SleepingBuffer avatar May 31 '18 02:05 SleepingBuffer

called from lua script

ParaAudio.StartRecording();
ParaAudio.StopRecording();
ParaAudio.SaveRecording("C:/Users/azoth/Desktop/test.wav");

SleepingBuffer avatar May 31 '18 04:05 SleepingBuffer

@SleepingBuffer 调用录音接口录制的声音用NPLRumtime的播放接口播放不出来。 test.zip

kevinypcao avatar Jun 06 '18 07:06 kevinypcao

Note: the audio file format must be native .wav

SleepingBuffer avatar Jun 12 '18 02:06 SleepingBuffer