[Plugin] Audio Plugin
#81

True—I had not considered LAN servers. I love lossless music myself, but downloading large files over the Internet with this client is not really practical. There are a number of other input plugins besides FLAC and APE that BASS can use, including those that extend support to MIDI, SPX, MPC, WV, AC3, AAC, ALAC, TTA, OFR, and ADX formats. There is also a plugin that allows input plugins designed for Winamp to be used with BASS, which is quite interesting.

This is something I can probably add quickly. Thanks for the idea.
Reply
#82

Very nice job! The 0.2 version have some very powerfull natives, impressive that you managed to set up such a good organisation of your system in such a short time.

I was also glad to hear that you decided to make support for the gta sa sound banks, this will instantly (without any downloads) give access to a HUGE lib of gta sa stock sounds. Initially i thought it would be a problem playing 3d sounds from the banks as i read in your docs that 3d is not supported for ogg files, but with saat you can deflait to .wav for example so all good here?

I dont know if you plan to extract the banks to sound files (soundpack) and locally stream them or do it on the fly in mem, just have to test how much resources it uses - maybe have an option to do both.

Now a little native request - for example in the banks there is a sfxscript folder (cant remember exact name) where small sounds can be dynamic put together to give a dynamic sequence (playlist). For example the pd radio uses this as you proberly remember from single player:
"Respond to a "1017" "in" "east" "idlewood", suspect last seen in a "black" "four door". Suspect is discribed as a "black" "male", "medium build".

This could offcourse be done with your natives allready but it would sound kind of strange because the files would not be instantly played back in sequence without delay because of multible net packages that would be sent between client and server for each sound. So having the possibility to make a sequence would be very usefull. Something like:

native Audio_CreateSequence();//returns Sequence id
native Audio_AddSoundToSequence(sequenceid,audioid);
native Audio_PlaySequence(clientid, sequenceid, handleid, loop, enable3D);

These would add support for the client to play a sequence without any delay that will be very powerfull in game events, not only the sound banks but you could create your own dynamic soundstrings in your packs and it should not clash with your existing system because its so well organized with handleids. Again great work on this and i will start some tests soon with 25-30 people on a server.

EDIT: You also need Audio_DeleteSequence(sequenceid); to clean up mem for temporary Sequence lists that are only used once.
Reply
#83

The second version is even more amazing then the first one
I like internet streaming the most

@hansen111: Yeah it would be nice and apreaciated if Incognito could add that.
Reply
#84

Its so funny, the community talks about this plug in for months and one week, 3 different ones made by 3 different people are all released :P
to everyone's sound plug-ins: Grate Job!
Reply
#85

Quote:
Originally Posted by <__Ǝthan__>
Its so funny, the community talks about this plug in for months and one week, 3 different ones made by 3 different people are all released :P
to everyone's sound plug-ins: Grate Job!
There's a 3rd one?
Reply
#86

Quote:
Originally Posted by Lavamike
Quote:
Originally Posted by <__Ǝthan__>
Its so funny, the community talks about this plug in for months and one week, 3 different ones made by 3 different people are all released :P
to everyone's sound plug-ins: Grate Job!
There's a 3rd one?
Someone didn't pay attention in math class
Reply
#87

Great work, v0.2 added just the features missing in 0.1.

Keep it up
Reply
#88

Good job.
Soon I'm going to install this plugin on our public server, that's why I want to ask, is it stable now(no crashes e.t.c.)?
P.S. *nix server
Reply
#89

Doesn't work for me, never transfers files :S.
Reply
#90

Quote:
Originally Posted by zallomallo
Doesn't work for me, never transfers files :S.
Did you use this:
Audio_SetPack("packname", 1);
Reply
#91

can you support .pls formats i need it for a few webaudiostreams
Reply
#92

I cant compile it, someone have a idea (under Ubuntu)?
Quote:

