Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.6 / 3....
  • Linux Kernel 3.0.82 LTS...
  • KDE Software Compilatio...
  • PulseAudio 4.0
  • Wireshark 1.10.0
  • NetworkManager 0.9.8.2
  • LibreOffice 3.6.6 / 4.0...
  • SystemRescueCd 3.7.0
  • Linux Kernel 3.10 RC6
  • Ubuntu Tweak 0.8.5
  • Home > Linux > Programming > Libraries

    pyao 0.0.2

    Download button

    No screenshots available
    Downloads: 503  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Andrew Chatham | More programs
    GPL / FREE
    April 17th, 2006, 20:21 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    pyao description

    pyao is a wrapper for the 'ao' library.

    pyao is a wrapper for the 'ao' library.

    pyao is a set of Python bindings for Xiph.org's libao, a cross-platform audio output library.

    Installation:

    python config_unix.py
    python setup.py build
    [as root] python setup.py install

    The config script is new and still pretty weak. If you have any problems let me know. Access the module by using "import ao" in your Python code.

    Here's an interactive session of just playing with the module, until I create better documentation (there should be docstrings for everything). Watch as I read some random data and "play" it to a wave file.

    >>> import ao

    >>> myoptions = {'file': 'myoutput.wav'}

    >>> dev = ao.AudioDevice('wav', options = myoptions)

    >>> f = open('/dev/urandom', 'r') #that's some good stuff

    >>> print dev
    < AudioDevice object at 0x812ac28 >

    >>> print dev.get_driver_info()
    {'author': 'Aaron Holtzman',
    'short_name': 'wav',
    'name': 'WAV file output',
    'comment': 'Sends output to a .wav file'}

    >>> print ao.get_driver_info('oss')
    {'author': 'Aaron Holtzman',
    'short_name': 'oss',
    'name': 'OSS audio driver output ',
    'comment': 'Outputs audio to the Open Sound System driver.'}

    >>> data = f.read(1024*8)

    >>> dev.play(data)

    >>> < control-d >

    And now I have a file myoutput.wav with random noise in it.

    Product's homepage

      


    TAGS:

    Python library | ao library | ao wrapper | pyao | ao | library

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM