SA-MP Forums Archive
[Plugin] Audio Plugin - 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: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] Audio Plugin (/showthread.php?tid=82162)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34


AW: [REL] Audio Plugin v0.5 - Pablo Borsellino - 27.07.2011

I love this Plugin , in future I will use it.

Works:
pawn Код:
Audio_Play(playerid,"example.mp3");
?

If this not works:
Suggestion:
pawn Код:
Audio_Play(PlayerID,FileID or Filename[]);



Re: [REL] Audio Plugin v0.5 - Ivan_Pantovic - 28.07.2011

Hmm, I used this plugin for some time and it worked perfectly, but than I bought new VPS, and started using a new gamemode... long story, and now I have a problem with this:
Код:
[23:01:49] *** Audio Plugin: Started TCP server on port 7777
[23:01:49] *** Audio Plugin: Error accepting socket: Invalid argument
[23:01:49] *** Audio Plugin: Error accepting socket: Bad file descriptor
Thanks.


Re: [REL] Audio Plugin v0.5 - Mandrakke - 28.07.2011

Hello everyone, I'm using the Audio Plugin 0.5 and it's works fine in the localhost (Windows), but in the host (Linux) i receive the following error:

Audio Plugin: Error binding endpoint for acceptor: Address already in use

my server are hosted on serverffs and this plugin seems doesn't work with Linux Servers, i tried test the plugin with the default filterscript (that came with the own plugin) and.. NOTHING! simply doesn't works.

On the version 0.4 we could change the server port in the configuration files, but now it seems impossible..


Respuesta: [REL] Audio Plugin v0.5 - TiNcH010 - 29.07.2011

It works! This is the really shit!


Re: [REL] Audio Plugin v0.5 - Riddick94 - 29.07.2011

How to do this.. for player playing sound for players around playing 3D position sound? because.. it's playing for player two sounds at once.. and not too good result come out.

pawn Код:
foreach2(i, MAX_PLAYERS)
        {
            Audio_PlayEx(playerid, 1, false, false, true);
            Audio_Set3DPositionEx(i, 1, 30.0);
        }