gcc -c -O3 -w -D LINUX -I ./SDK/amx/ ./SDK/amx/*.c
g++ -c -O3 -w -D LINUX -I ./SDK/amx/ ./SDK/*.cpp
g++ -c -O3 -w -D LINUX -I ./SDK/amx/ *.cpp
audio.cpp: In function вint audio_listen(int)в:
audio.cpp:149: erreur: no matching function for call to вboost::thread::thread(int (&)(int), int&)в
/usr/include/boost/thread/pthread/thread.hpp:160: note: candidats sont: boost::thread::thread(boost::detail::thread_move_t <boost::thread>)
/usr/include/boost/thread/pthread/thread.hpp:144: note: boost::thread::thread()
/usr/include/boost/thread/pthread/thread.hpp:139: note: boost::thread::thread(boost::detail::thread_data_p tr)
/usr/include/boost/thread/pthread/thread.hpp:112: note: boost::thread::thread(boost::thread&)
audio.cpp:150: erreur: no matching function for call to вboost::thread::thread(void (&)(int), int&)в
/usr/include/boost/thread/pthread/thread.hpp:160: note: candidats sont: boost::thread::thread(boost::detail::thread_move_t <boost::thread>)
/usr/include/boost/thread/pthread/thread.hpp:144: note: boost::thread::thread()
/usr/include/boost/thread/pthread/thread.hpp:139: note: boost::thread::thread(boost::detail::thread_data_p tr)
/usr/include/boost/thread/pthread/thread.hpp:112: note: boost::thread::thread(boost::thread&)
audio.cpp: In function вint audio_receive(int)в:
audio.cpp:186: erreur: no matching function for call to вboost::thread::thread(void (&)(int), int&)в
/usr/include/boost/thread/pthread/thread.hpp:160: note: candidats sont: boost::thread::thread(boost::detail::thread_move_t <boost::thread>)
/usr/include/boost/thread/pthread/thread.hpp:144: note: boost::thread::thread()
/usr/include/boost/thread/pthread/thread.hpp:139: note: boost::thread::thread(boost::detail::thread_data_p tr)
/usr/include/boost/thread/pthread/thread.hpp:112: note: boost::thread::thread(boost::thread&)
main.cpp: In function вcell n_audio_createtcpserver(AMX*, cell*)в:
main.cpp:75: erreur: no matching function for call to вboost::thread::thread(int (&)(int), int&)в
/usr/include/boost/thread/pthread/thread.hpp:160: note: candidats sont: boost::thread::thread(boost::detail::thread_move_t <boost::thread>)
/usr/include/boost/thread/pthread/thread.hpp:144: note: boost::thread::thread()
/usr/include/boost/thread/pthread/thread.hpp:139: note: boost::thread::thread(boost::detail::thread_data_p tr)
/usr/include/boost/thread/pthread/thread.hpp:112: note: boost::thread::thread(boost::thread&)
main.cpp: In function вcell n_audio_setpack(AMX*, cell*)в:
main.cpp:138: erreur: no matching function for call to вboost::thread::thread(int (&)(char*), char*&)в
/usr/include/boost/thread/pthread/thread.hpp:160: note: candidats sont: boost::thread::thread(boost::detail::thread_move_t <boost::thread>)
/usr/include/boost/thread/pthread/thread.hpp:144: note: boost::thread::thread()
/usr/include/boost/thread/pthread/thread.hpp:139: note: boost::thread::thread(boost::detail::thread_data_p tr)
/usr/include/boost/thread/pthread/thread.hpp:112: note: boost::thread::thread(boost::thread&)
main.cpp: In function вcell n_audio_transferpack(AMX*, cell*)в:
main.cpp:983: erreur: no matching function for call to вboost::thread::thread(int (&)(int, char*), int&, char*&)в
/usr/include/boost/thread/pthread/thread.hpp:160: note: candidats sont: boost::thread::thread(boost::detail::thread_move_t <boost::thread>)
/usr/include/boost/thread/pthread/thread.hpp:144: note: boost::thread::thread()
/usr/include/boost/thread/pthread/thread.hpp:139: note: boost::thread::thread(boost::detail::thread_data_p tr)
/usr/include/boost/thread/pthread/thread.hpp:112: note: boost::thread::thread(boost::thread&)
make: *** [all] Erreur 1

Reply
#93

Sorry for the late replies.

I tested some plugins a few days ago, and they appear to work fine. The next version will support several new formats.

hansen111: Thank you for your compliments and suggestions.

I believe that forcing an audio stream to mono—and, subsequently, enabling 3D playback—is only supported for WAV and MP3/MP2/MP1 formats (that is, unless the audio stream is already encoded in mono—in which case, it should work fine). You will notice that if you set an EAX environment, radio stations in-game (which are, in fact, OGG Vorbis files) will not be affected, but sound effects (WAV files) will.

I have not yet developed a sensible system for playing back files in sound banks, although I have gotten the extraction process to fully work within the client. Since SAAT does not seem to support individual track extraction, however, the files will need to be extracted in bulk. I believe what I will do is simply add support for two keys in audio.ini that can be used in this way:

Code:
stream = K-DST
sfx = GENRL
Note that streams usually contain larger files, such as radio station tracks (they are all OGG Vorbis files), and SFX archives contain all of the sound effects used in-game (they are all WAV files). These can be placed under any audio pack section. They will be automatically mapped to audio IDs for ease of use and compatibility with Audio_Play.

Your sequence idea is also good would be quite useful. I will see about implementing it in the next release.

watkijkje and <__Ǝthan__>: Thank you.

CrαcK: I believe it is stable. It should not crash under any normal circumstances. In the next version, I will improve how strings are handled (I seem to have relied too heavily on character arrays, and, as anyone can tell you, buffer overflows are a major problem there, but I have taken several precautions to ensure that they do not happen). Security is something that needs to be taken very seriously in any client-server architecture. You are advised, of course, to use this software at your own risk, but I can tell you now that it is pretty safe.

Doerfler: PLS files are supported through the use of the Audio_PlayStreamed native.
Reply
#94

The plugin doesn't work without Net. Framework on a windows Dedicated server.
Is it possible to make it work without Net. Framework?
Cause I don't have access to install it.

Edit: http://forum.sa-mp.com/index.php?top...8704#msg688704
Reply
#95

I have tested Audio Client And plugin with a few peeps and its working perfectly, completely stable. It really brings a whole new perspective into samp, i see a bright future for this app. Thumbs up Incognito
Reply
#96

watkijkje: Sorry, this plugin was compiled with Microsoft Visual C++. You will need the .NET Framework if you want to run the plugin on Windows. Ask your server provider to install the .NET Framework for you, or try running the plugin on Linux.

hansen111: Thanks! The newest version is much more stable and secure, by the way, as I am now using vectors to store parsed C++ strings, which is what I really should have done in the first place. There should be zero possibility of crashes related to bad memory management (i.e., buffer overflows) now. Additionally, at some point in the very near future, I will complete implementation of sound bank extraction and playback. Unless I need to commit any subsequent bug fixes, the next version (which I suppose I will call v0.3) will probably be the final one.
Reply
#97

Sweet, if you include the natives to support sequence sound playlists (as described in previous post) i dont see any need for more versions as you pretty much covered it all (unless bugfixes is needed)
Reply
#98

I'm getting this error while compiling:
Код:
1>LINK : fatal error LNK1104: cannot open file 'libboost_thread-vc90-mt-1_39.lib'
I have placed the boost folder in: C:\Program Files\Microsoft Visual Studio 9.0\VC\include
Reply
#99

You only have the include files, apparently, and not the library files. You need to statically link the Boost thread library in order to compile the DLL.
Reply

Quote:
Originally Posted by Incognito
watkijkje: Sorry, this plugin was compiled with Microsoft Visual C++. You will need the .NET Framework if you want to run the plugin on Windows. Ask your server provider to install the .NET Framework for you, or try running the plugin on Linux.
I'm running it without .NET Framework now.
Just goto this location in the Solution Explorer: "Properties > C/C++ > Code Generation".
and change "Runtime Library to: Multi-threaded (/MT)"
(Not Multi-threaded (/MTd) DLL)
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)