diff options
Diffstat (limited to 'voctocore/lib/failaudiosrc.py')
-rw-r--r-- | voctocore/lib/failaudiosrc.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/voctocore/lib/failaudiosrc.py b/voctocore/lib/failaudiosrc.py new file mode 100644 index 0000000..0ce885e --- /dev/null +++ b/voctocore/lib/failaudiosrc.py @@ -0,0 +1,25 @@ +#!/usr/bin/python3 +import time, logging +from gi.repository import GLib, Gst + +from lib.config import Config + +class FailAudioSrc(Gst.Bin): + log = logging.getLogger('FailAudioSrc') + + def __init__(self, idx, name): + super().__init__() + + # Create elements + self.failsrc = Gst.ElementFactory.make('audiotestsrc', None) + + # Add elements to Bin + self.add(self.failsrc) + + # Set properties + self.failsrc.set_property('freq', 400+idx*50) + + # Add Ghost Pads + self.add_pad( + Gst.GhostPad.new('src', self.failsrc.get_static_pad('src')) + ) |