Skip to content

Commit

Permalink
Merge branch 'v0.4.0-test' into v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
SrMouraSilva committed May 17, 2017
2 parents ac12026 + f0190eb commit 1ac1cdb
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 6 deletions.
2 changes: 1 addition & 1 deletion CHANGES
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 0.4.0 -- released 05//17
Version 0.4.0 -- released 05/17/17
==================================
- Improve coverage code
- Remove deprecated files (mod-host auto connect)
Expand Down
8 changes: 6 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,14 +115,18 @@ Add effects in the pedalboard
# or
# pedalboard.effects.append(reverb2)
For obtains automatically the sound card inputs and outputs, use `SystemEffectBuilder`. It requires `JACK-Client`_.
For obtains automatically the sound card inputs and outputs, use `SystemEffectBuilder`.
It requires a `JackClient` instance, that uses `JACK-Client`_.

.. _JACK-Client: https://jackclient-python.readthedocs.io/

.. code-block:: python
from pluginsmanager.jack.jack_client import JackClient
client = JackClient()
from pluginsmanager.model.system.system_effect_builder import SystemEffectBuilder
sys_effect = SystemEffectBuilder()
sys_effect = SystemEffectBuilder(client)
For manual input and output sound card definition, use:

Expand Down
1 change: 1 addition & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Contents:
.. toctree::
:maxdepth: 2

jack
mod_host
model
model_lv2
Expand Down
9 changes: 9 additions & 0 deletions docs/source/jack.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
PedalPi - PluginsManager - Jack
===============================

pluginsmanager.jack.jack_client.JackClient
------------------------------------------

.. autoclass:: pluginsmanager.jack.jack_client.JackClient
:members:
:special-members:
10 changes: 10 additions & 0 deletions pluginsmanager/jack/jack_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class JackClient(object):
>>> client.xrun_callback = lambda delay: print('x-run', delay)
>>> client.shutdown_callback = lambda status, reason: print('shutdown: ', status, reason)
When you don't use anymore, close it::
>>> client.close()
:param bool no_start_server: False if starts a new JACK server
True if uses a already started jack (ex: using `jackdump`)
:param name: Jack client name. Default: `JackClient`
Expand Down Expand Up @@ -58,3 +62,9 @@ def shutdown(status, reason):

self.client.activate()

def close(self):
"""
Deactive and closes the jack client
"""
self.client.deactivate()
self.client.close()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def readme():

setup(
name='PedalPi-PluginsManager',
version='0.3.2',
version='0.4.0',

description='Pythonic management of LV2 audio plugins with mod-host.',
long_description=readme(),
Expand Down
6 changes: 4 additions & 2 deletions test/util/persistence_decoder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,16 +96,18 @@ def test_read_unknown_technology(self):
with self.assertRaises(PersistenceDecoderError):
PersistenceDecoder(system_effect).read(bank_data)

@unittest.skip
@unittest.skipIf('TRAVIS' in os.environ, 'Travis not contains audio interface')
def test_read_system_builder(self):
from pluginsmanager.model.system.system_effect_builder import SystemEffectBuilder
from pluginsmanager.jack.jack_client import JackClient

system_effect = SystemEffectBuilder(False).build()
client = JackClient(no_start_server=False)
system_effect = SystemEffectBuilder(client).build()

util = PersistenceDecoder(system_effect)

bank = self.bank
bank_readed = util.read(bank.json)

self.assertEqual(bank.json, bank_readed.json)
client.close()

0 comments on commit 1ac1cdb

Please sign in to comment.