Skip to content

Commit

Permalink
Send finished signal from audio out
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippThoelke committed Jul 12, 2024
1 parent 15b9d22 commit 3ed0545
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/goofi/nodes/outputs/audioout.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ class AudioOut(Node):
def config_input_slots():
return {"data": DataType.ARRAY}

def config_output_slots():
return {"finished": DataType.ARRAY}

def config_params():
return {
"audio": {
Expand Down Expand Up @@ -65,6 +68,8 @@ def process(self, data: Data):
# Send the audio data to the output device after ensuring it's C-contiguous
self.stream.write(np.ascontiguousarray(samples))

return {"finished": (np.array([1]), {})}

def audio_sampling_rate_changed(self, value):
self.setup()

Expand Down

0 comments on commit 3ed0545

Please sign in to comment.