nRF5 SDK v14.0.0
USB Audio Class Example
This information applies to the nRF52840 SoC only.

This example uses the USB audio class module. See the documentation of this module for links to relevant specification documents.

This example shows how to declare and register two audio class instances to the USB library:

Both classes will enumerate as separate devices. Input audio stream (headphones) is passed to the output audio stream (microphone).

usb_example_audio.svg
Input and output audio streams

Setup

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\peripheral\usbd_audio

LED assignments:

Testing

Test the USB Audio Class Example application by performing the following steps:

  1. Compile and program the application.
  2. Connect the development kit to the host computer.
  3. Choose "nRF52 USB Audio Demo" headphones as a default audio output device.
  4. Choose "nRF52 USB Audio Demo" microphone as a default audio input device.
  5. Start audio streaming, for example by playing an audio file on your PC.
  6. Start audio recording.
  7. Verify the recorded audio stream.

Documentation feedback | Developer Zone | Subscribe | Updated