[Bug 732896] New: iOS: AudioUnit on iOS produces echo with in/out streams
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Jul 8 05:27:00 PDT 2014
https://bugzilla.gnome.org/show_bug.cgi?id=732896
GStreamer | gst-plugins-good | 1.x
Summary: iOS: AudioUnit on iOS produces echo with in/out
streams
Classification: Platform
Product: GStreamer
Version: 1.x
OS/Version: Mac OS
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.freedesktop.org
ReportedBy: elio.francesconi at gmail.com
QAContact: gstreamer-bugs at lists.freedesktop.org
GNOME version: ---
The osxaudiosrc plugin is Remote I/O unit it is not suited for VoIP purpose
because no echo cancellator.
According to the Apple documentation, The Voice-Processing I/O unit extends the
Remote I/O unit by adding acoustic echo cancelation for use in a VoIP or
voice-chat application.
https://developer.apple.com/library/ios/documentation/MusicAudio/Conceptual/AudioUnitHostingGuide_iOS/AudioUnitHostingFundamentals/AudioUnitHostingFundamentals.html
To use Voice-rocessing I/O unit I did these changes:
in gstosxcoreaudioremoteio.c
static gboolean
gst_core_audio_open_impl (GstCoreAudio * core_audio)
{
return gst_core_audio_open_device (core_audio,
kAudioUnitSubType_VoiceProcessingIO,
"VoiceProcessingIO");
//return gst_core_audio_open_device (core_audio, kAudioUnitSubType_RemoteIO,
// "RemoteIO");
}
This patch was not enough to solve the issue because I received status = -50
after some calls of AudioUnitRender in getosxaudiosrc.c, it seems
AudioUnitRender modifies
buf->core_audio->recBufferList->mBuffers[0].mDataByteSize based on data
returned, so before call AudioUnitRender it requires to set mDataByteSize today
I’ve created mine osxaudio plugin with these changes, hardcoding "bytes per
frame” and “channels” and solved my problem, I did’d check the buffer allocated
because it’s big enough.
buf->core_audio->recBufferList->mNumberBuffers=1;
buf->core_audio->recBufferList->mBuffers[0].mDataByteSize=inNumberFrames*4/*where
4 is bytes per frame*/;
buf->core_audio->recBufferList->mBuffers[0].mNumberChannels=1 /*num of
channels*/;
status = AudioUnitRender (buf->core_audio->audiounit, ioActionFlags,
inTimeStamp, inBusNumber, inNumberFrames,
buf->core_audio->recBufferList);
if (status) {
GST_WARNING_OBJECT (buf, "AudioUnitRender returned %d", (int) status);
return status;
}
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the gstreamer-bugs
mailing list