[Plugin] Audio Plugin

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[]);
Reply

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.
Reply

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..
Reply

It works! This is the really shit!
Reply

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);
}
Reply

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

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?)
Reply

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.
Reply

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?
Reply

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

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.
Reply

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);
Reply

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?
Reply

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.
Reply

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 >.<
Reply

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?
Reply

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

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

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

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....
Reply


Forum Jump:


Users browsing this thread: 23 Guest(s)