Changeset 1473:27899f7bc2c2
- Timestamp:
- 07/20/10 20:26:50 (7 weeks ago)
- Author:
- Q <q@…>
- Branch:
- default
- Message:
-
Updated the sound_lib repo to the new version which I just released with volume support, gave the sound session ability to hold a volume.
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1471
|
r1473
|
|
| 2 | 2 | 0c0728d6c13a2f2d075a3615f7b40fceb8a86254 src/locale |
| 3 | 3 | 2ead1652be4efdb22af9fbad6013a61503863a2c src/session/solona/solona |
| 4 | | 75499ae9a28b7c6512b26aae918c562acd56023b src/session/sound/sound_lib |
| | 4 | 527c00bf8491be636ce15713964cf37b1ecb1b25 src/session/sound/sound_lib |
-
|
r1347
|
r1473
|
|
| 25 | 25 | fullMute=boolean(default=False) |
| 26 | 26 | soundPack=string(default="Standard") |
| | 27 | volume=float(default=100.00) |
| 27 | 28 | |
| 28 | 29 | #Export information |
-
|
r1472
|
r1473
|
|
| 26 | 26 | self.output = sound_lib.output.BassSoundOutput() |
| 27 | 27 | self.input = sound_lib.input.BassSoundInput() |
| | 28 | self.output.volume = config.main['sounds']['volume'] |
| 28 | 29 | except: |
| 29 | 30 | self.output = None |
| … |
… |
|
| 46 | 47 | snd.play() |
| 47 | 48 | self.sounds.append(snd) |
| 48 | | |
| | 49 | return snd |
| 49 | 50 | |
| 50 | 51 | def find_sound_file (self, file): |
| … |
… |
|
| 59 | 60 | if not os.path.exists(sound_file): |
| 60 | 61 | logging.warning('Unable to find sound file %r' % file) |
| 61 | | raise IOError, "Unable to fine sound file" |
| | 62 | raise IOError, "Unable to find sound file" |
| 62 | 63 | return sound_file |
| 63 | 64 | |
| … |
… |
|
| 97 | 98 | logging.debug("%s: Cleanup: removed %d sounds." % (self.name, old_len-len(self.sounds))) |
| 98 | 99 | |
| | 100 | def get_volume (self): |
| | 101 | return self.output.volume |
| | 102 | |
| | 103 | def set_volume (self, volume): |
| | 104 | config.main['sounds']['volume'] = volume |
| | 105 | self.output.volume = volume |
| | 106 | |
| | 107 | volume = property(get_volume, set_volume) |