pub unsafe fn create_cpp_to_rust_pcm_sink(
    callback_target: NonNull<Box<dyn PCM_sink>>
) -> NonNull<PCM_sink>
Expand description

Creates a PCM_sink object on C++ side and returns a pointer to it.

This function is provided because Rust structs can’t implement C++ virtual base classes.

Example

See create_cpp_to_rust_control_surface(). Usage is very similar.

Cleaning up

In order to avoid memory leaks, you must take care of removing the C++ counterpart PCM sink by calling delete_cpp_pcm_sink().

Safety

This function is highly unsafe. Better use the medium-level API instead.