Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

pyxaudio

Abstract

pyxaudio provides audio support for Python on Linux. Audio processing is done using the FFmpeg library, Pulseaudio and Alsa can be used for playback. pyxaudio is intentionally kept basic and simple.

Dependencies

The version numbers merely reflect which versions I have been using during development.

Example

import sys
import pyxaudio

# Open the playback sink.
sink = pyxaudio.Sink()

for url in sys.argv[1:]:
    if sys.version_info.major == 2:
        # pyxaudio needs all strings as unicode objects.
        url = url.decode(sys.getfilesystemencoding())

    # Create a new decoding source for the url.
    source = pyxaudio.Source(url)

    # Configure the sink.
    sink.setup(source)

    while True:
        buf = source.read(8192)
        if not buf:
            break
        sink.write(buf)

    # Clean up.
    source.close()
sink.close()

About

Basic Cython bindings for FFmpeg, Pulseaudio and Alsa

Resources

License

Releases

No releases published

Packages

No packages published

Languages