Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E 0:00:02:0152 emit_signalp: Caller thread can't call this function in this node (/root/YtDlp). Use call_deferred() or call_thread_group() instead. <C++ Error> Condition "!is_accessible_from_caller_thread()" is true. Returning: (ERR_INVALID_PARAMETER) <C++ Source> scene/main/node.cpp:3570 @ emit_signalp() #9

Closed
nopxjs opened this issue Jan 24, 2024 · 2 comments

Comments

@nopxjs
Copy link

nopxjs commented Jan 24, 2024

my script
`
extends Node3D

func _ready():
if not YtDlp.is_setup():
YtDlp.setup()
await YtDlp.setup_completed
var download := YtDlp.download("https://youtube.com/watch?v=dQw4w9WgXcQ")
.set_destination("user://audio/")
.set_file_name("ok_computer")
.convert_to_audio(YtDlp.Audio.MP3)
.start()

await download.download_completed

var stream = AudioStreamMP3.new()
var audio_file = FileAccess.open("user://audio/ok_computer.mp3", FileAccess.READ)

stream.data = audio_file.get_buffer(audio_file.get_length())
audio_file.close()

$AudioStreamPlayer.stream = stream
$AudioStreamPlayer.play()

`

@nopxjs
Copy link
Author

nopxjs commented Jan 24, 2024

i use godot 4.1.1

@Nolkaloid
Copy link
Owner

Fixed ! Thanks for reporting @nopxjs :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants