Skip to content

Commit bb5e81b

Browse files
committed
[feat] Support for camilladsp 3.0
1 parent 2b1b636 commit bb5e81b

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.0.0
2+
* [fix] Support for Camilladsp 3.x
3+
* [refactor] drop support for older versions
4+
15
1.0.0
26
* [refactor!] Drop support Camilladsp 1.x
37
* [fix] Correct initial statefile generation

mpd2cdspvolume.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
import camilladsp
4444

45-
VERSION = "1.0.0"
45+
VERSION = "2.0.0"
4646

4747
def lin_vol_curve(perc: int, dynamic_range: float= 60.0) -> float:
4848
'''
@@ -183,15 +183,15 @@ def update_cdsp_volume(self, volume_db: float):
183183
if self._cdsp.is_connected() is False:
184184
self._cdsp.connect()
185185

186-
self._cdsp.volume.set_main(volume_db)
186+
self._cdsp.volume.set_main_volume(volume_db)
187187
time.sleep(0.2)
188-
cdsp_actual_volume = self._cdsp.volume.main()
188+
cdsp_actual_volume = self._cdsp.volume.main_volume()
189189
logging.info('volume set to %.2f [readback = %.2f] dB', volume_db, cdsp_actual_volume)
190190

191191
# correct issue when volume is not the required one (issue with cdsp 2.0)
192192
if abs(cdsp_actual_volume-volume_db) > .2:
193193
# logging.info('volume incorrect !')
194-
self._cdsp.volume.set_main(volume_db)
194+
self._cdsp.volume.set_main_volume(volume_db)
195195
return True
196196
except (ConnectionRefusedError, IOError) as e:
197197
logging.info('no cdsp')

0 commit comments

Comments
 (0)