updated sounddevice setup routine

this possible fixes -9998 channel errors
This commit is contained in:
dj2ls 2022-03-30 17:53:35 +02:00
parent 9937ea56ad
commit a65a677f49
7 changed files with 12 additions and 2 deletions

View file

@ -40,10 +40,16 @@ jobs:
pip install numpy
pip install structlog
pip install colorama
pip install sounddevice
# pip install sounddevice
# curl.exe --output PyAudio-0.2.11-cp39-cp39-win_amd64.whl --url https://download.lfd.uci.edu/pythonlibs/y2rycu7g/PyAudio-0.2.11-cp39-cp39-win_amd64.whl
# pip install PyAudio-0.2.11-cp39-cp39-win_amd64.whl
- name: Install Sounddevice
if: matrix.os == 'windows-latest'
working-directory: tnc/lib/sounddevice/windows
run: |
pip install sounddevice-0.4.4-cp39-cp39-win_amd64.whl
- name: Install Pyaudio
if: matrix.os == 'windows-latest'
working-directory: tnc/lib/pyaudio/windows

View file

@ -213,8 +213,12 @@ function createWindow() {
// Emitted when the window is closed.
logViewer.on('close', function(evt) {
if (logViewer !== null){
evt.preventDefault();
logViewer.hide();
} else {
this.close()
}
})

View file

@ -164,7 +164,7 @@ class RF():
stream_callback=self.audio_callback
)
'''
self.stream = sd.RawStream(channels=self.AUDIO_CHANNELS, dtype='int16', callback=self.callback, device=static.AUDIO_OUTPUT_DEVICE, samplerate = self.AUDIO_SAMPLE_RATE_RX, blocksize=4800)
self.stream = sd.RawStream(channels=1, dtype='int16', callback=self.callback, device=static.AUDIO_OUTPUT_DEVICE, samplerate = self.AUDIO_SAMPLE_RATE_RX, blocksize=4800)
self.stream.start()
atexit.register(self.stream.stop)