Is it possible to use an external audio source? - unity3d

What I mean is, instead of playing an audio clip in the audio source in Unity3D, can I play whatever music is playing from another software and place that in the world with 3D sound.
I am using music to guide the player somewhere, but rather than having one song that I hardcode in, I would like to use the music or sound the player already listens to before starting the game. I must be able to change the volume and balance as the sound is suposed to come form somewhere in the 3D world

Related

No audio heard unless facing audio source unity

I have a script, to play a sound clip when a footstep is taken. I use events in the animation tab, and when I play the sound, it will only be audible if i am looking at the character, or npc, the audio source is in fact on the character, but i don't know what is causing this.
On your AudioSource, you could play around with the 3D sound settings:

How can pause/resume recording audio from microphone in unity engine

In unity engine I want record audio from microphone with pause/resume ability; I want to have all of recorded audio in one AudioClip at final; and I don't know how many time it will pause and play (it's depend to user, not me) (also length of it) what can I do ?
Don't have ready made solution, but the way you should start is to use Microphone class and use its Start and End function to record audio. This returns an audio clip which can be save to a numbered file (e.g., audio_datetime_00001,audio_datetime_00002,...). Once user Play/Pause/Stop you can create a new audio file. Later you can merge them using NAudio (try Mark Heath's solution).
Happy coding!!!

Core Audio (Audio Units) audio session and MPVolumeView

I work on a VOIP app.
I use Core Audio Audio Units for playing and recording audio. I need to be able to manipulate sound volume and output devices. I am trying to use MPVolumeView to set sound volume and choose output devices.
My problem is: When I start using(start playout and capture for RemoteIO Audio Unit) Audio Units it seems MPVolumeView no longer control volume of my session but instead it controls system wide sound preferences. At the same time hardware buttons control volume of sounds played by Audio Units. Also when I start using Audio Units MPVolumeView start showing button to change output devices but before that it doesn't.
It seems that MPVolumeView controls sound volume for some system wide audio session but when I start using Audio Units another app wide (or even Audio Unit wide) audio session is created and used to play sound.
So the question is how to make MPVolumeView control sound volume for my Core Audio audio session?
I would appreciate any hints on why this happens. I've spent almost all day googling and I see that some people have related problems but none got any hints :(. I can also post more details if needed.
Confirmed as a bug by Apple engineer.
In more details - MPVolumeView should be tied to a specific audio route (in more broad sense, like audio route + audio category + mode etc.), and it is for a couple of most common routes (e.g. headphones + play category + default mode) but not to all custom routes you can create.
So basically when one creates some custom route MPVolumeView still tries to control it's last (workable) or default route.

How to play more than one video in cocoa touch?

I'm trying to play more than one video at the same time in Cocoa Touch.
I can play one video with MPMoviePlayerController, but it does not allow to play more than one: "Note: Although you can create multiple MPMoviePlayerController objects and present their views in your interface, only one movie player at a time can play its movie."
Basically I'm trying to display complex, high resolution animation in a loop with autostart, but using PNGs makes the app size way too big (+500 MB)
I converted one object of the animation to a movie which is about 50x smaller now.
I think its not possible to play two video at the same time. But you can play video in queue refer this article....

How can i use more them one sound simultainiously in iphone application using cocos2d?

Duplicate:
use more then one sound in my iphone application using cocos2d
Hi,
All of the member of this forums.I need to help yours for doing my game project.I want to play some sound in my gaming project.When this game is started a background sound is playing continuously until the game is stop (exit). When game is played that time some action button are work and every action one sound is play for few second but background sound did not stop that time. How can i do this if anyone have a solution than reply with answer please.
If you are using cocos2d 0.82, then you can use denshion for this.
Play background music:
[[SimpleAudioEngine sharedEngine] playBackgroundMusic:#"somemusic.mp3"];
Play SOUND EFFECT:
[[SimpleAudioEngine sharedEngine] playEffect:#"mysound.wav"]
You can find this and more at http://www.cocos2d-iphone.org/wiki/doku.php/cocosdenshion:cookbook
You could, if you implemented your own mixer. Just playback a buffer and mix the audio yourself. It' basically boils down to just averaging two different amplitudes. In some cases it's a bit more advanced.
Check out the AVAudioPlayer class. It will do what you need.
One thing to be aware of is that this class will only play one mp3 format sound at one time. I suggest converting to IMA4 format if you are using mp3 and need to play multiple sounds at once.
You can use the afconvert command to convert between sound file formats.
AVAudioPlayer is available in firmware 2.2+.