[Include] Audio Multi Stream
#1

SA:MP Multi Stream by Atrox

With this include you can hear two (streamed) sounds "at once".

Example: While you are listening to a radio stream an alarm appears. Your radio stream will be stopped and you hear the alarm.
Using this include the radio stream will be restarted if the alarm is done.
Changelog 1.2:
- fixed StopAudioStreamForPlayerEx
- PlayAudioStreamForPlayerEx will be triggered after the duration time to reset the data
v.1.2
Download Pastebin: http://pastebin.com/Nt4mxxGb

Bugs:
-nothing (Please report)

How to use:

Code:
#include <audiostream>
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp(cmdtext, "/radio",true) == 0) {
        PlayAudioStreamForPlayerEx(playerid, "http://80.237.158.76:80", -1);
    return 1;
}
    if(strcmp(cmdtext, "/sound",true) == 0) {
PlayAudioStreamForPlayerEx(playerid, "http://www.cms.livjm.ac.uk/library/Alice/Alice/Required/sounds/chicken.mp3", 3000);
    return 1;
}
return 0;
}

New functions:

Code:
PlayAudioStreamForPlayerEx(playerid, url[], duration, Float:posX = 0.0, Float:posY = 0.0, Float:posZ = 0.0, Float:distance = 50.0, usepos = 0)
StopAudioStreamForPlayerEx(playerid)
New parameter: duration in milliseconds. (-1 for an unlimited stream, e.g. a radio)



MfG
Atrox
Reply


Messages In This Thread
Audio Multi Stream - by Atrox95 - 19.12.2011, 14:45
Re: Audio Multi Stream - by FireCat - 19.12.2011, 14:46
Respuesta: Audio Multi Stream - by [DOG]irinel1996 - 19.12.2011, 15:12
Re: Audio Multi Stream - by T0pAz - 19.12.2011, 15:20
Re: Audio Multi Stream - by Niko_boy - 19.12.2011, 16:57
Re: Audio Multi Stream - by Astralis - 19.12.2011, 17:06
Re: Audio Multi Stream - by Atrox95 - 19.12.2011, 17:25
Re: Audio Multi Stream - by Nenad - 19.12.2011, 19:20
AW: Audio Multi Stream - by Atrox95 - 05.01.2012, 09:29
Respuesta: Audio Multi Stream - by LULU - 08.01.2012, 00:36
AW: Audio Multi Stream - by Atrox95 - 14.04.2012, 08:43

Forum Jump:


Users browsing this thread: 2 Guest(s)