[Plugin] Audio Plugin

Quote:
Originally Posted by Incognito
View Post
Are you sure your sound card is installed properly?
yes, it is correctly installed.

iґve got the solution for own audio files:
- always deactivate alchemy for gta if you have a creative soundcard

unfortunately the radio still doesnґt work.
it stops always after a second.
no error logs found..
i tried many settings in my audio driver nothing worked

I've even tried it on several pc.
it stops at each. itґs one with win7 x64 and another with win xp x86.

in my script i used "Audio_SetRadioStation(playerid, 7);" in a simple command.

has somebody an idea?
Reply

zuiozuio, I think u can only set the radio if u are in a car, not onfoot.
Reply

Quote:
Originally Posted by Pain123
View Post
zuiozuio, I think u can only set the radio if u are in a car, not onfoot.
oh really?!
it works, thanks buddy
Reply

I've found the solution for my problem.
I've only set in the properties of the gta_sa.exe 'start programm as administrator' and it worked!
Reply

Incognito
Quote:

but I do have concerns about the amount of client-side memory hacking that would be involved

It is already possible to add memory hack
I have added anticheat in
Code:
void Game::handleMainTimer(const boost::system::error_code & error)
Code:
* (unsigned char *)GodmodeAdress=0;
to Add anti godmode function.
But what will be if you set parameter to 1? it will be cheat Oo
And you can't do anything with it =(

Code:
low-level keyboard hooks, but there are downsides: it might degrade client-side performance
In $0beit there is low-level keyboard hooks, and it's opensource, and no problems with perfomance

Code:
and consume lots of bandwidth as well
I think, will be more better if on connect, server will send to client what keys you can test, as Example: F1 F8 Esc Z, it will not consume lots of bandwidth

Incognito If you are interested in hearing, I want to add to my server music from Unreal Tournament and Pain Killer ))))
Ofc i will not forget about starcraft)))
Reply

Quote:
Originally Posted by SPAWN_METAL
View Post
Code:
low-level keyboard hooks, but there are downsides: it might degrade client-side performance
In $0beit there is low-level keyboard hooks, and it's opensource, and no problems with perfomance

Code:
and consume lots of bandwidth as well
I think, will be more better if on connect, server will send to client what keys you can test, as Example: F1 F8 Esc Z, it will not consume lots of bandwidth
Don't forget that it doesn't send the keys to the server. It just uses them in the local script, which is fine.


Anyway, i think i found a bug. When you set the station to 0 or do Audio_StopRadio, it doesn't let you to turn it back on.

A solution would be muting a radio station, so you could replace them with custom ones.
Reply

Thanks for the release version 0.5

Noticed this message in server_log:
Quote:

*** Audio Plugin: Error binding endpoint for acceptor: Address already in use

What it means and how to fix it?

P.S. Sorry for my bad English
Reply

Very Nice Work Incognito, but, i have this problem when i exit the Game:

Quote:

SA-MP 0.3c-R3
Exception At Address: 0x7C9200E8

Registers:
EAX: 0x00000000 EBX: 0x02BB0000 ECX: 0x0023FA70 EDX: 0x3EB60000
ESI: 0x00000002 EDI: 0x00000000 EBP: 0x0023F9E0 ESP: 0x0023F7C0
EFLAGS: 0x00210246

