Can't hear audio streams.
#2

Make sure you've followed the installation tutorial properly & correctly -
Quote:
Originally Posted by Incognito
Посмотреть сообщение
Tutorial

Client:

Installation and use of the client plugin is simple. Just run the installer and extract the files to your GTA: San Andreas directory. The ASI plugin detects when SA-MP is loaded and obtains your current player name, server address, and server port automatically. It will then attempt to connect to the TCP server (if there is one) some time after the game has started. By default, there will be a total of ten retry attempts with a delay of ten seconds each. To adjust these numbers, along with a few other settings, you need to edit audio.ini. To locate this file, go to Start, click Run, and type in the following:

Код:
%APPDATA%\SA-MP Audio Plugin
An Explorer window should open. In this directory, you should see your downloaded audiopacks, extracted audio files, audio.ini, and audio.txt.

Server:

First, create a folder called plugins in your server directory if it doesn't already exist. Place audio.dll in it if you're using Windows, or audio.so if you're using Linux.

Add the following line to server.cfg so that the plugin will load the next time the server starts:

Windows:
Код:
plugins audio
Linux:
Код:
plugins audio.so
The server log should indicate that the plugin was loaded successfully. The include file then needs to be put in a filterscript or a gamemode (preferably a gamemode so that there will be no conflicts):

pawn Код:
#include <audio>
The server log should also indicate that the TCP server was created successfully on the same port that the SA-MP sever is using.

Ensure that both the audiopacks folder and the audio.ini file are in the root directory of the server. Open audio.ini and add a section for your audio pack name. For demonstration purposes, this will be called "default_pack":

Код:
[default_pack]
Navigate to your audiopacks directory and create a folder called "default_pack" within it. This is where all of your local audio files will go. Add an audio file to the "default_pack" folder. This will be called "example.wav". Map it under the section you just created in audio.ini:

Код:
[default_pack]
1 = example.wav
The number to the left of the file name (1) is the audio ID. It is an arbitrary number, so it can be whatever you'd like. It can be used in Audio_Play like this:

pawn Код:
Audio_Play(playerid, 1);
You can also map remote files that don't need to be in your audiopacks directory. They must start with "http://". Here is an example:

Код:
[default_pack]
1 = example.wav
2 = http://www.website.com/file.mp3
Now you simply need to set your audio pack when the gamemode loads:

pawn Код:
public OnGameModeInit()
{
    Audio_SetPack("default_pack");
}
Alternatively, it is possible to completely ignore audio.ini and stream all of your files with the Audio_PlayStreamed native instead. This will consume more client-side bandwidth, however, if the files are played repeatedly.

More detailed examples of nearly every native can be found in the filterscript.
Reply


Messages In This Thread
Can't hear audio streams. - by The__ - 22.07.2012, 09:17
Re: Can't hear audio streams. - by Kaperstone - 22.07.2012, 09:52
Re: Can't hear audio streams. - by The__ - 22.07.2012, 10:29
Re: Can't hear audio streams. - by Twizted - 22.07.2012, 11:01
Re: Can't hear audio streams. - by The__ - 22.07.2012, 11:04
Re: Can't hear audio streams. - by Twizted - 22.07.2012, 11:18
Re: Can't hear audio streams. - by The__ - 22.07.2012, 15:21
Re: Can't hear audio streams. - by SuperViper - 22.07.2012, 15:55
Re: Can't hear audio streams. - by The__ - 22.07.2012, 16:07
Re: Can't hear audio streams. - by [KHK]Khalid - 22.07.2012, 16:13

Forum Jump:


Users browsing this thread: 2 Guest(s)