Made it more comprehensible
Signed-off-by: Sören Oesterwind <grey@noreply.git.thegreydiamond.de>
This commit is contained in:
@ -1,12 +1,17 @@
|
||||
# Original code by TheGreydiamond Copyright 2020-2021
|
||||
import pyaudio, numpy, keyboard, time
|
||||
import scipy.io.wavfile as wav
|
||||
from sys import getsizeof
|
||||
|
||||
RATE=48000
|
||||
RECORD_SECONDS = 20
|
||||
CHUNKSIZE = 1024*2
|
||||
##### CONFIG #####
|
||||
|
||||
SourcesToRecord = ["VoiceMeeter VAIO3 Output", "Aux"]
|
||||
RATE=48000 # Sample rate
|
||||
RECORD_SECONDS = 20 # Seconds to record (aka. last X seconds)
|
||||
SourcesToRecord = ["VoiceMeeter VAIO3 Output", "Aux"] # Record all sources which contains these strings
|
||||
|
||||
##### CONFIG END (aka. DO NOT FRICKING TOUCHY) #####
|
||||
|
||||
CHUNKSIZE = 1024*2
|
||||
print("Searching for audio sources")
|
||||
Sources = []
|
||||
AudioChannels = []
|
||||
@ -20,6 +25,7 @@ cleanUp = False
|
||||
incomingAudioChan = -1
|
||||
localAudioChan = -1
|
||||
|
||||
## Find the acutal device pointers
|
||||
for i in range(0, numdevices):
|
||||
if (p.get_device_info_by_host_api_device_index(0, i).get('maxInputChannels')) > 0:
|
||||
i2 = 0
|
||||
@ -36,6 +42,7 @@ while(i <= len(SourcesToRecord)):
|
||||
Frames.append([])
|
||||
i += 1
|
||||
|
||||
# Save the replay
|
||||
def on_triggered():
|
||||
global cb, saves
|
||||
print("Saving replay..", end = "")
|
||||
|
Reference in New Issue
Block a user