Questions tagged [audio-source]

This tag will use to ask about the questions related to audio source component of unity3d game engine. Audio source is one of the basic component of unity for enabling sounds in game. Its allow sounds playback in 3D environment.

An AudioSource is attached to a GameObject for playing back sounds in a 3D environment. In order to play 3D sounds you also need to have an AudioListener. The AudioListener is normally attached to the camera you want to use. Whether sounds are played in 3D or 2D is determined by AudioImporter settings [More].


Related tags

52 questions
1
vote
0 answers

Stop Audio Jack from being the default audio source on media recorder

I'm creating an Android app that allows to record and play audios. The setup is the following: there is an external microphone connected to the android phone through USB OTG (for recording purposes) and headphones connected to the audio jack of the…
Mark
  • 113
  • 7
1
vote
2 answers

does the web audio api clear out a source node after it finishes playing?

when a user clicks on a button a sound is played , and if he clicks it again a new instance of that same sound is played . i do that by connecting a new source node to the audio Context on every click. now say that user clicks the button for 1 hour…
soufiane yakoubi
  • 861
  • 11
  • 31
1
vote
1 answer

Opentok [ v2.13 ] - Unable to publish on the session

I am using opentok library to perform video call. When I try to publish a publisher over a session with audioSource and videoSource both property set to null then I am not able to publish a publisher over a stream. Getting below error. Unable to…
mpatel
  • 476
  • 3
  • 13
1
vote
0 answers

Android Call Recording app - In Call Recorder AudioSource.VOICE_COMMUNICATION not recording call from both side

I am trying to record call through my android app. I am using MediaRecorder.AudioSource.VOICE_COMMUNICATION MediaRecorder.AudioEncoder.AMR_NB - encoding MediaRecorder.AudioEncoder.AMR_NB - ourputformat as audio configuration. On my galaxy s8+…
SimpleCoder
  • 1,665
  • 1
  • 21
  • 34
1
vote
1 answer

Unity: PlayOneShot stopped when Stop is called

I have a method that plays a clip as a one shot: public void PlaySingleFull(AudioClip clip) { efxSource.PlayOneShot(clip); } I also have a method that stops anything playing from the same source: public void StopEfx() { …
1
vote
1 answer

"The name 'sources' does not exist in the current context [Assembly-CSharp]",

"The name 'sources' does not exist in the current context [Assembly-CSharp]", Help! (unity 2017.3.0f3) Here's the code: public static SoundManager Instance = null; public AudioClip goalBloop; public AudioClip lossBuzz; public AudioClip…
1
vote
1 answer

Audio based on player position in unity

I am working on a unity game, and there is a speaker upstairs in a house playing music. I want the music to get louder as I get closer and quieter as I move further away. I have attached an AudioSource to the object and I have selected force to…
user8819214
1
vote
1 answer

Unity3D AudioSource not being attached to Object?

So hey. I have an Audio Source component attached to my object. I also copied the script from here and attached it to my object. using UnityEngine; using System.Collections; [RequireComponent(typeof(AudioSource))] public class ExampleClass :…
Stefan
  • 83
  • 1
  • 6
  • 20
0
votes
0 answers

How AudioSource.VOICE_PERFORMANCE ensure minimize latency

According android dev website, use AudioSource.VOICE_PERFORMANCE can ensure capture path will minimize latency and coupling with playback path. I try to find the answer by reading android source code, especially AudioFinger implementation, but can't…
Hill
  • 379
  • 3
  • 9
0
votes
0 answers

Audiosource crashes the second time

Program in Unity C# build for WebGL. The program shows a cover page with background sound, then shows pages one by one, each page has a background sound and a voice sound. The first time it works fine: it shows the cover, click on Start, then shows…
Sandra G.
  • 119
  • 3
  • 16
0
votes
0 answers

When the iOS webrtc native library peer connection is closed, unity audiosource.Play() does not work

I provide an iOS webrtc library for unity to use. When I close the connection, my unity AudioSource.Play() can't play sound. Calling AudioSettings.Reset() fixes the problem, but AudioSettings.Reset() causes the UI thread to stall for 1-2 seconds.
0
votes
1 answer

UnPausing AudioSource not working correctly (Unity)

I have a really weird bug that I cannot fix. I have an introduction where the user sees an image and an audio is played. Then when the user presses forward it goes to the next image+audio. On each view I have play, pause and replay buttons. On the…
Vanessa M
  • 21
  • 3
0
votes
1 answer

In Unity: Volume does not adjust while game is paused via timescale being stopped / equal to 0

I have a settings menu in my game, where I have different audio (background music, dialogue, etc) where I can adjust the volume manually. This happens during pause, so you can hear the volume and set it to your preference. This was working fine,…
0
votes
1 answer

Unity something went wrong when play too many audio clips simultaneously

I'm making a rhythm game, and I use 'AudioSource.PlayOneShot()' function to play the hit sound when the player hits the note. I downloaded a beatmap from Osu!Mania to test my game. I found when there's too many audio clips playing simultaneously (20…
Buger404
  • 13
  • 3
0
votes
1 answer

Looped AudioSource stops looping after 5 or so seconds

For the life of me I can't understand why it stops looping. I have an engine acceleration script that works great, except for the fact that it stops looping after a certain amount of time. I'm only calling the audiosource to be stopped if the user…
alt4s
  • 97
  • 8