~ubuntu-branches/ubuntu/karmic/clalsadrv/karmic

« back to all changes in this revision

Viewing changes to loopback.cc

  • Committer: Bazaar Package Importer
  • Author(s): Stephan Hermann
  • Date: 2007-05-25 09:08:07 UTC
  • mfrom: (1.1.3 upstream) (2.1.2 lenny)
  • Revision ID: james.westby@ubuntu.com-20070525090807-z53y0tcbusu6nzoy
Tags: 1.2.2-1ubuntu1
* Merge from debian unstable, remaining changes:
  - debian/control: added conflicts/replaces to libclalsadrvc2 and adjusted
    the dependencies accordingly
  - Modify Maintainer value to match Debian-Maintainer-Field Spec

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    buf0 = new float [frsize];
54
54
    buf1 = new float [frsize];
55
55
 
56
 
    D = new Alsa_driver (name, fsamp, frsize, nfrags, true, true, true);
 
56
    D = new Alsa_driver (name, fsamp, frsize, nfrags, true, true, false);
57
57
    if (D->stat ()) 
58
58
    {
 
59
        fprintf (stderr, "Can't open ALSA device\n");
59
60
        delete D;
60
61
        return;
61
62
    }
65
66
    while (1)
66
67
    {
67
68
        k = D->pcm_wait ();  
68
 
 
69
69
        while (k >= frsize)
70
70
        {
71
71
            D->capt_init (frsize);
97
97
        return 1;
98
98
    }
99
99
 
100
 
    mlockall (MCL_CURRENT | MCL_FUTURE);
101
 
 
102
100
    strcpy (name, av [1]);
103
101
    fsamp  = atoi (av [2]);
104
102
    frsize = atoi (av [3]);
105
103
    nfrags = atoi (av [4]);
106
104
 
107
 
    T.thr_start (SCHED_FIFO, 0);
108
 
    pthread_exit (0);
 
105
    T.thr_start (SCHED_OTHER, 0, 0);
 
106
    sleep (1000000);
109
107
 
110
108
    return 0;
111
109
}
112