Minor PEP8 formatting changes
This commit is contained in:
parent
68c2a66fa6
commit
5c5300ba7f
@ -181,12 +181,12 @@ volume = dsp.ExpFilter(config.MIN_VOLUME_THRESHOLD,
|
|||||||
# Lots of buffer overflows could mean that FPS is set too high
|
# Lots of buffer overflows could mean that FPS is set too high
|
||||||
buffer_overflows = 1
|
buffer_overflows = 1
|
||||||
|
|
||||||
|
|
||||||
def microphone_update(stream):
|
def microphone_update(stream):
|
||||||
global y_roll, prev_rms, prev_exp
|
global y_roll, prev_rms, prev_exp
|
||||||
# Retrieve and normalize the new audio samples
|
# Retrieve and normalize the new audio samples
|
||||||
try:
|
try:
|
||||||
y = np.fromstring(stream.read(samples_per_frame), dtype=np.int16)
|
y = np.fromstring(stream.read(samples_per_frame), dtype=np.int16)
|
||||||
# exception_on_overflow=False), dtype=np.int16)
|
|
||||||
except IOError:
|
except IOError:
|
||||||
y = y_roll[config.N_ROLLING_HISTORY - 1, :]
|
y = y_roll[config.N_ROLLING_HISTORY - 1, :]
|
||||||
global buffer_overflows
|
global buffer_overflows
|
||||||
@ -254,9 +254,9 @@ if __name__ == '__main__':
|
|||||||
GUI.curve[0][2].setData(x=range(config.N_PIXELS))
|
GUI.curve[0][2].setData(x=range(config.N_PIXELS))
|
||||||
# Add ComboBox for effect selection
|
# Add ComboBox for effect selection
|
||||||
effect_list = {
|
effect_list = {
|
||||||
'Scroll effect' : visualize_scroll,
|
'Scroll effect': visualize_scroll,
|
||||||
'Spectrum effect' : visualize_spectrum,
|
'Spectrum effect': visualize_spectrum,
|
||||||
'Energy effect' : visualize_energy
|
'Energy effect': visualize_energy
|
||||||
}
|
}
|
||||||
effect_combobox = pg.ComboBox(items=effect_list)
|
effect_combobox = pg.ComboBox(items=effect_list)
|
||||||
def effect_change():
|
def effect_change():
|
||||||
|
Loading…
Reference in New Issue
Block a user