Skip to content

Commit

Permalink
Merge pull request #18 from HEnquist/next
Browse files Browse the repository at this point in the history
Changes for camilladsp 1.0
  • Loading branch information
HEnquist authored May 2, 2022
2 parents 4d1c7ea + 616c8d2 commit 4f4859c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
18 changes: 10 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# pyCamillaDSP
Companion Python library for CamillaDSP.
Works with CamillaDSP version 0.6.0 and up.
Works with CamillaDSP version 1.0.0 and up.

Download the library, either by `git clone` or by downloading a zip file of the code. Then unpack the files, go to the folder containing the `setup.py` file and run:
```sh
Expand All @@ -14,13 +14,14 @@ Note that on some systems the command is `pip3` instead of `pip`.
pyCamillaDSP requires python 3.6 or newer and the package websocket-client.

These are the names of the packages needed:
| Distribution | python | websocket-client |
|--------------|--------|------------------|
| Fedora | python3 | python3-websocket-client |
| Debian/Raspbian | python3 | python3-websocket |
| Arch | python | python-websocket-client |
| pip | - | websocket_client |
| Anaconda | - | websocket_client |

| Distribution | python | websocket-client |
|-----------------|---------|--------------------------|
| Fedora | python3 | python3-websocket-client |
| Debian/Raspbian | python3 | python3-websocket |
| Arch | python | python-websocket-client |
| pip | - | websocket_client |
| Anaconda | - | websocket_client |

### Linux
Most linux distributions have Python 3.6 or newer installed by default. Use the normal package manager to install the packages.
Expand Down Expand Up @@ -144,6 +145,7 @@ The CamillaConnection class provides the following methods
- PAUSED: Processing is paused.
- INACTIVE: CamillaDSP is inactive, and waiting for a new config to be supplied.
- STARTING: The processing is being set up.
- STALLED: The processing is stalled because the capture device isn't providing any data.

### StopReason
- NONE: Processing hasn't stopped yet.
Expand Down
9 changes: 6 additions & 3 deletions camilladsp/camilladsp.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from threading import Lock
from enum import Enum, auto

VERSION = (0, 6, 0)
VERSION = (1, 0, 0)

STANDARD_RATES = [
STANDARD_RATES = (
8000,
11025,
16000,
Expand All @@ -23,13 +23,14 @@
384000,
705600,
768000,
]
)

class ProcessingState(Enum):
RUNNING = auto()
PAUSED = auto()
INACTIVE = auto()
STARTING = auto()
STALLED = auto()

def _state_from_string(value):
if value == "Running":
Expand All @@ -40,6 +41,8 @@ def _state_from_string(value):
return ProcessingState.INACTIVE
elif value == "Starting":
return ProcessingState.STARTING
elif value == "Stalled":
return ProcessingState.STALLED
return None


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="camilladsp",
version="0.6.0",
version="1.0.0",
author="Henrik Enquist",
author_email="[email protected]",
description="A library for communicating with CamillaDSP",
Expand Down

0 comments on commit 4f4859c

Please sign in to comment.