~ubuntu-branches/ubuntu/quantal/python-pyo/quantal

« back to all changes in this revision

Viewing changes to pyolib/server.py

  • Committer: Package Import Robot
  • Author(s): Tiago Bortoletto Vaz
  • Date: 2012-07-03 23:45:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120703234541-jh5jg00lvljnwq8m
Tags: 0.6.2-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
    duplex : int {0, 1}, optional
51
51
        Input - output mode. 0 is output only and 1 is both ways. 
52
52
        Defaults to 1.
53
 
    audio : string {'portaudio', 'pa', 'jack', 'coreaudio', 'offline'}, optional
 
53
    audio : string {'portaudio', 'pa', 'jack', 'coreaudio', 'offline', 'offline_nb}, optional
54
54
        Audio backend to use. 'pa' is equivalent to 'portaudio'.
 
55
        'offline' save the audio output in a soundfile as fast as possible in blocking mode, 
 
56
        ie. the main program doesn't respond until the end of the computation.
 
57
        'offline_nb' save the audio output in a soundfile as fast as possible in non-blocking 
 
58
        mode, ie. the computation is executed in a separated thread, allowing the program to
 
59
        respond while the computation goes on. It is the responsibility of the user to make
 
60
        sure that the program doesn't exit before the computation is done.
55
61
        Default is 'portaudio'.
56
62
    jackname : string, optional
57
63
        Name of jack client. Defaults to 'pyo'
78
84
    getGlobalSeed() : Returns the server's global seed.
79
85
    getIsStarted() : Returns 1 if the server is started, otherwise returns 0.
80
86
    getMidiActive() : Returns 1 if Midi callback is active, otherwise returns 0.
 
87
    getStreams() : Returns the list of Stream objects currently in the Server memory.
 
88
    getNumberOfStreams() : Returns the number of streams currently in the Server memory.
81
89
 
82
90
    The next methods must be called before booting the server
83
91
 
495
503
        """
496
504
        return self._server.getMidiActive()
497
505
 
 
506
    def getStreams(self):
 
507
        """
 
508
        Returns the list of Stream objects currently in the Server memory.
 
509
        
 
510
        """
 
511
        return self._server.getStreams()
 
512
 
 
513
    def getNumberOfStreams(self):
 
514
        """
 
515
        Returns the number of streams currently in the Server memory.
 
516
        
 
517
        """
 
518
        return len(self._server.getStreams())
498
519
 
499
520
    @property
500
521
    def amp(self):