Compare commits
3 Commits
ea14ce9699
...
f76c89a688
Author | SHA1 | Date | |
---|---|---|---|
f76c89a688 | |||
47bcd369b6 | |||
0c1eef5388 |
@ -99,10 +99,9 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
|||||||
add_definitions(-DHAS_RTAUDIO_WIN_WASAPI_API)
|
add_definitions(-DHAS_RTAUDIO_WIN_WASAPI_API)
|
||||||
else() # Linux compile
|
else() # Linux compile
|
||||||
set(win32 false)
|
set(win32 false)
|
||||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -std=c11 \
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11 -Werror=incompatible-pointer-types")
|
||||||
-Werror=incompatible-pointer-types")
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
|
||||||
include_directories(/usr/local/include/rtaudio)
|
include_directories(/usr/local/include/rtaudio)
|
||||||
include_directories(/usr/include/rtaudio)
|
include_directories(/usr/include/rtaudio)
|
||||||
link_directories(/usr/local/lib)
|
link_directories(/usr/local/lib)
|
||||||
|
@ -124,7 +124,7 @@ class AudioStream:
|
|||||||
]
|
]
|
||||||
|
|
||||||
if len(matching_devices) == 0:
|
if len(matching_devices) == 0:
|
||||||
raise RuntimeError("Could not find device {daqconfig.device_name}")
|
raise RuntimeError(f"Could not find device {daqconfig.device_name}")
|
||||||
|
|
||||||
# TODO: We pick te first one, what to do if we have multiple matches?
|
# TODO: We pick te first one, what to do if we have multiple matches?
|
||||||
# Is that even possible?
|
# Is that even possible?
|
||||||
@ -160,7 +160,7 @@ class AudioStream:
|
|||||||
# TODO: Fix this. This gives bug on Windows, the threading lock does
|
# TODO: Fix this. This gives bug on Windows, the threading lock does
|
||||||
# give a strange erro.
|
# give a strange erro.
|
||||||
try:
|
try:
|
||||||
if not self.running():
|
if not self.running:
|
||||||
return 1
|
return 1
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
@ -291,7 +291,7 @@ class AvStreamProcess(mp.Process):
|
|||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
self.sendAllQueues(
|
self.sendAllQueues(
|
||||||
StreamMsg.streamError, avtype, f"Error starting stream {str(e)}"
|
StreamMsg.streamError, avtype, f"Error starting stream: {str(e)}"
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
@ -494,6 +494,7 @@ class StreamManager:
|
|||||||
Handle messages that are still on the pipe.
|
Handle messages that are still on the pipe.
|
||||||
"""
|
"""
|
||||||
# logging.debug('StreamManager::handleMessages()')
|
# logging.debug('StreamManager::handleMessages()')
|
||||||
|
msgs = []
|
||||||
while not self.our_msgqueue.empty():
|
while not self.our_msgqueue.empty():
|
||||||
msg, data = self.our_msgqueue.get()
|
msg, data = self.our_msgqueue.get()
|
||||||
logging.debug(f'StreamManager obtained message {msg}')
|
logging.debug(f'StreamManager obtained message {msg}')
|
||||||
@ -535,6 +536,9 @@ class StreamManager:
|
|||||||
devices, = data
|
devices, = data
|
||||||
# logging.debug(devices)
|
# logging.debug(devices)
|
||||||
self.devices = devices
|
self.devices = devices
|
||||||
|
msgs.append((msg, data))
|
||||||
|
|
||||||
|
return msgs
|
||||||
|
|
||||||
def getDeviceList(self):
|
def getDeviceList(self):
|
||||||
self.handleMessages()
|
self.handleMessages()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user