Enkanet Posted July 2, 2015 Share Posted July 2, 2015 (edited) SOLUTION: The problem is solved by using getSoundLength and getSoundMetaTags with onClientSoundDownloaded and getSoundBPM should be used with onClientSoundBeat. Thanks to Koeno100. --------------------------------------------------------------------------------------------------------------------------------------------- Hello everybody! I have a problem and I don't know why this happens.. I'm streaming a sound with an url. local x,y,z = getElementPosition(getLocalPlayer()) musicA = playSound3D(guiGetText(diskEditA), x,y,z) but when I try this: outputChatBox(tostring(getSoundBPM(musicA))) it returns false. Same goes for getSoundLength. It returns '0'. Can anybody help me please? EDIT: Also I can not setSoundPaused(musicA, false) after creating the sound. What's wrong with my script? EDIT2: I'm creating the 3D Sound but only I hear the sound not others. EDIT: The problem is solved by using getSoundLengts and getSoundMetaTags with onClientSoundDownloaded. Thanks to Koeno100.And getSoundBPM should be used with onClientSoundBeat. Edited October 9, 2015 by Guest Link to comment
xXMADEXx Posted July 2, 2015 Share Posted July 2, 2015 Are you sure that the sound is successfully being created? Also, I'm not sure if you saw this, but for the getSoundBPM function: Note: Using this function requires the resource to have the above minimum version declared in the meta.xml section. e.g. Link to comment
Enkanet Posted July 2, 2015 Author Share Posted July 2, 2015 Are you sure that the sound is successfully being created?Also, I'm not sure if you saw this, but for the getSoundBPM function: Note: Using this function requires the resource to have the above minimum version declared in the meta.xml section. e.g. Yeah sound plays properly and I can pause/play it and yeah I also added that to meta.xml. I don't really know where the problem is. Link to comment
ChaosMTA Posted July 7, 2015 Share Posted July 7, 2015 Not all sounds return the information you are asking for. Sound lengths won't work properly on streams as there is no end, its probably returning 0 for that reason. Link to comment
Dealman Posted July 7, 2015 Share Posted July 7, 2015 Chaos is right, I believe getSoundBPM scans through the entire file - from start to finish(hence the lag when you use this function). And as there is no actual end for streamed files, you can't get the BPM. Link to comment
Enkanet Posted July 10, 2015 Author Share Posted July 10, 2015 The problem is solved by using getSoundLengts and getSoundMetaTags with onClientSoundDownloaded. Thanks to Koeno100. And getSoundBPM should be used with onClientSoundBeat. Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now