Summary
The iOS/macOS builds of this WebRTC fork currently do not expose the custom audio source API (CaptureFrame/OnData) that is available in the Windows/Linux builds (libwebrtc). This creates a platform inconsistency that prevents developers from implementing custom audio sources on Apple platforms.
Background
Current Platform Disparity
Windows/Linux (libwebrtc)
- Publicly exposes
RTCAudioSource::CaptureFrame() API
- Supports
SourceType::kCustom for custom audio sources
- Includes patch:
custom_audio_source_m137.patch
- Header:
include/rtc_audio_source.h
class RTCAudioSource : public RefCountInterface {
public:
enum SourceType { kMicrophone, kCustom };
virtual void CaptureFrame(const void* audio_data,
int bits_per_sample,
int sample_rate,
size_t number_of_channels,
size_t number_of_frames) = 0;
};
iOS/macOS (CocoaPods WebRTC-SDK)
- Objective-C wrapper only exposes
volume property
- No way to inject custom audio data
- Underlying
webrtc::AudioSourceInterface not accessible
@interface RTCAudioSource : RTCMediaSource
@property(nonatomic, assign) double volume;
// No CaptureFrame or equivalent method
@end
Questions
- Is there a specific reason this API is not exposed on Apple platforms?
I'm happy to contribute the implementation if this approach is acceptable.
Thank you for maintaining this valuable fork of WebRTC!
Summary
The iOS/macOS builds of this WebRTC fork currently do not expose the custom audio source API (
CaptureFrame/OnData) that is available in the Windows/Linux builds (libwebrtc). This creates a platform inconsistency that prevents developers from implementing custom audio sources on Apple platforms.Background
Current Platform Disparity
Windows/Linux (libwebrtc)
RTCAudioSource::CaptureFrame()APISourceType::kCustomfor custom audio sourcescustom_audio_source_m137.patchinclude/rtc_audio_source.hiOS/macOS (CocoaPods WebRTC-SDK)
volumepropertywebrtc::AudioSourceInterfacenot accessibleQuestions
I'm happy to contribute the implementation if this approach is acceptable.
Thank you for maintaining this valuable fork of WebRTC!