- Home /
How many audio channels does mobile have
We are working on a mobile title and I was wondering how many different audio channels does the average tablet or phone have?
If I'm not being clear then simply about how many different sounds can a mobile device play at once?
you can play as much audio as you want just don't spam a particular audio over and over again also, for SFX use playclipatpoint for soundtracks,music tracks make a script to handle it even a simple script would work personally i use an IEnumarator to do it.
Here is a basic soundtrack player,
using UnityEngine;
using System.Collections;
public class SoundTrackPlayer : $$anonymous$$onoBehaviour {
public AudioClip[] Soundtrack$$anonymous$$usic;
private AudioSource audioSource;
void Awake(){
this.gameObject.AddComponent <AudioSource>();
audioSource = this.gameObject.GetComponent<AudioSource> ();
this.gameObject.gameObject.name = "Sound$$anonymous$$anager";
DontDestroyOnLoad (this);
if (FindObjectsOfType (GetType ()).Length > 1) {
Destroy(gameObject);
}
}
void Start () {
StartCoroutine (PlaySoundTracks ());
}
// Update is called once per frame
void Update () {
}
IEnumerator PlaySoundTracks(){
audioSource.clip = Soundtrack$$anonymous$$usic [Random.Range (0, Soundtrack$$anonymous$$usic.Length)];
audioSource.Play ();
yield return new WaitForSeconds (audioSource.clip.length);
StartCoroutine (PlaySoundTracks ());
}
}
Your answer
Follow this Question
Related Questions
Using Pause and sound on/off in Toggle 2 Answers
Is it possible to raise an audio sources pitch as an audio listener gets closer? 5 Answers
Analyzing an audio file. 0 Answers
Footsteps not playing on Flash Export 1 Answer
Play Audio on destroy 3 Answers