Jump to content

[REL][WIP] radio3d for MTA 1.1


madis

Recommended Posts

Wanted to test out the new audio library in MTA 1.1 and updated my radio3d resource a bit. It allows to add radiostreams to playlist now. You could also add simple links to mp3 files hosted on some server, they are then streamed which means as soon as enough is downloaded it starts playing while downloading further. For hosting you can also use external free hosts, I tested some and these seemed to be fast enough: qdrive.net and mediafire.com, I'm sure there are plenty more, but qdrive seemed to be OK (radio3d hosted audiofiles). Maybe someone wants to share some music, so I could put legal music there and they would be in radio3d default playlist.

You can put these example sound files to your playlist to test the speed(sample song that comes with Windows 7):

<item path="http://download737.mediafire.com/xzkyrmub6kag/qylstl8mpwqcnaq/Kalimba.mp3" title="MediaFire" />
<item path="http://qdrive.net/files/radio3d/156948_Kalimba.mp3" title="QDrive" />

radio3d logic is like this at the momenty:

1) Server sets default playlist.

2) Client can override the server playlist, but only for their own hearing pleasure.

This version works with MTA 1.0.4 too, but streams wouldn't and having a lot of downloadable(not streamable) mp3 files wouldn't be nice for your server, so I suggest it for MTA 1.1 only (as the 3d audio also works more accurately than before).

CHANGELIST from 0.3 to 0.4

Instead of having one placeholder file server can set playlist instead.

Moved file location and title inside playlist to quickly support URLs for streaming

Removed radio3d_playlist dependancy as it wasn't actually needed to accomplish client side only files.

TODO

Add support for others hearing client playlist overrides as well. UPDATE: This might not be good idea, as people might add too noisy stuff. Maybe good only if distance is real low and/or outside volume very low.

Get song info from file or stream

Add exported functions for other resources to overload the playlist. E.g army themed gamemode could add .mp3 file links for war-era songs or stream for fake propaganda.

EDIT: Just adding this here for reference:

Minimum - how far do you need to be to start lowering the volume

Maximum - how far do you need to be to set volume 0

Scroll down for newer version, this attachment is still here in case there are some regressions in newer ones.

Edited by Guest
Link to comment

Cool, just tried it out ;)

Note: It appears to not support .ogg sound files:

BASS ERROR 41 in Play3D path = C:\Program Files\MTA San Andreas_Nightly\mods\deathmatch/resources/radio3d/music/CTA.ogg

I will assume that is something with the new sound library :P

same with the old library...

EDIT:

I have a question, is there a wiki page for MTA 1.1 scripting functions, or did you look at the source code?

Link to comment
Cool, just tried it out ;)

Note: It appears to not support .ogg sound files:

BASS ERROR 41 in Play3D path = C:\Program Files\MTA San Andreas_Nightly\mods\deathmatch/resources/radio3d/music/CTA.ogg

I will assume that is something with the new sound library :P

same with the old library...

EDIT:

I have a question, is there a wiki page for MTA 1.1 scripting functions, or did you look at the source code?

Cool.

Haven't tested the .ogg indeed. Was searching for syntax myself too, but noticed the specific one in mantis bug report.

EDIT: Audio functions for Lua are here: http://code.google.com/p/mtasa-blue/sou ... cpp?r=1898

There are sound effects (also, there's doppler effect in bass BASS_Set3DFactors(1,1,1); (//Use meters as distance unit, real world rolloff, real doppler effect), not sure if it's on). Great, will add something that seems more like inside of a car (and maybe get car/vehicle type and have less of that effect for cars without roofs etc). MTA is cool.

EDIT2: Also, https://wiki.multitheftauto.com/wiki/Category:Changes_in_1.1

Link to comment

This is fail with air vehicles ^.^

I cannot hear any music in the Andromada or the AT-400.

In the Shamal it can only be heard from that cockpit view(one where you cannot see you car, just whats in front of you), and you also cannot hear without the cockpit view when in the Maverick helicopter.

Those are the ones I tested so far.

Also, it is really quiet when in the Monster Truck.

Link to comment

It would be better if you would use /start admin and then click P, go to resources and edit configuration instead of directly editing meta.xml.

Thinking about the game where the idea comes from, Battlefield Vietnam, the airvehicles could be heared from quite far and normal vehicles too, and it wasn't annoying actually (though the amount of vehicles there is low). You might try raising minimum distance and lowering maximum distance, though.

Link to comment
i dont have anything against images, but this one is ugly.. for me :)

ok, I HAVE BETTER IDEA: disable standard GTA SA radio and replace wirh radio3d, at the mouse wheel scrolling choose the next radio (mp3,pls,m3u) station and show it's names on the original gta sa's radio names... good?)

Link to comment
Yeah, i understand :D. Thank you TDK :).

sory for >>lol<< =D you can download mta 1.1from nightly builds, but you need to try find servers via game-monitor.com , type 1.1 and game is MTA and game-monitor show you 5-7 servers

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...