To make Fenrir easier to approach for new developer, start code migration to be pep8 compliant.

This commit is contained in:
Storm Dragon
2025-07-01 22:23:50 -04:00
parent 4bcf82178e
commit 7408951152
345 changed files with 8688 additions and 3852 deletions

View File

@ -7,6 +7,7 @@
from fenrirscreenreader.core import debug
from fenrirscreenreader.core.soundDriver import soundDriver
class driver(soundDriver):
def __init__(self):
soundDriver.__init__(self)
@ -23,34 +24,46 @@ class driver(soundDriver):
self._initialized = False
print('Sound Debug Driver: Shutdown')
def playFrequence(self, frequence, duration, adjustVolume = 0.0, interrupt=True):
def playFrequence(
self,
frequence,
duration,
adjustVolume=0.0,
interrupt=True):
if not self._initialized:
return
return
if interrupt:
self.cancel()
print('Sound Debug Driver: playFrequence:' + ' freq:' + str(frequence) + ' duration:' + str(duration) + ' adjustVolume:' + str(adjustVolume) )
print(
'Sound Debug Driver: playFrequence:' +
' freq:' +
str(frequence) +
' duration:' +
str(duration) +
' adjustVolume:' +
str(adjustVolume))
print('Sound Debug Driver: -----------------------------------')
def playSoundFile(self, filePath, interrupt = True):
def playSoundFile(self, filePath, interrupt=True):
if not self._initialized:
return
return
if interrupt:
self.cancel()
print('Sound Debug Driver: playSoundFile:' + str(filePath))
print('Sound Debug Driver: playSoundFile:' + str(filePath))
print('Sound Debug Driver: -----------------------------------')
def cancel(self):
if not self._initialized:
return
print('Sound Debug Driver: Cancel')
print('Sound Debug Driver: Cancel')
def setCallback(self, callback):
if not self._initialized:
return
print('Sound Debug Driver: setCallback')
print('Sound Debug Driver: setCallback')
def setVolume(self, volume):
if not self._initialized:
return
return
self.volume = volume
print('Sound Debug Driver: setVolume:' + str(self.volume))
print('Sound Debug Driver: setVolume:' + str(self.volume))