Stack:
+0000: 0x02B93E24 0x00000002 0x00000002 0x00000000
+0010: 0x77DA7763 0x00380038 0x1E3F02D0 0x00000018
+0020: 0x00000020 0x0023FA10 0x00000040 0x00000000
+0030: 0x00000000 0x00000000 0x0023FA18 0x00000000
+0040: 0x00000000 0x00000000 0x00000000 0x00000000
+0050: 0x00000000 0x00000000 0x00000040 0x0023FA68
+0060: 0x00000000 0x00000000 0x00000002 0x00000001
+0070: 0x00000020 0x0023FA10 0x00000020 0x0023F870
+0080: 0x024D0000 0x7C920222 0x00000003 0x024D0718
+0090: 0x024D0000 0x00000000 0x0023F848 0x7C9221B4
+00A0: 0x0023FA8C 0x7C91E920 0x7C920228 0xFFFFFFFF
+00B0: 0x00000FA0 0x7C921086 0x7C9201DB 0x00000001
+00C0: 0x00000010 0x00000000 0x7C922230 0xFFFFFFFF
+00D0: 0x7C922228 0x7C80B55E 0x00000001 0x0A380DB5
+00E0: 0x7C80B50E 0x00000104 0x0023F940 0x0023F94C
+00F0: 0x00365560 0x7C91D98A 0x7C80BA5D 0xFFFFFFFF
+0100: 0x02BA632A 0x00000000 0x0023F904 0x0000001C
+0110: 0x0023F8E8 0x0023F8EC 0x7C80BA86 0x0023F8EC
+0120: 0x00000000 0x7C9200B8 0x1E3F02C8 0x0023F9B8
+0130: 0x7C920041 0x01580808 0x7C92005D 0x0023FA10
+0140: 0x00000000 0x7C920466 0x00000000 0x00000080
+0150: 0x00003000 0x00001000 0x00000010 0x01000000
+0160: 0x0023FB58 0x7C844A01 0x02BA632A 0x00000008
+0170: 0x00000001 0x00000000 0x7C844A14 0x4044C53F
+0180: 0x00000000 0x01000000 0x00003000 0x003A0043
+0190: 0x0057005C 0x004E0049 0x00000040 0x00000000
+01A0: 0x1E3F02D0 0x00730079 0x00000010 0x00000040
+01B0: 0x00000032 0x01580000 0x0023F770 0x0054006B
+01C0: 0x01580000 0x00000020 0x0023F9D0 0x0023FA10
+01D0: 0x00000000 0x0023F9BC 0x0001EB99 0x00000008
+01E0: 0x0023F8FC 0x0023F9C8 0x0023FA80 0x00000000
+01F0: 0x00000000 0xFFFFFFFF 0x7C92005D 0x7C9204AC
+0200: 0x01000000 0x02BB0000 0x0023F7C0 0x0023F3E4
+0210: 0x0023FA0C 0x7C91E920 0x7C9201E0 0xFFFFFFFF
+0220: 0x0023FA1C 0x02BA3741 0x02BB0000 0x00000000
+0230: 0x00000002 0x02B93E24 0x0023FA70 0x00000002
+0240: 0x00650072 0x0023F9F4 0x0023F3E4 0x0023FA80
+0250: 0x02BA4600 0x02BA9410 0xFFFFFFFF 0x00000000
+0260: 0x02BA3763 0x00000002 0x02BA2D8A 0x00000002
+0270: 0x00000001 0x02BA112A 0x00000002 0x02B93E24

SCM Op: 0x108, lDbg: 0

Game Version: EU 1.0

and when y press "Close", another error:

Quote:

"The Instruccion in "0x7c9200e8" do reference to the memory in "0x02bb0010". The memory can't "read".
Press Accept to end this program.

and when y press Accept:

Quote:

SA-MP 0.3c-R3
Exception At Address: 0x7C9200E8

Registers:
EAX: 0x00000008 EBX: 0x02BB0000 ECX: 0x7C91F661 EDX: 0x00000000
ESI: 0x0000008C EDI: 0x00000000 EBP: 0x0023EED4 ESP: 0x0023ECB4
EFLAGS: 0x00210246

Stack:
+0000: 0x00000000 0x0000008C 0x00000057 0x00000000
+0010: 0x7C9200B8 0x024DFFB0 0x0023ED98 0x7C920041
+0020: 0x024D0868 0x7C92005D 0x00000000 0x024DFFB8
+0030: 0x00000000 0x01580000 0x7C92005D 0x7C8850E0
+0040: 0x01D90040 0x1E3F0D50 0x00000000 0x0023ED10
+0050: 0x03367CE8 0x0023ED24 0x7C920A36 0x00000063
+0060: 0x03367CE8 0x024D0000 0x03367870 0x00000000
+0070: 0x0023EDF8 0x024D0178 0x0023EDF8 0x7C920981
+0080: 0x024D0608 0x7C92005D 0x00000000 0x03367878
+0090: 0x00000002 0x00000000 0x00000A58 0x03367870
+00A0: 0x024D0178 0x0020025B 0x03367878 0x024D0000
+00B0: 0x7E3A4B0A 0x00010040 0x0330B530 0x0023ECCC
+00C0: 0x03315E38 0x02587D90 0x00000088 0x0023ECDC
+00D0: 0xFFFFFFFF 0x0023EDD0 0x7C91E920 0x7C920060
+00E0: 0x03315E40 0x00000478 0x7E398734 0x00110040
+00F0: 0x00000082 0x00000000 0x00000000 0x02587D90
+0100: 0xDCBAABCD 0x00000000 0x7C921483 0x024D0000
+0110: 0x7C921460 0x7C98E5A0 0x7C98E580 0x00000000
+0120: 0x00000000 0x0101EDC8 0x000000F2 0x0023ED3C
+0130: 0x7C91E920 0x0023EDF8 0x7E3A947C 0x0000A911
+0140: 0x0000A911 0x0023EE0C 0x7E3A941E 0x01AA6D10
+0150: 0x0000A911 0x00000000 0x0023EE24 0x7E3A94E2
+0160: 0x01AA6D10 0x5B15153D 0x024D39B0 0x024D3970
+0170: 0x0023EE44 0x5B154C82 0x024D39B0 0x00110040
+0180: 0x5B154CB6 0x024D39B0 0x024D39B0 0x00000000
+0190: 0x0023EE58 0x5B154C60 0x00110040 0x00110040
+01A0: 0x03367878 0x0023EE74 0x5B1535F0 0x00110040
+01B0: 0x00000001 0x00000000 0x7E3BE577 0x00110040
+01C0: 0x7E3BE577 0x5B154CE1 0x00110040 0x00000002
+01D0: 0x00000000 0x00000000 0x00000000 0x00000001
+01E0: 0x0023EEC0 0x7E398734 0x00110040 0x00000000
+01F0: 0x00000000 0x00000000 0x00000002 0x00000000
+0200: 0x00000000 0x02BB0000 0x0023ECB4 0x0023E8D8
+0210: 0x0023EF04 0x7C91E920 0x7C9201E0 0xFFFFFFFF
+0220: 0x0023EF14 0x02BA4B53 0x02BB0000 0x00000008
+0230: 0x0000008C 0x19930520 0x00000000 0x00000057
+0240: 0x0000008C 0x00000000 0x0023EEE8 0x0023E8D8
+0250: 0x0023EF4C 0x02BA4600 0x02BA9728 0xFFFFFFFF
+0260: 0x0023EF5C 0x02BA409C 0x00000001 0x0000008C
+0270: 0xFFFFFFFF 0x0023FA80 0x02BA3818 0x19930520

