Can't hear audio streams.
#1

I see the 'audio stream', but I don't hear it.
Reply
#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
#3

The default SAMP function dude.
Reply
#4

https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer


Quote:

public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/play radio", cmdtext, true) == 0)
{
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls");
return 1;
}
if (strcmp("/radio in my pos", cmdtext, true) == 0)
{
new Float:X, Float:Y, Float:Z, Floatistance = 5.0;
GetPlayerPos(playerid, X, Y, Z);
PlayAudioStreamForPlayer(playerid, "http://somafm.com/tags.pls", X, Y, Z, Distance, 1);
return 1;
}
return 0;
}

Reply
#5

That's what I'm using, but I don't hear it, only see 'Audio stream:...'
Reply
#6

Well, do you have the radio volume set to the maximum? That's in Configuration > Audio > Radio volume (I believe). If that doesn't work, try writing /audiomsg.
Reply
#7

Tried, and howcome /audiomsg will help ? I can see the message, but not hear the song itself.
Reply
#8

Maybe the URL is wrong?
Reply
#9

Tried doesn of different songs.
Reply
#10

It happened to me long time ago, the audio stream didn't load but the messages appeared on the chat then I restarted my pc and re-installed SA-MP it all became fine dunno maybe you can try this.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)