GitXplorerGitXplorer
s

PulseAudio.jl

public
5 stars
0 forks
1 issues

Commits

List of commits on branch pulseaudio_jl.
Unverified
af747da2f748bf1363f5304aab648344a24bd3e8

README and CI fixes

sssfrr committed 7 years ago
Unverified
bacbf1a53cea2a7e03a6c6f2d43474e4905fd13d

make sink configurable

sssfrr committed 7 years ago
Unverified
9c1ff76f9c5bf8a24c8191c13cc29701a43d01ea

strips out everything that's not PulseAudio and ties playback into SampledSignals infrastructure

sssfrr committed 7 years ago
Unverified
d3ab995342c109695d559c1296ac47e7c5bb067c

@compat is not required for typealias changes

ddancasimiro committed 8 years ago
Unverified
c65a04a77faaceffcce569494165df33fa793709

Revert "Replace usage of the 'type' keyword"

ddancasimiro committed 8 years ago
Unverified
db37528aeda95c8675f1b89fe3982e9a27e07c23

Add Julia v0.6 entries into the CI configs

ddancasimiro committed 8 years ago

README

The README file for this repository.

PulseAudio.jl

TODO: Add Badges

This is a Julia package to play audio using the PulseAudio daemon common on Linux systems. This was originally part of @dancasimiro's WAV.jl package but has been split out and adapted to the JuliaAudio ecosystem.

Getting Started

PulseAudio.jl supports the SampledSignals.jl API, and provides a writable stream. Simply create a stream with the PulseAudioSource constructor. These stream will accept regular Arrays with each channel as a column, or you can use SampledSignals' SampleBuf values to take advantage of automatic sample-rate and element type conversions.

Examples

Hear a test tone:

sig = sin.(2pi*330*linspace(0, 0.5, 0.5*48000)) * 0.2;
sink = PulseAudioSink()
write(sink, sig)
close(sink)

Play a file:

buf = load("somefile.wav")
sink = PulseAudioSink()
# if the samplerates don't match the data will be transparently resampled
write(sink, buf)
close(sink)

Listen to the same file downsampled

buf = load("somefile.wav")
sink = PulseAudioSink(name="Downsampled", description="8kHz", samplerate=8000)
write(sink, buf)
close(sink)