Recorder.InputFactory must be specified if Recorder.Source set to Factory
I am having some issues with instantiating a custom audio recorder for my application. I've been following the steps in the FAQ (https://doc.photonengine.com/en-us/voice/current/troubleshooting/faq#how_to_use_a_custom_audio_source_) pretty well until I've come to step 3 where I need to create an instance of my class during app initialization. I am doing that, but I have no idea how to link it to the Photon Recorder. I made a clone of the sample AudioClipWrapper. I have been attempting to initialize it in a separate PhotonManager Script in its Start method, where I have this so far:
Recorder audioSource = new MyAudioReaderSource(audioClip);
recorder.InputFactory = (rec) => audioSource;
However, Visual Studio is saying that Delegate 'Func<IAudioDesc>' does not take 1 arguments. If anyone can explain to me a more detailed method of going about using the Factory input source type with Photon Voice, or knows how to remedy this issue would be much appreciated. I've searched high and low for this info but for whatever reason I can't seem to find it.
Recorder audioSource = new MyAudioReaderSource(audioClip);
recorder.InputFactory = (rec) => audioSource;
However, Visual Studio is saying that Delegate 'Func<IAudioDesc>' does not take 1 arguments. If anyone can explain to me a more detailed method of going about using the Factory input source type with Photon Voice, or knows how to remedy this issue would be much appreciated. I've searched high and low for this info but for whatever reason I can't seem to find it.
0
Comments
Thank you for choosing Photon!
The snippet on the doc is wrong, sorry about that we will fix it:
it should be
instead of
besides, the following line looks wrong:
So in your case all you need is:
Check if there is no exceptions thrown or errors logged.
Make sure constructor works fine, here is another way of doing this where you could add checks and logs:
use instead of