Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development Knowledge Base

BlackBerry 10 Audio Subsystem

by Retired on ‎12-19-2012 01:44 PM (7,857 Views)


BlackBerry® 10 audio subsystems consist of:

- Full duplex audio support

- Interface to the microphone, receiver, loudspeaker and headset.

- Analog-to-Digital Conversion for the microphone.

- Digital-to-Analog Conversion for the speaker.

- Hardware Audio Routing to select audio user interface (headset, speakerphone…)

- Io-audio enables voice processing (AEC, NR, Gain Control) and routes audio to voice path

- Volume control


These features are available through the Audio Library APIs as part of the BlackBerry 10 Native SDK. The Audio Library is based on the QNX® Sound Architecture API functions and has a lot of similarities to the Advanced Linux® Sound Architecture (ALSA) APIs.  Note that these are not directly compatible.  


Enabling Echo Cancellation:

One important API that both of the samples found in the GitHub® repository use is enabling acoustic echo cancellation (“voice "), noise supression as well as lower latnecy when opening a connection to an audio interface specified by name of the PCM device to open.


Access to capture (mic) and playback (spk) is made available by opening a connection to the “voice” PCM audio interface.



Capture: snd_pcm_open_name(&pcm_handle,"voice", SND_PCM_OPEN_CAPTURE); 


Github Repository: https://github.com/blackberry/Core-Native-Community-Samples


The AudioLoopBackSample sample demonstrates:

  1. Set-up the capture and playback interfaces.
  2. Read in a wave file and play out on device. This simulates far end speaker (PLAYBACK).
  3. Record the near end speech creating an output. wav file. This simulates near end speaker (CAPTURE).


The AudioLoopBackSamplesampleToFile sample demonstrates:

  1. Audio loopback supporting both simultaneous playback and record using raw PCM streams
  2. Echo cancellation using voice path
  3. Audio manager API to route audio to device earpiece


Instructions to run sample applications are in the README.txt file in github repository

Users Online
Currently online: 32 members 2,296 guests
Please welcome our newest community members: