[Plugin] Audio Plugin

It will be enough to make Audio_CreateTCPServer return the value, 1 - success, 0 - port in use.
And if it's in use, just create TCP Server in some seconds using a timer.
I hope it's not hard to do this.
Reply

Quote:
Originally Posted by mprofitt
[16:35:52] *** Audio Plugin: Started TCP server on port 6666
[16:35:52] *** Audio Plugin: Error binding socket: Address already in use

I am getting this error if I stop the sever and restart it to quickly, ie. game mode restart.

It take 2 game mode restarts for the port binding to work or manually shut down the server for 30 seconds and restart it.

I am using _v34.

I am using Ubuntu, any ideas pf what can be causing my issue?

Thanks,
Make sure you have Audio_DestroyTCPServer(); OnGameExit.
Reply

Quote:
Originally Posted by cyber_punk
Quote:
Originally Posted by mprofitt
[16:35:52] *** Audio Plugin: Started TCP server on port 6666
[16:35:52] *** Audio Plugin: Error binding socket: Address already in use

I am getting this error if I stop the sever and restart it to quickly, ie. game mode restart.

It take 2 game mode restarts for the port binding to work or manually shut down the server for 30 seconds and restart it.

I am using _v34.

I am using Ubuntu, any ideas pf what can be causing my issue?

Thanks,
Make sure you have Audio_DestroyTCPServer(); OnGameExit.
Audio_DestroyTCPServer(); is where it belongs.
Reply

Quote:
Originally Posted by CrαcK
It will be enough to make Audio_CreateTCPServer return the value, 1 - success, 0 - port in use.
And if it's in use, just create TCP Server in some seconds using a timer.
I hope it's not hard to do this.
You have a very good idea. I verified the Audio_CreateTCPServer returns a value of 1 whether it succeeded or failed.
Reply

This is very good, however, I want *.MID files to be supported
Reply

Quote:
Originally Posted by mprofitt
[16:35:52] *** Audio Plugin: Started TCP server on port 6666
[16:35:52] *** Audio Plugin: Error binding socket: Address already in use

I am getting this error if I stop the sever and restart it to quickly, ie. game mode restart.

It take 2 game mode restarts for the port binding to work or manually shut down the server for 30 seconds and restart it.

I am using _v34.

I am using Ubuntu, any ideas pf what can be causing my issue?

Thanks,
Looks the the socket is wasting time in the TIME_WAIT state for a graceful closure of the socket. I timed it at about 60 seconds. Think we can by pass the twice the Maximum Segment Lifetime?

Reply

You can download audio.inc ask?
Reply

mprofitt: In my development version, Audio_CreateTCPServer returns 1 on success and 0 on failure. I can probably fix the problem with the socket not closing on Linux, but I need to take a better look at it. For now, just use a timer.

I have also done some work to remove many of the imposed limits in the plugin (files, sequences, handle IDs, and a few other things), but this will probably require a client update—however, the general stability should be improved as well, so it is recommended to update anyway. I might add a few new features to this version too, such as in-game radio station control and native 3D playback, but again, I need to do some more research when I find time. Feedback is welcome if anyone is interested.
Reply

New windows version works incredibly strange:
Код:
[14:44:18] [join] DeathChrist5000 has joined the server (4:127.0.0.1)
[14:44:20] *** Audio Plugin: Incoming connection from 127.0.0.1:2762
[14:44:30] *** Audio Plugin: (ID: 2089968684) has disconnected
Reply

Quote:
Originally Posted by CrαcK
New windows version works incredibly strange:
Код:
[14:44:18] [join] DeathChrist5000 has joined the server (4:127.0.0.1)
[14:44:20] *** Audio Plugin: Incoming connection from 127.0.0.1:2762
[14:44:30] *** Audio Plugin: (ID: 2089968684) has disconnected
Gappy also had this problem with the new version. I told him to report it here, guess he didn't. So I will report it for him :P when I sent him my version (the second one you had posted) he was able to connect fine.
Reply

It so happened that we've tested the plugin with 500 players online yesterday
And.. well, it fully loaded our machine, especially when we've been forced to close the server and then 500 players tried to reconnect. It was killing the CPU
Besides a bit of CPU inefficiency it does it's job quite well (serverside).

Regards.
Reply

CrαcK/cyber_punk: Sorry about that—I guess I didn't test the Windows version thoroughly enough. A new link is available in the first post.

Wicko: That's good to hear. 500 active players is definitely a testament to the plugin's stability. Out of curiosity, how many of those do you suspect were connected to the TCP server? About your CPU usage, I'm not really sure what would be causing it other than maybe multiple file transfers. While I was fixing the Windows version, I also moved the CRC and file size checks to the thread that sets the audio pack, so those are now only performed once (as they should have been). That might make some difference, so try it out.
Reply

How to play the sound ingame huh?
Reply

i tried somethings work and others don't and your tutorial doesn't help much either could you please put some more explanation about it

Thankls
Reply

Everything you need to know is in the first two posts.

Wicko: I think I might know why some people can't download files properly. Is it possibly because they have Unicode characters in their directory paths? In any case, I've just added full Unicode support to the client-side plugin, so please direct them to the newest installer if you can (this version self-installs the .NET Framework as well). If that doesn't work, then I'm really not sure what else could be wrong!
Reply

Its not in these posts :[
Reply

Quote:

Wicko: I think I might know why some people can't download files properly. Is it possibly because they have Unicode characters in their directory paths? In any case, I've just added full Unicode support to the client-side plugin, so please direct them to the newest installer if you can (this version self-installs the .NET Framework as well). If that doesn't work, then I'm really not sure what else could be wrong!

Great, I've just done that and there's already one person saying it started working. I'll let you know about others when they post
Thanks!
Reply

Unfortunately, the server froze again yesterday. Basically the same circumstances. There were 233 players online at the time.
The new client, however, works properly for everyone with 1/4 problem
Reply

Well, that is unfortunate. I don't really know what else could be wrong, especially if it was running fine with 500 players connected (the high CPU usage notwithstanding). I assume it had been running for several days, though, before it finally froze? Also, how long ago did you update (if you updated at all) to the version that I put up after I fixed the Windows bug?

It's good to hear that the client works properly now. I suspected that Unicode characters might have been the problem.
Reply

unfortunately, after a few minutes beeing afk, (usually 20 ore more) the client doesn't play music anymore
So I must restart the game or the Server to hear the tracks ...

After a server restart, my script says, that my audio client isn't connected (if(Audio_IsClientConnected(playerid))



(I'm german, sorry for bad english )
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)