Using onOneWayAudioRawDataReceived from C# Wrapper

Description
I’m looking for the onOneWayAudioRawDataReceived method in the C# wrapper, but I’m not able to find it. I’m wondering if it is in the roadmap, and also if there are links for importing the method from the C++ library into the C# library.

C# Wrapper SDK version
v5.5.12509.0330

Device (please complete the following information):

  • OS: Windows 10

Hey @tyler,

Thanks for using the dev forum!

That method is not currently implemented in the C# wrapper, and would have to be implemented locally. I would recommend following the relative steps here, but for the functions you are looking for: Customized UI C# callback - #3 by Carson_Chen.

Please note, that rawdata is not currently supported for developers at this time.

Thanks!
Michael

Hey @Michael_Condon,

I checked the post and I’m not immediately seeing the relationship between the two methods, but I’ll keep digging. I admit my C++ is a bit rusty so this might take some effort to get what I want working.

Please note, that rawdata is not currently supported for developers at this time.

Not sure what you meant by this. Does this mean that onOneWayAudioRawDataReceived is not currently working in the C++ library? Or am I misunderstanding?

Also, do you have any code samples of setups for onOneWayAudioRawDataReceived? I read the documentation here (https://marketplace.zoom.us/docs/sdk/video/windows/advanced/raw-data), but seeing it as part of a full project might be useful.

One more thing … is the C# wrapper open source? If so, that would be REALLY useful as I could use that as a reference for wrapping onOneWayAudioRawDataReceived as part of the ZOOM_SDK_DOTNET_WRAP.CZoomSDKeDotNetWrap.Instance.

Thanks for the fast reply!

Hi @tyler,

Not sure what you meant by this. Does this mean that onOneWayAudioRawDataReceived is not currently working in the C++ library? Or am I misunderstanding?

In order to utilize raw data in any of our Client SDKs, a raw data license is required. It is currently not possible to obtain a raw data license. We would like to be able to make this feature more widely available in the future, but do not yet have a timeline on when it will be more easily accessible.

Also, do you have any code samples of setups for onOneWayAudioRawDataReceived ?

We are actively working on improving our existing SDK documentation. If/when raw data licenses become generally available, there should be documentation to accompany it.

One more thing … is the C# wrapper open source?

It was previously, but unfortunately that is no longer the case. We are looking into whether or not we can resume this practive in the future.

Thanks!

Hey @jon.lieblich,

So to clarify, retrieving raw audio data following the procedure listed on this page is not possible?

If so, why is this functionality listed in the zoom marketplace? I’ve been playing with the IZoomSDKAudioRawDataDelegate for the past few days but haven’t gotten it connected yet.

Please note this is for the C++ SDK and not the C# wrapper.

@jon.lieblich follow up question … though my original question stands; is the code in https://marketplace.zoom.us/docs/sdk/video/windows/advanced/raw-data not meant to be used? If so, how do we go about getting a raw data license?

Here is the code I have. Before entering this method, I’m initializing the Zoom instance in C# and then calling this method which might also be causing an issue.

When I run this, hasLicense is false, and pAudioHelper is null.

namespace HELPER {
    typedef void (*CallbackFunction)(char*, uint32_t);

    class AudioDelegateImplementation : public ZOOM_SDK_NAMESPACE::IZoomSDKAudioRawDataDelegate {
    private:
        CallbackFunction m_onOneWayAudioReceived;
    public:
        AudioDelegateImplementation(CallbackFunction cb) {
            m_onOneWayAudioReceived = cb;
        }

        ~AudioDelegateImplementation() {

        }

        void onMixedAudioRawDataReceived(AudioRawData* data_) override {

        }

        void onOneWayAudioRawDataReceived(AudioRawData* data_, uint32_t node_id) override {
            // Access user-specific raw data here for the user associated with the user.
            if (!data_) return;

            unsigned int audioChannelNumber = data_->GetChannelNum();
            unsigned int audioSampleRate = data_->GetSampleRate();
            unsigned int bufferLength = data_->GetBufferLen();

            char* buffer = data_->GetBuffer();

            m_onOneWayAudioReceived(buffer, node_id);
        };
    };
}
...
    __declspec(dllexport) void __stdcall setup_audio_stream(HELPER::CallbackFunction cb) {
        bool hasLicense = ZOOM_SDK_NAMESPACE::HasRawdataLicense();

        ZOOM_SDK_NAMESPACE::IZoomSDKAudioRawDataHelper* pAudioHelper = ZOOM_SDK_NAMESPACE::GetAudioRawdataHelper();

        HELPER::AudioDelegateImplementation* delegateObj = new HELPER::AudioDelegateImplementation(cb);
        pAudioHelper->subscribe(delegateObj);
    }

Hey @tyler,

I apologize for the confusion here. The link that was tagged is for the Video SDK and not the Client SDK. Zoom provides two separate SDK’s: the Client SDK (or Meeting SDK), which is for embedded a Zoom Meeting Experience into your application, and a Video SDK for creating online video streaming sessions. Raw data is supported for all developers in the Video SDK, but needs a license in the Client SDK. The functionality and API for both SDK’s is very similar when it comes to raw data.

The code in that link is for the Video SDK. It will work if you are using that SDK, but is not meant to be used in the Client SDK. At this time, we do not have a process for distributing raw data licenses in the Client SDK, but it is on the roadmap for the near future.

Thanks!
Michael

Thanks @Michael_Condon. Where can I subscribe for updates about the raw audio license? I’d be very anxious to know when it is available.

Hey @tyler,

We do not currently have a medium for subscribing to updates about this. However, I can update this thread when I hear any news.

Thanks!
Michael