Miscellaneous

phoneshift.lin2db(value: float) float

Convert a linear amplitude value to a decibel value.

Parameters:

value – on a linear scale.

Returns:

  • float - The value on a decibel scale.

phoneshift.db2lin(value: float) float

Convert a decibel value to a linear amplitude value.

Parameters:

value – on a decibel scale.

Returns:

  • float - The value on a linear scale.

Slow connection

In case you are on a slow connection, you can increase the timeout for the connection to the server.

export PHONESHIFT_TIMEOUT=20
python -c "import phoneshift; print(phoneshift.__version__)"

Exit On Interrupt (EOI)

Many C/C++ written python modules won’t react to a ctrl-c interruption (or equivalent). The C/C++ part will first finish its execution and the python part will then handle any ctrl-c.

Calling phoneshift.eoi() after loading the module

import phoneshift
phoneshift.eoi()

allows any ctrl-c to kill the C/C++ part immediately.

You can deactivate eoi() with phoneshift.uneoi()

By default, this uncommon behavior is disabled.