SA-MP Forums

Go Back   SA-MP Forums > SA-MP > Client Support

Reply
 
Thread Tools Display Modes
Old 22/07/2012, 09:17 AM   #1
The__
Huge Clucker
 
Join Date: Nov 2011
Posts: 493
Reputation: 53
Default Can't hear audio streams.

I see the 'audio stream', but I don't hear it.
The__ is offline   Reply With Quote
Old 22/07/2012, 09:52 AM   #2
Kaperstone
Banned
 
Join Date: May 2011
Location: Russia
Posts: 3,004
Reputation: 824
Default Re: Can't hear audio streams.

Make sure you've followed the installation tutorial properly & correctly -
Quote:
Originally Posted by Incognito View Post
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:

Code:
%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:
Code:
plugins audio
Linux:
Code:
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 Code:
#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":

Code:
[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:

Code:
[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 Code:
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:

Code:
[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 Code:
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.
Kaperstone is offline   Reply With Quote
Old 22/07/2012, 10:29 AM   #3
The__
Huge Clucker
 
Join Date: Nov 2011
Posts: 493
Reputation: 53
Default Re: Can't hear audio streams.

The default SAMP function dude.
The__ is offline   Reply With Quote
Old 22/07/2012, 11:01 AM   #4
Twizted
High-roller
 
Join Date: Feb 2011
Location: Portugal
Posts: 1,474
Reputation: 289
Default Re: Can't hear audio streams.

http://wiki.sa-mp.com/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;
}
Twizted is offline   Reply With Quote
Old 22/07/2012, 11:04 AM   #5
The__
Huge Clucker
 
Join Date: Nov 2011
Posts: 493
Reputation: 53
Default Re: Can't hear audio streams.

That's what I'm using, but I don't hear it, only see 'Audio stream:...'
The__ is offline   Reply With Quote
Old 22/07/2012, 11:18 AM   #6
Twizted
High-roller
 
Join Date: Feb 2011
Location: Portugal
Posts: 1,474
Reputation: 289
Default Re: Can't hear audio streams.

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.
Twizted is offline   Reply With Quote
Old 22/07/2012, 03:21 PM   #7
The__
Huge Clucker
 
Join Date: Nov 2011
Posts: 493
Reputation: 53
Default Re: Can't hear audio streams.

Tried, and howcome /audiomsg will help ? I can see the message, but not hear the song itself.
The__ is offline   Reply With Quote
Old 22/07/2012, 03:55 PM   #8
SuperViper
High-roller
 
SuperViper's Avatar
 
Join Date: Sep 2011
Posts: 1,177
Reputation: 315
Default Re: Can't hear audio streams.

Maybe the URL is wrong?
__________________
Release NameUse
FairPlayKeep the cheaters out of your server
Object Model ArrayArray of every single object model in the game
RCON PanelControl any server as you like with RCON controls
SlopeClimb up a steep hill against other players with cars falling down

I do not play on any SAMP server. Anyone with the name Ricky Phelps in-game is an imposter.
SuperViper is offline   Reply With Quote
Old 22/07/2012, 04:07 PM   #9
The__
Huge Clucker
 
Join Date: Nov 2011
Posts: 493
Reputation: 53
Default Re: Can't hear audio streams.

Tried doesn of different songs.
The__ is offline   Reply With Quote
Old 22/07/2012, 04:13 PM   #10
[KHK]Khalid
Gangsta
 
[KHK]Khalid's Avatar
 
Join Date: Jan 2012
Location: Alexandria, Egypt
Posts: 854
Reputation: 136
Default Re: Can't hear audio streams.

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.
[KHK]Khalid is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OnPlayerDeath Audio Streams Problem Rg-Gaming.Info Scripting Help 6 11/06/2012 07:57 PM
Audio Streams Infamous Scripting Help 2 13/03/2012 02:34 PM
Disable Audio Streams Memoryz Client Support 6 01/03/2012 02:09 AM
Audio streams wont work sherlock Scripting Help 5 18/12/2011 10:21 PM


All times are GMT. The time now is 04:37 PM.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.