SCM Op: 0x108, lDbg: 0

Game Version: EU 1.0

when i press Close

Quote:

The instruction in "0x7c9200e8" do reference to the memory in "0x02bb0010". The memory can't "read".
Press Accept to end the program

I don't know what i do wrong..

I think this error It's because i have the GTA Sa RIP..

Thanks
Reply

are you using radio statsions? if the ripped version of sa doesn't have the real radio station files
Reply

No, im not using the radio stations
Reply

now i have another problem.
if i use Audio_Play und then Audio_SetVolume, it start loud and changes the volume after a few second.

can anyone post a little example code, how to change volume correctly?
Reply

Code:
Audio_SetVolume(playerid,Audio_Play(playerid,1),50);
But with this version you couldn't find out which handleid this play will have.
Reply

Quote:
Originally Posted by wups
View Post
Anyway, i think i found a bug. When you set the station to 0 or do Audio_StopRadio, it doesn't let you to turn it back on.

A solution would be muting a radio station, so you could replace them with custom ones.
It's not a bug. This is just what the game does when the radio is turned off. If you want to turn it back on, you either need to enter the vehicle again or use Audio_SetRadioStation.

The only way of muting the radio station is adjusting the music volume. However, this is a game setting, which means every value set by the server will be permanently saved. It's not really a feasible option.

Quote:
Originally Posted by RingoRus
View Post
Thanks for the release version 0.5

Noticed this message in server_log:

Quote:

*** Audio Plugin: Error binding endpoint for acceptor: Address already in use

What it means and how to fix it?

P.S. Sorry for my bad English
I'm not exactly sure why this happens to only some people on Linux. Make sure nothing else is occupying the port (including another instance of the server), and if you've stopped the server, try waiting a few minutes before starting it again.

Quote:
Originally Posted by [TF]Death_Ghost
View Post
I think this error It's because i have the GTA Sa RIP..
Try running a legitimate version of the game!

Quote:
Originally Posted by zuiozuio
View Post
now i have another problem.
if i use Audio_Play und then Audio_SetVolume, it start loud and changes the volume after a few second.

can anyone post a little example code, how to change volume correctly?
Start the file paused (set the pause parameter to true in Audio_Play), set the volume with Audio_SetVolume, and resume the file with Audio_Resume.
Reply

Quote:
Originally Posted by AirKite
Посмотреть сообщение
Add attach functions (player, vehicle, object)
Use a timer, and update 3d position.
Reply

No radio stations when player is on foot? why? :< i wanna play player a Radio Music from Vehicle.. can you do this as 5.1 version? Please..
Reply

Quote:
Originally Posted by wups
Посмотреть сообщение
Use a timer, and update 3d position.
This way, get extra traffic and lag update. Attach function should be have a client-side in plugin updates.
Reply

I have one question.

Does Audio_OnRadioStationChange gets called when I use Audio_SetRadioStation, or when I change my radio by default (scrolling mmb)
Reply

And Audio_OnRadioStationChange doesnt gets called when I scroll MMB and when Audio_SetRadioStation is 0?
Reply

I have a problem with this plugin!
At the time of reproducing the sound works fine, but when you have to pause or stop the song does not work!
I must be wrong?
Help!
Reply

In 0.4 there was an option in the configuration to play the music outside of GTA aswell. Now it's gone. Do I have to look into 0.4 and readd it to the conf or did you remove this function?
Reply


Forum Jump:


Users browsing this thread: 5 Guest(s)