# Muting a sound playing while playing but without losing the data flow

**URL:** <https://qa.fmod.com/t/muting-a-sound-playing-while-playing-but-without-losing-the-data-flow/17516>\
**Category:** Unity\
**Created:** [August 2, 2021, 10:26pm UTC](https://qa.fmod.com/t/muting-a-sound-playing-while-playing-but-without-losing-the-data-flow/17516 "2021-08-02T22:26:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danielkotzer](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@Danielkotzer](https://qa.fmod.com/u/Danielkotzer)\
**Post date:** [August 2, 2021, 10:26pm UTC](https://qa.fmod.com/t/muting-a-sound-playing-while-playing-but-without-losing-the-data-flow/17516/1 "2021-08-02T22:26:32Z")

</div>

Hi,  
I am recording a sound from the mic on Unity+Fmod then playing it using:  
RuntimeManager.CoreSystem.playSound

Then I take the data from the channel I have put in playSound funciton and it gives me the sound data usint channel.getChannelGroup(out channelGroup); I then use the data for a visualization of the sound, this works fine. But then I don’t want to hear the recording, just visualize it. What should I do? if I do channel.setVolume(0); this mutes the sound but then I don’t get any data from it any more. I can’t use mute on the channel, but if it is giving the sound to some other device that is playing it, maybe there I can mute the sound, I don’t know enough about Fmod but maybe FMOD studio listener is what gets all the sounds, maybe there I can mute something, anyway, I’d appreciate if someone could find me a solution.  
Thank you.

Please Help.

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [August 4, 2021, 7:00am UTC](https://qa.fmod.com/t/muting-a-sound-playing-while-playing-but-without-losing-the-data-flow/17516/2 "2021-08-04T07:00:34Z")

</div>

Setting the CoreSystem output to `FMOD.OUTPUTTYPE.NOSOUND` should do the trick, more information on `setOutput` can be found [here](https://fmod.com/resources/documentation-api?version=2.01&page=core-api-system.html#system_setoutput).  
You won’t get any audio output at all from FMOD if you call it on RuntimeManager.CoreSystem, so you might want to create another system object just for playing back visualizations if you still needed other sounds to play- that or switch the output back to what it was when you are done playing back visualizations. For an example of how to create a system object in Unity, you can see how it’s done in “Assets\Plugins\FMOD\src\Editor\EditorUtils.cs” inside `static void CreateSystem()`.

---

<div class="post-metadata">

**Author:** ![Danielkotzer](https://avatars.discourse-cdn.com/v4/letter/d/59ef9b/32.png) [@Danielkotzer](https://qa.fmod.com/u/Danielkotzer)\
**Post date:** [August 7, 2021, 9:03pm UTC](https://qa.fmod.com/t/muting-a-sound-playing-while-playing-but-without-losing-the-data-flow/17516/3 "2021-08-07T21:03:16Z")

</div>

I tried using NOSOUND, but didn’t get any signal, I think the system is turing every channel that is not heard in the scene no matter why, into a virtual channel, need to know how to turn off the option on initialization, so a sound with volume 0 will not be turned into a virtual one. I know I should use a callback object, which I did, but don’t know what line of code I should use in that object to change this property.

---

<div class="post-metadata">

**Author:** ![jeff\_fmod](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/jeff_fmod/32/1766_2.png) [@jeff\_fmod](https://qa.fmod.com/u/jeff_fmod)\
**Post date:** [August 9, 2021, 12:39am UTC](https://qa.fmod.com/t/muting-a-sound-playing-while-playing-but-without-losing-the-data-flow/17516/4 "2021-08-09T00:39:34Z")

</div>

Right, perhaps `NOSOUND` mode isn’t the way to go when reading from a channelGroup- I was able to read data in `NOSOUND` mode and continue getting data and a realtime visualisation of playing audio when using a DSP read Callaback as per the [DSP Capture Example](https://fmod.com/resources/documentation-unity?version=2.02&page=examples-dsp-capture.html) so maybe take a look at that if you haven’t already.  
Another thing you could try if you want to access the recorded data without playing it back or changing the System output is using `Sound.@lock` on the recorded sound to access the underlying data directly, rather than calling `RuntimeManager.CoreSystem.playSound` and using the channelGroup to get the data. Here is the [API reference](https://fmod.com/resources/documentation-api?version=2.00&page=core-api-sound.html#sound_lock) for lock, be sure to unlock afterwards!
