Changeset e01a3af
- Timestamp:
- Sep 8, 2010, 8:24:09 PM (14 years ago)
- Branches:
- master, debian, mac, no-cups
- Children:
- bbede33
- Parents:
- 3ee56cf
- git-author:
- Mats Ahlgren <mats@…> (09/08/10 20:24:09)
- git-committer:
- Mats Ahlgren <mats@…> (09/08/10 20:24:09)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
remctl/lib/gutenbach/volume-helper.py
r3ee56cf re01a3af 31 31 tempV = int(v + (newV-v)*frac) 32 32 command = ['amixer', 'set', 'PCM', str(tempV)] 33 print tempV 34 sys.stdout.flush() 33 35 call(command, stdout=PIPE) 34 36 time.sleep(0.3) … … 36 38 v = getVolume() 37 39 map = { 38 '+': int(math.ceil( v*1. 2+ .001 )),39 '-': int(math.floor( v/1. 2+ .001 ))40 '+': int(math.ceil( v*1.13 + .001 )), 41 '-': int(math.floor( v/1.13 + .001 )) 40 42 } 41 43 42 44 newVolume = map[arg] 43 print 'Smoothly modifying over 3 seconds... '45 print 'Smoothly modifying over 3 seconds... (from %i)' % v 44 46 sys.stdout.flush() 45 47 setVolume(newVolume)
Note: See TracChangeset
for help on using the changeset viewer.