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

Recording Audio on linux and Android #38003

Closed
gudenis opened this issue Apr 19, 2020 · 6 comments
Closed

Recording Audio on linux and Android #38003

gudenis opened this issue Apr 19, 2020 · 6 comments

Comments

@gudenis
Copy link

gudenis commented Apr 19, 2020

Godot version:
v3.2.1 Stable

OS/device including version:
Ubuntu 19.10
Android 10 with Samsung S10E

Issue description:
I'm trying to make audio recordings using busses and AudioStreamPlayer.
But I think my busses is always disable (because the bus have blue color)

Steps to reproduce:
I tried to do the tutorial: https://github.com/godotengine/godot-demo-projects/tree/master/audio/mic_record

I enable Audio input in Project>Setting>Audio

Minimal reproduction project:
my code :

func _ready():
var idx = AudioServer.get_bus_index("Record")
effect = AudioServer.get_bus_effect(idx, 0)

func onListen_pressed():
find_node("ListenAudio").play()

func onRecord_pressed():
if effect.is_recording_active():
    endRecording()
    print("end recording")

else:
    effect.set_recording_active(true)
    print("recording")
    find_node("Timer").start()

func onListenRecord_pressed():
find_node("ListenRecordAudio").play()
func onTimer_timeout():

endRecording()
find_node("Timer").stop()
print("end recording timer")

func endRecording():
find_node("ListenRecord").modulate.a = 1
effect.set_recording_active(false)
recording = effect.get_recording()
print(recording)
print(recording.format)
print(recording.mix_rate)
print(recording.stereo)
var data = recording.get_data()
for i in range(0, data.size()):
    print(data[i])
print(data)
print(data.size())
find_node("ListenRecordAudio").stream = recording

Thanks

@Calinou
Copy link
Member

Calinou commented Apr 19, 2020

Audio recording is known not to work on Linux, see #33184.

@gudenis
Copy link
Author

gudenis commented Apr 19, 2020

And on android ?
Is there an alternative to recording with using something else ?

@Calinou
Copy link
Member

Calinou commented Apr 19, 2020

And on android ?

Did you enable the required permissions in the Export dialog?

Is there an alternative to recording with using something else ?

Not that I know of, I'm afraid 🙁

@gudenis
Copy link
Author

gudenis commented Apr 19, 2020

Yes, in Project>Export>Option>Permission
I enable RecordAudio

@Calinou
Copy link
Member

Calinou commented Dec 8, 2022

@gudenis Can you (or anyone else) still reproduce this bug on Android in Godot 3.5.1 or any later release? The Linux part is already tracked in #33184.

If yes, please ensure that an up-to-date Minimal Reproduction Project (MRP) is included in this report (a MRP is a zipped Godot project with the minimal elements necessary to reliably trigger the bug). You can upload ZIP files in an issue comment with a drag and drop.

@Calinou
Copy link
Member

Calinou commented Dec 29, 2022

Closing due to lack of response. Please comment if you can still reproduce this bug on the latest Godot version.

PS: Since no minimal reproduction project was included in the original bug report, please upload one as well to ease troubleshooting.

@Calinou Calinou closed this as not planned Won't fix, can't repro, duplicate, stale Dec 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants