Bugfix and audio optimizations

Changed to 48 kHz and reduced Buffersize to 128 for less delay in the beginning.
This commit is contained in:
Thomas Herrmann 2022-03-31 00:40:07 +02:00
parent ff46b035d4
commit e282eb960c
2 changed files with 4 additions and 5 deletions

BIN
dist/underbridge.exe vendored

Binary file not shown.

View File

@ -159,15 +159,14 @@ def start_Rec():
global j
global pro
global pattern_nr
CHUNK = 1024
CHUNK = 128
FORMAT = pyaudio.paInt16
CHANNELS = 2
RATE = 44100
RATE = 48000
RECORD_SECONDS = loop_time
WAVE_OUTPUT_FILENAME = name_input.get()+ "_" + "track" + str(j+1) + ".wav"
p = pyaudio.PyAudio()
start_MIDI()
p = pyaudio.PyAudio()
stream = p.open(format=FORMAT,
channels=CHANNELS,
rate=RATE,
@ -178,7 +177,7 @@ def start_Rec():
#print("* recording")
frames = []
start_MIDI()
for i in range(0, int(RATE / CHUNK * RECORD_SECONDS)):
data = stream.read(CHUNK)
frames.append(data)