Hi, I am trying to play all audio from audio sources within a collider in one other audio source. I have looked at getting the output data using the GetOutputData function. But I am unsure how it could be used to play the audio back in a reasonable manner. I started trying to replay the audio using this set of code as a begin but it just sounds as some hardcore music:
I thought about using the stream functionality in clips but I am unsure how that works aswell. I tried reading the docs and experimenting but this wont really give any results to the specific cause. Maybe someone here can push me in the right direction? Thankyou in advance!
After more research with the google term “unity audio source recording” (I am trying everything right now!) I found this post and a unity forums both seemingly ending in a dead end.
I’m struggling to understand what you’re trying to do. All audio sources play according to their settings. Are you trying to solo a subset of what is in your scene and have the others go silent?
Understandable, Let me try and elaborate further. I have a multiplayer game where people use their mics to talk in game. I now want a selected set of audio sources to replay on another audio source so it would sound like there is a microphone in the other room.
As a visual example:
The cyan/blue audio sources are the targets and the audio source on the left with the red line need to directly play the audio sources are playing. I hope this makes it a bit more clear, it would basically be an in-game microphone and I think using .
We have a similar issue where we’re trying to take audio from a camera’s audioListener and relay it to an audioSource at a different location. Was curious if you had made any headway and wanted to bump this post for further help.
Hi, Did you find a solution? I want my Recorder to record certain elements in the scene, but AudioListener only records everything. The other way is to output chosen audio to to and audio source and record that audio source
I am not sure about recording, I managed to make it work with real-time replay by just taking all clips inside the range and referencing these in the replay audio sources and matching up the time.
Oh nice, that sounds like something I could do, is it possible to share your solution? I would like to achieve an audio source that can take a range of referenced audio sources or just ignores one(metronome sound). Still being able to replay normally in real time. The Recorder can capture the audio source instead of the AudioListener which captures the whole scene.
I can share it yes, Its not very flashed out since the project got abandoned shortly after but I am actually planning on doing it for another project in a short time so I will update when I do.