Exemplo n.º 1
0
        public List <OSAudioApp> GetApps()
        {
            List <OSAudioApp> apps = new List <OSAudioApp>();
            List <int>        pids = new List <int>();

            apps.Add(master);

            for (int i = 0; i < device.AudioSessionManager.Sessions.Count; i++)
            {
                OSAudioApp app = new OSAudioApp(device.AudioSessionManager.Sessions[i]);
                int        pid = app.GetProcessID();
                if (!pids.Contains(pid) && app.State != AudioSessionState.AudioSessionStateExpired)
                {
                    apps.Add(app);
                    pids.Add(pid);
                }
            }

            return(apps);
        }
Exemplo n.º 2
0
 OSAudioApp SetMasterApp()
 {
     master = new OSAudioApp(device);
     return(master);
 }
Exemplo n.º 3
0
 public void SetApp(int app)
 {
     application = GetApps()[app];
 }