[Plugin] Audio Plugin

Is there a live server running where this can be seen in action rather than having to set it up to test? Would be very helpful if there was

Cheers

David

EDIT: Sorry found the example
Reply

watkijkje: Glad to hear that you now have it working! Yes, I forgot about the option that you mentioned in your post. What this basically does is statically link the runtime libraries with the DLL, freeing dependency of the .NET Framework on machines where it is not installed. The only disadvantage is that when a new version of the .NET Framework releases, the DLL will continue to use the outdated libraries until it is recompiled. In any case, seeing that this prevents compatibility issues, I will consider doing it myself in the next release.
Reply

were's the FS to it?
Reply

There is an example filterscript in the server package located at the bottom of the first post in this topic. However, it only demonstrates basic usage of the natives and callbacks—the real aim here is to make audio files play at scriptable events in your own gamemode.
Reply

very nice and useful
Reply

Has anyone gotten both this plugin and the YSI object streamer working together? Seems I can connect to the server, load a pack, now if I don't play a sound the objects load, but the moment a sound gets played the objects unload. I thought maybe the Audio_Poll'er timer might have been clashing so I added the timer to YSI timer offsetting function and still no change in behavior.
Reply

So, Is this like its own shoutcast for SAMP?
Reply

Anyone got this working with an object streamer??!?!?!?!?
Reply

cyber_punk: I am unable to reproduce that. The YSI object streamer appears to work fine with my client and plugin (the latest development version). Check your script for other conflicts. If, for some reason, you still cannot solve your problem, there are plenty of other object streamers available for you to use, but I highly doubt the plugin is rendering your script inoperable.

Connor(GTA24.NET): Not really.
Reply

Hi all, I'm a new user of this plugin, i've read all the topic and don't find a solution for my problem

Anyone could show me a simple code of reading a sound with 3DPosition and a EAX effect, in a command for example.

I've tried to do it, but it doesn't work anyway

[code=Pawn]if (strcmp("/test", cmdtext, true, 5) == 0)
{
Audio_Play(playerid, 1, 2, 0, 1);
Audio_Set3DPosition(playerid, 2, -1410.1191, -308.4622,13.84);
return 1;
}[/code]

I'm hearing the sound all over the map

Maybe a function shouldn't be set in this place, i don't know.

Thank you for your answers
Reply

The floating-point numbers used in Audio_Set3DPosition are not coordinates in the game world. They are offsets of the user's listening center. (By the way, this native requires five arguments—you used four!) What you are trying to do, however, can be accomplished by creating a few distance checks and using Audio_SetVolume on a timer (i.e., when the player gets closer to a point, the sound will become louder). This is not true 3D sound, but it is close enough.

Edit: Check the second post of this thread for a better example.
Reply

Aah ok !

Thank you very much Incognito !

Your help was useful
Reply

=Contador=: Download the server package again. I compiled the plugin with an older version of GCC/G++, and it seems to work on my Debian 4 installation.

GTAIV2008: Great! I am always glad to hear that people are using this plugin on their servers.

steryman_007: I might consider creating a small walkthrough later. In the meantime, look at the contents of the server package (particularly the filterscript), because nearly everything is explained there.
Reply

This is a great plugin, but a few ways to make it better...

Make it stream custom models to the player to, now that'd be something, when I say models I I mean car models, building models, billboard models.

Why not get someone else to do it?

Because it would be awesome having only one client the server has to download so that they can really appreciate the server.
Reply

That has been suggested before, but it would require client-side hooks and possibly other modifications, which would technically violate SA-MP's license agreement. This client, apart from reading a few memory addresses to see if the game has focus, does nothing but communicate with the TCP server created by the plugin to play back audio files.

v0.3.2 has been released:

Quote:

- Fixed bug related to stopping and starting audio files in the client; handle IDs and sequence IDs are now automatically assigned by the plugin
- Fixed bug in the client that caused some track changes in online stations to print incorrectly
- Made the text block in the client auto-clear after reaching a set limit (committed in v0.3.1, but lowered limit in v0.3.2)

Note that in this version, you can keep track of handle IDs and sequence IDs like this:

pawn Код:
new
    handleid,
    sequenceid;

handleid = Audio_Play(0, 1, 0, 0, 0);
sequenceid = Audio_CreateSequence();

Audio_Stop(0, handleid);
Audio_DestroySequence(sequenceid);
Reply

Quote:
Originally Posted by Incognito
That has been suggested before, but it would require client-side hooks and possibly other modifications, which would technically violate SA-MP's license agreement. This client, apart from reading a few memory addresses to see if the game has focus, does nothing but communicate with the TCP server created by the plugin to play back audio files.

v0.3.2 has been released:

Quote:

- Fixed bug related to stopping and starting audio files in the client; handle IDs and sequence IDs are now automatically assigned by the plugin
- Fixed bug in the client that caused some track changes in online stations to print incorrectly
- Made the text block in the client auto-clear after reaching a set limit (committed in v0.3.1, but lowered limit in v0.3.2)

Note that in this version, you can keep track of handle IDs and sequence IDs like this:

pawn Код:
new
    handleid,
    sequenceid;

handleid = Audio_Play(0, 1, 0, 0, 0);
sequenceid = Audio_CreateSequence();

Audio_Stop(0, handleid);
Audio_DestroySequence(sequenceid);
With Kye's permission to violate the terms of service, do you think you would do it?
Reply

I suggest you to use callback hook(y_less wrote topic for it) so users dont have to put Audio_OnPlayerConnect() & Audio_OnPlayerDisconnect(); in gm/fs callbacks
Reply

Sounds good Incognito, i always wondered why you choose to let the scripting decide handleids and not the plugin, so this is a good improvement that makes it harder for scripters to mess up.

Its a real powerful app, i wouldn't be surprised if audio plugin will run on most sa-mp servers within a near future.
Reply

Wazza!: Probably not. That is not the aim of this project. If you want good integrated custom model support for San Andreas, try MTA. It would be far too complicated to put such functionality in this client. I have not, however, completely dropped consideration of other features that do not interface with the game, such as client keybind support. Voice chat is also almost certainly possible. These ideas take time and energy to implement, though, and since I am the only developer and there is little interest in the community, it is unlikely such features will ever be coded.

JoeBullet: Callback hook? I see no reference of this on the forums. Do you mean invoking PAWN in the plugin?

hansen111: Thanks. I, too, hope that more people will take notice of this project in the future, because I think it really adds a new dimension to SA-MP.
Reply

Quote:
Originally Posted by Incognito
Wazza!: Probably not. That is not the aim of this project. If you want good integrated custom model support for San Andreas, try MTA. It would be far too complicated to put such functionality in this client. I have not, however, completely dropped consideration of other features that do not interface with the game, such as client keybind support. Voice chat is also almost certainly possible. These ideas take time and energy to implement, though, and since I am the only developer and there is little interest in the community, it is unlikely such features will ever be coded.
Okay, fair enough.
Nice one with it anyway and good luck with any future projects you create.
Reply


Forum Jump:


Users browsing this thread: 21 Guest(s)