Another experimental sound change.
This commit is contained in:
8
utils.py
8
utils.py
@@ -476,7 +476,9 @@ def x_powerbar():
|
||||
leftVolume = (50 - position) / 100
|
||||
rightVolume = (position + 50) / 100
|
||||
tone = generate_tone(frequency)
|
||||
channel = tone.play()
|
||||
from .sound import get_available_channel
|
||||
channel = get_available_channel()
|
||||
channel.play(tone)
|
||||
channel.set_volume(leftVolume, rightVolume)
|
||||
|
||||
# Visual representation
|
||||
@@ -519,7 +521,9 @@ def y_powerbar():
|
||||
while True:
|
||||
frequency = 220 + (power * 5) # Adjust these values to change the pitch range
|
||||
tone = generate_tone(frequency)
|
||||
channel = tone.play()
|
||||
from .sound import get_available_channel
|
||||
channel = get_available_channel()
|
||||
channel.play(tone)
|
||||
|
||||
# Visual representation
|
||||
screen.fill((0, 0, 0))
|
||||
|
Reference in New Issue
Block a user