# Mix Microphone , Sound and background sound to raw pcm stream

**URL:** https://qa.fmod.com/t/mix-microphone-sound-and-background-sound-to-raw-pcm-stream/15998
**Category:** FMOD Engine
**Tags:** csharp, cpp
**Created:** [July 23, 2020, 7:27am UTC](https://qa.fmod.com/t/mix-microphone-sound-and-background-sound-to-raw-pcm-stream/15998 "2020-07-23T07:27:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![LoVic](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@LoVic](https://qa.fmod.com/u/LoVic)
#### Post date: [July 23, 2020, 7:27am UTC](https://qa.fmod.com/t/mix-microphone-sound-and-background-sound-to-raw-pcm-stream/15998/1 "2020-07-23T07:27:58Z")

</div>

Hello  
How can I implement a similar scheme?  
Where can you see examples of this?

```
[MY DSP]<--[CHANNEL HEAD]<---[SOUND.MP3]  
                 /                                                                                                      
[DSPCHANNELMIXER]<---[CHANNEL HEAD]<---[WAVETABLE - BACKGROUND.WAV] 
                 \                                                                                                     
                  [MY DSP]<--[CHANNEL HEAD]<---[MICROPHONE IN]
```

[MY DSP] - setup volume for channel and callBack read for RAW PCM

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [July 24, 2020, 12:00am UTC](https://qa.fmod.com/t/mix-microphone-sound-and-background-sound-to-raw-pcm-stream/15998/2 "2020-07-24T00:00:43Z")

</div>

You’ll need to bring a few separate examples together to achieve this. Recording and playback can be found in the “record” example. Standard MP3 / Wav playback can be found in “play\_sound” / “play\_stream” examples. To create the submix for all three, play these Channels on a ChannelGroup, see “channel\_groups” example. Finally adding your own DSP can be seen in the “dsp\_custom” example.

---

<div class="post-metadata">

### Author: ![LoVic](https://avatars.discourse-cdn.com/v4/letter/l/77aa72/32.png) [@LoVic](https://qa.fmod.com/u/LoVic)
#### Post date: [July 24, 2020, 7:17am UTC](https://qa.fmod.com/t/mix-microphone-sound-and-background-sound-to-raw-pcm-stream/15998/3 "2020-07-24T07:17:41Z")

</div>

Thank. But I ran into the problem of creating my own DSP. fmod.cs does not contain all the descriptions of structures necessary for implementation, or they are described with private.  
Example:  
DSP\_STATE\_FUNCTIONS  
FMOD\_DSP\_PARAMETER\_DESC

Also, I can never get the DSPReleaseCallback.  
desc = new FMOD.DSP\_DESCRIPTION ()  
desc.release + = DSPReleaseCallback;

---

<div class="post-metadata">

### Author: ![mathew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/mathew/32/431_2.png) [@mathew](https://qa.fmod.com/u/mathew)
#### Post date: [July 28, 2020, 12:13am UTC](https://qa.fmod.com/t/mix-microphone-sound-and-background-sound-to-raw-pcm-stream/15998/4 "2020-07-28T00:13:35Z")

</div>

It looks like there are some incomplete parts of the C# API, I’ll log some bug reports to get those fixed. If you’re experienced with C# / C++ I suggest looking at fmod\_dsp.h / fmod\_common.h to translate the missing bits.
