SA-MP Forums Archive
Improve audio streaming? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Improve audio streaming? (/showthread.php?tid=494286)



Improve audio streaming? - newbienoob - 12.02.2014

Streaming an audio with PlayAudioStreamForPlayer causes lag/fps drops or game freezes for some people. So it'd be nice if Kalcor could fix that. Also make a few changes to it?
pawn Код:
PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0)
/*
At url[] parameter, we can choose between url of the audio or file of the audio in scriptfiles to play. Example:
PlayAudioStreamForPlayer(playerid, "www.audio.com/music.mp3");
PlayAudioStreamForPlayer(playerid, "scriptfiles/music.mp3");
*/
EDIT: Hide the ugly audio stream message by default.


Re: Improve audio streaming? - QuaTTrO - 12.02.2014

Quote:
Originally Posted by newbienoob
Посмотреть сообщение
Streaming an audio with PlayAudioStreamForPlayer causes lag/fps drops or game freezes for some people. So it'd be nice if Kalcor could fix that. Also make a few changes to it?
pawn Код:
PlayAudioStreamForPlayer(playerid, url[], Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0)
/*
At url[] parameter, we can choose between url of the audio or file of the audio in scriptfiles to play. Example:
PlayAudioStreamForPlayer(playerid, "www.audio.com/music.mp3");
PlayAudioStreamForPlayer(playerid, "scriptfiles/music.mp3");
*/
I agree with that. Also multiple streams and loop parameter would be great.


Re: Improve audio streaming? - Whizion - 12.02.2014

I have one stream in Alhambra and it's literally unplayable because of the FPS lag.

This should be fixed.


Re: Improve audio streaming? - Riddick94 - 12.02.2014

I am still using Audio Plugin because of its features and higher quality of played soundtracks. I've tried few soundtracks to play with default SA-MP function and it was horrible. Should be fixed, but we also should receive more features for audio. But I believe we will get more about audio in 0.4.


Re: Improve audio streaming? - Richie© - 12.02.2014

OnPlayerAudioStreamEnd(playerid) please?
Would be good to script auto play next track in ipod player.


Re: Improve audio streaming? - Whitetiger - 12.02.2014

It really causes to much lag to be usable in any useful way (for me anyways). Even on a good PC and good internet, it still causes lag sometimes especially when first starting.


Re: Improve audio streaming? - ACI - 12.02.2014

Audio streaming depends on what quality of internet you're having. Suppose, you're playing on a server which has many players, many update patches, "what to do next", many things which get downloaded then deleted (automatically), with your ping >250. In that condition, you get automatically an audio streamed in, then you start downloading the audio, but, when listening, it seems that we are hearing the audio partially. This is because you are having lot of things on your back (like a donkey has on his back).

Edit: Well, I support you only on making the function advanced.


Re: Improve audio streaming? - AIped - 12.02.2014

yea i support this too ,also richie's idea of OnPlayerAudioStreamEnd(playerid) i found usefull


Re: Improve audio streaming? - Pottus - 12.02.2014

@ACI the issue is not so much bandwidth but FPS drop even if the player has their radio disabled.


Re: Improve audio streaming? - newbienoob - 13.02.2014

Quote:
Originally Posted by ACI
Посмотреть сообщение
Audio streaming depends on what quality of internet you're having. Suppose, you're playing on a server which has many players, many update patches, "what to do next", many things which get downloaded then deleted (automatically), with your ping >250. In that condition, you get automatically an audio streamed in, then you start downloading the audio, but, when listening, it seems that we are hearing the audio partially. This is because you are having lot of things on your back (like a donkey has on his back).
It's FPS drops/game freezes as I said in main post. I don't have any problem with connection-lag while streaming an audio with many players online even though my internet speed is very slow.