Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: Support pitch #26

Merged
merged 2 commits into from Nov 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
65 changes: 65 additions & 0 deletions com.endlessm.HackSoundServer.json.in
Expand Up @@ -9,6 +9,71 @@
"--socket=pulseaudio"
],
"modules": [
{
"name": "soundtouch",
"cleanup": [
"/bin/soundstretch",
"/include",
"/lib/pkgconfig/soundtouch.pc",
"/share/aclocal/soundtouch.m4",
"/share/doc/soundtouch"
],
"sources": [
{
"type": "archive",
"url": "https://gitlab.com/soundtouch/soundtouch/-/archive/2.1.0/soundtouch-2.1.0.tar.bz2",
"sha256": "3fb740c7ac4b304342fbf11a91d14fa3e296269b9fec6266609c4620477d0ad6"
}
]
},
{
"name": "gstreamer-plugin-soundtouch",
"config-opts": [
"--disable-nls",
"--disable-introspection",
"--disable-gtk-doc",
"--enable-soundtouch",
"--with-plugins=none",
"--disable-shm",
"--disable-ipcpipeline",
"--disable-vcd",
"--disable-bz2",
"--disable-curl",
"--disable-dash",
"--disable-decklink",
"--disable-wayland",
"--disable-webp",
"--disable-fbdev",
"--disable-fdk-aac",
"--disable-kms",
"--disable-lcms2",
"--disable-dtls",
"--disable-ttml",
"--disable-openal",
"--disable-opus",
"--disable-rsvg",
"--disable-gl",
"--disable-vulkan",
"--disable-smoothstreaming",
"--disable-sndfile",
"--disable-dvb",
"--disable-vdpau",
"--disable-hls"
],
"cleanup": [
"/include",
"/lib/libgst*-1.0.*",
"/lib/pkgconfig/gstreamer-*.pc",
"/share/gtk-doc"
],
"sources": [
{
"type": "archive",
"url": "http://gstreamer.freedesktop.org/src/gst-plugins-bad/gst-plugins-bad-1.14.3.tar.xz",
"sha256": "b2224e5d9c1b85ad51233f6135524bb9e16a9172d395edc79c73b89094659fd5"
}
]
},
{
"name": "hack-sound-server",
"buildsystem": "meson",
Expand Down
9 changes: 9 additions & 0 deletions src/server.py
Expand Up @@ -50,6 +50,12 @@ def volume(self):
return self.metadata["volume"]
return None

@property
def pitch(self):
if "pitch" in self.metadata:
return self.metadata["pitch"]
return None

@property
def sound_location(self):
return self.metadata["sound-file"]
Expand All @@ -61,6 +67,9 @@ def _build_pipeline(self):
]
if self.volume is not None:
elements.append("volume volume={}".format(self.volume))
if self.pitch is not None:
elements.append("audioconvert")
elements.append("pitch pitch={}".format(self.pitch))
elements.append("autoaudiosink")
spipeline = " ! ".join(elements)

Expand Down