New AudioPlayer Instance not loading audios

Roblox added a new Audio API update that is currently in beta. With this update, they introduced AudioPlayers, which should work the same as sounds except they need to be connected to an AudioEmitter with a Wire. In the official post about this new Audio API update, they say:

“Assign the AssetId property of the AudioPlayer to a suitable audio asset, and notice that its TimeLength and IsReady properties get filled in.”

However, when I do fill in the AssetId, the AudioPlayer’s TimeLength and IsReady properties don’t get filled in. It also does not play the audio ingame when testing or when playing the actual game.

Explorer:
image
AudioPlayer Properties:


Wire Properties:
image
AudioEmitter Properties:
image

I’ve tried this with 3 seperate random audios from the creator store.
Am I doing something wrong or is this a bug?

1 Like

Try adding “rbxassetid://” before the Id

2 Likes

It still doesn’t work. (extra sentence cuz character limit)

You’re assetID looks wrong and you might not have permission to actually use the audio.

Try putting it in a actual Sound Instance and testing it out there.

I’m having the same issue as ATC and I’m using working audios.

It works fine with an actual Sound instance, but not with an AudioPlayer.

Have you tried copying it from the Sound Instance and placing in the AudioPlayer?

Hm, when Enqu_1 replied “Try adding “rbxassetid://” before the Id”, I did try that and it didn’t work, but now it does for some reason. Well, it partly works. The IsReady property gets set to true and the TimeLength property gets set. However, when I try to play it, it doesn’t actually play anything.
I did close roblox studio and just started it back up again, so that might have fixed the problem with the properties, but it still doesn’t play the audio…

And I just tried it again and it didn’t fill in the properties until I deselected the AudioPlayer and selected it again.
The TimePosition property is also frozen until I select it. And when I do select it, it just instantly increases by approximately 0.1. Sometimes it’s 0.102 or 0.009 but always approximately 0.1.

This may because roblox or you might not have permission to use the audio

This is the audio I tried it with:

It’s made by Roblox.

After some testing I have found the problem. With Sounds, audios are played and directly outputted to the client. Audio Players do not output audio to the client, and instead require you to set up what to output using AudioDeviceOutput. In order to replicate how legacy sound works, you can create a part following the camera that contains an AudioListener and an AudioDeviceOutput. Add a wire from Listener to Output, and you should be able to hear sound.

Edit: You can actually just put the AudioListener and AudioDeviceOutput in the camera directly. No need for a part.

image
:3

3 Likes

This doesn’t solve my issue [EDIT: It does]. I do not want to output it using an AudioDeviceOuput, as this does not play the sound spatially. I want it to emit from a certain part, so I am using an AudioEmitter.
Documentation for the AudioEmitter:

After testing it, it does seem to be an issue with the AudioEmitter, as the sound plays when using an AudioOutputDevice Instance, but not an AudioEmitter instance.

Ohh. I see I didn’t understand what you meant. I thought you meant directly playing it through the AudioDeviceOuput. I see you mean put that in the camera separately to capture the audio output by the AudioEmitter. Thank you for the answer.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.