pawn Код:
stock Audio_Set3DPositionEx(playerid, audioid, Float:distance)
{
    new Float:X, Float:Y, Float:Z;
    Audio_Remove3DPosition(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
    PlayerInfo[playerid][pAudio3DPlaying] = Audio_Set3DPosition(playerid, audioid, X, Y, Z, distance);
    return true;
}

stock Audio_PlayEx(playerid, audioid, bool:pause, bool:loop, bool:downmix)
{
    Audio_Stop(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
    PlayerInfo[playerid][pAudioPlaying] = Audio_Play(playerid, audioid, pause, loop, downmix);
    return true;
}

edit://
Maybe this could be like that?

pawn Код:
foreach2(i, MAX_PLAYERS)
            {
                Audio_PlayEx(i, 1, false, false, true);
                Audio_Set3DPositionEx(i, 1, 30.0);
            }
Now sound is okey but i need to test it with someone..

edit2://
To remove 3D position i need again use foreach?

pawn Код:
foreach2(i, MAX_PLAYERS)
{
Audio_Stop(i, 1);
Audio_Remove3DPositon(i, 1);
}



Re: [REL] Audio Plugin v0.5 - Trol_Patrol - 30.07.2011

When I am doing any command it says "UNKONWN COMMAND"... ?


Re: [REL] Audio Plugin v0.5 - Riddick94 - 31.07.2011

Which is a better solution?

1. Sound from the folder and using then Audio_Play.
2. Sound from the internet and using then Audio_Play_Streamed.

(If you prefer Audio_PlayStreamed, please can you give me a link to upload were file extension is on the end of the link?)


Re: [REL] Audio Plugin v0.5 - wups - 01.08.2011

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
How to do this.. for player playing sound for players around playing 3D position sound? because.. it's playing for player two sounds at once.. and not too good result come out.

pawn Код:
foreach2(i, MAX_PLAYERS)
        {
            Audio_PlayEx(playerid, 1, false, false, true);
            Audio_Set3DPositionEx(i, 1, 30.0);
        }
pawn Код:
stock Audio_Set3DPositionEx(playerid, audioid, Float:distance)
{
    new Float:X, Float:Y, Float:Z;
    Audio_Remove3DPosition(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
    PlayerInfo[playerid][pAudio3DPlaying] = Audio_Set3DPosition(playerid, audioid, X, Y, Z, distance);
    return true;
}

stock Audio_PlayEx(playerid, audioid, bool:pause, bool:loop, bool:downmix)
{
    Audio_Stop(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
    PlayerInfo[playerid][pAudioPlaying] = Audio_Play(playerid, audioid, pause, loop, downmix);
    return true;
}

edit://
Maybe this could be like that?

pawn Код:
foreach2(i, MAX_PLAYERS)
            {
                Audio_PlayEx(i, 1, false, false, true);
                Audio_Set3DPositionEx(i, 1, 30.0);
            }
Now sound is okey but i need to test it with someone..

edit2://
To remove 3D position i need again use foreach?

pawn Код:
foreach2(i, MAX_PLAYERS)
{
Audio_Stop(i, 1);
Audio_Remove3DPositon(i, 1);
}
pawn Код:
stock Audio_Set3DPositionEx(playerid, audioid, Float:distance)
{
    new Float:X, Float:Y, Float:Z;
    Audio_Remove3DPosition(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
    PlayerInfo[playerid][pAudio3DPlaying] = Audio_Set3DPosition(playerid, audioid, X, Y, Z, distance);
    return true;
}
X Y Z is not defined.


Re: [REL] Audio Plugin v0.5 - Riddick94 - 01.08.2011

I know. I defined it but i need to use for(each for me) to set audio for closests players? And to delete i need use For(each) too?


Re: [REL] Audio Plugin v0.5 - Snipa - 03.08.2011

Is it possible to stream from ******* instead of uploading it to a server/finding it as a direct file.


Re: [REL] Audio Plugin v0.5 - wups - 03.08.2011

Quote:
Originally Posted by Snipa
Посмотреть сообщение
Is it possible to stream from ******* instead of uploading it to a server/finding it as a direct file.
That would be very nice. But i think Incognito won't do that, if it's illegal.

You can try writing your own php script, to play only music.


Re: [REL] Audio Plugin v0.5 - Incognito - 04.08.2011

Quote:
Originally Posted by AirKite
Посмотреть сообщение
Ok, thanks for answer. How about add Audio_Set3DVelocity?

like
pawn Код:
new Float:Vehpv[6], vehicle=GetPlayerVehicleID(playerid);
GetVehicleVelocity(vehicle, Vehpv[0], Vehpv[1], Vehpv[2]);//////////////////
GetVehiclePos(vehicle, Vehpv[3], Vehpv[4], Vehpv[5]);
Audio_Set3DPosition(playerid, vehhandle[vehicle], Vehpv[3], Vehpv[4], Vehpv[5], Float:distance);
Audio_Set3DVelocity(playerid, vehhandle[vehicle], Vehpv[0], Vehpv[1], Vehpv[2]);//////////////////
It's will make effect moving sound. I hope so.
That could be possible. BASS has algorithms to create a doppler effect for streams with a velocity configured. I believe BASS uses meters per second, though, so the units returned from GetPlayerVelocity and GetVehicleVelocity will need to be converted (the units GTA uses are meters per 1/50th of a second, I think, which is a little strange).

Quote:
Originally Posted by Meta
Посмотреть сообщение
In 0.4 there was an option in the configuration to play the music outside of GTA aswell. Now it's gone. Do I have to look into 0.4 and readd it to the conf or did you remove this function?
If you mean the "mute_playback_when_minimized" option, then yes, it's gone. That was an artifact from the configuration settings for the external client. It made sense when you could minimize the game and look at the client to see what was currently playing, but now that there's no GUI and the plugin is simply loaded with the game, I don't think that it's a particularly useful option anymore.

Quote:
Originally Posted by Ivan_Pantovic
Посмотреть сообщение
Hmm, I used this plugin for some time and it worked perfectly, but than I bought new VPS, and started using a new gamemode... long story, and now I have a problem with this:
Код:
[23:01:49] *** Audio Plugin: Started TCP server on port 7777
[23:01:49] *** Audio Plugin: Error accepting socket: Invalid argument
[23:01:49] *** Audio Plugin: Error accepting socket: Bad file descriptor
Thanks.
Quote:
Originally Posted by Mandrakke
Посмотреть сообщение
Hello everyone, I'm using the Audio Plugin 0.5 and it's works fine in the localhost (Windows), but in the host (Linux) i receive the following error:

Audio Plugin: Error binding endpoint for acceptor: Address already in use

my server are hosted on serverffs and this plugin seems doesn't work with Linux Servers, i tried test the plugin with the default filterscript (that came with the own plugin) and.. NOTHING! simply doesn't works.

On the version 0.4 we could change the server port in the configuration files, but now it seems impossible..
I think these errors indicate some problem with the server host rather than with the plugin itself. I'd recommend contacting customer support and asking for their assistance with setting up the TCP server.

Quote:
Originally Posted by Riddick94
Посмотреть сообщение
pawn Код:
foreach2(i, MAX_PLAYERS)
        {
            Audio_PlayEx(playerid, 1, false, false, true);
            Audio_Set3DPositionEx(i, 1, 30.0);
        }
pawn Код:
stock Audio_Set3DPositionEx(playerid, audioid, Float:distance)
{
    new Float:X, Float:Y, Float:Z;
    Audio_Remove3DPosition(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
    PlayerInfo[playerid][pAudio3DPlaying] = Audio_Set3DPosition(playerid, audioid, X, Y, Z, distance);
    return true;
}

stock Audio_PlayEx(playerid, audioid, bool:pause, bool:loop, bool:downmix)
{
    Audio_Stop(playerid, PlayerInfo[playerid][pAudio3DPlaying]);
    PlayerInfo[playerid][pAudioPlaying] = Audio_Play(playerid, audioid, pause, loop, downmix);
    return true;
}
The problem is that you're passing the audio ID to Audio_Set3DPosition rather than the handle ID returned from Audio_Play. It should be done like this:

pawn Код:
new handleid = Audio_Play(playerid, 1);
Audio_Set3DPosition(playerid, handleid, x, y, z, distance);



Re: [REL] Audio Plugin v0.5 - AirKite - 05.08.2011

Quote:
Originally Posted by Incognito
Посмотреть сообщение
That could be possible. BASS has algorithms to create a doppler effect for streams with a velocity configured. I believe BASS uses meters per second, though, so the units returned from GetPlayerVelocity and GetVehicleVelocity will need to be converted (the units GTA uses are meters per 1/50th of a second, I think, which is a little strange).
Will you do it?


Re: [REL] Audio Plugin v0.5 - KfirRP - 07.08.2011

Nevermind, I succeed - it just took time to login to the client. So PlayerSpawn is not a good example of time to put an audio in.


Re: [REL] Audio Plugin v0.5 - Kar - 09.08.2011

is there anyway to detect if a file is transfered yet? I don't want players to select a vehicle until there file is transfered..

something like

pawn Код:
native Audio_IsFileTransfered(playerid, audioid);
would be good >.<


Re: [REL] Audio Plugin v0.5 - Scottas - 09.08.2011

I want to ask one question. Why thre are two projects in client plugin? So, there are two separate dll's. What is that for?


Re: [REL] Audio Plugin v0.5 - Ironboy - 13.08.2011

It isnt working for me.I tryed a lot to make it works but no use.


Re: [REL] Audio Plugin v0.5 - Gh0sT_ - 13.08.2011

INcognito >> sorry, it was my mistake. my client version was 0.4, and plugin was 0.5


Re: [REL] Audio Plugin v0.5 - Unknown123 - 17.08.2011

why does it only connect id 0 to the TCP server?


Re: [REL] Audio Plugin v0.5 - SDraw - 17.08.2011

Quote:
Originally Posted by Unknown123
Посмотреть сообщение
why does it only connect id 0 to the TCP server?
What? Anyone can connect to the TCP server who has a client plugin....