SA-MP Forums Archive
Audio Plugin doesn't play music - 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: Audio Plugin doesn't play music (/showthread.php?tid=351857)



Audio Plugin doesn't play music - CoaPsyFactor - 17.06.2012

Hi there,

I have some strange error, when I play some music, it simply doesn't play it.

I loaded plugin to server, and installed client side...

Here is my code:
pawn Код:
enum rdInfo
{
    rHandleID,
    bool:rPlaced,
    rObject,
    rPlay,
    Float:Radio[3],
};

new RadioInfo[MAX_PLAYERS][rdInfo];
        format(globalstring, sizeof(globalstring), "* %s pali kazetofon i podesava stanicu %s.", PlayerInfo[playerid][pDisplayName], RadioStations[listitem][sname]);
        ProxDetector(15.0, playerid, globalstring, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
        RadioInfo[playerid][rPlay] = true;
        foreach(Player, id)
        {
            if(!Audio_IsClientConnected(id)) continue;
            RadioInfo[playerid][rHandleID] = Audio_PlayStreamed(id, "http://yp.shoutcast.com/sbin/tunein-station.pls?id=98355", false, false, true);
            Audio_Set3DPosition(id, RadioInfo[playerid][rHandleID], RadioInfo[playerid][Radio][0], RadioInfo[playerid][Radio][1], RadioInfo[playerid][Radio][2], 30.0);
        }
and in audio.txt file I got Error creating mixer for playback of "http://yp.shoutcast.com/sbin/tunein-station.pls?id=98355": Invalid handle


Re: Audio Plugin doesn't play music - SDraw - 17.06.2012

Playlist from the link is empty. Here is a problem:
Код:
[playlist]
numberofentries=0
Version=2
Try to use another radio station. And use http://IP:PORT of radio for streamed playback, playlists can be not read sometimes.


Re: Audio Plugin doesn't play music - CoaPsyFactor - 17.06.2012

http://yp.shoutcast.com/sbin/tunein-....pls?id=334445 this one is not empty but still same error :/


Re: Audio Plugin doesn't play music - Kindred - 17.06.2012

Never used an audio plugin, just posting for advice.

Why are you using an audio plugin? The new functions made in 0.3d allows for shoutcast streams.

PlayAudioStreamForPlayer
StopAudioStreamForPlayer

((Correct me if I'm wrong))


Re: Audio Plugin doesn't play music - CoaPsyFactor - 17.06.2012

It do allows me to play, but as you can see here, there could be multiple radios on server, and player have to hear nearest radio, if i use samp's functions i have to make timer that loops through all players, and for each player to loop through all radios, and then to check is player in range. And that would eat too much memory... :/


Re: Audio Plugin doesn't play music - CoaPsyFactor - 17.06.2012

Sorry for DP but I tried as SDraw said to use IP:PORT (http://80.237.152.83:80/) and still not working


Re: Audio Plugin doesn't play music - SDraw - 18.06.2012

Does console print that player has connected to TCP server?
Код:
*** Audio Plugin: `nickname` (ID: `num`) has connected



Re: Audio Plugin doesn't play music - CoaPsyFactor - 18.06.2012

Yes, I've got an answer, this plugin is not compatible with 0.3e


Re: Audio Plugin doesn't play music - SuperViper - 25.06.2012

Quote:
Originally Posted by CoaPsyFactor
Посмотреть сообщение
It do allows me to play, but as you can see here, there could be multiple radios on server, and player have to hear nearest radio, if i use samp's functions i have to make timer that loops through all players, and for each player to loop through all radios, and then to check is player in range. And that would eat too much memory... :/
As far as I know, the audio plugin does all of those things too.


Re: Audio Plugin doesn't play music - SDraw - 20.07.2012

Quote:
Originally Posted by CoaPsyFactor
Посмотреть сообщение
It do allows me to play, but as you can see here, there could be multiple radios on server, and player have to hear nearest radio, if i use samp's functions i have to make timer that loops through all players, and for each player to loop through all radios, and then to check is player in range. And that would eat too much memory... :/
Just use Streamer, create dynamic area and use callback OnPlayerEnterDynamicArea.