#AudioPlayerApi
1165 messages · Page 2 of 2 (latest)
yeah
for the sake of simplicity you could implement static method in AudioClipData that would create automatically new object out of iself when inputing bytes that would be read by the vorbis
then you could LoadClip(string name, AudioData data) which would simply be added into the dictionary
the name could be automatically taken by AudioData
but AudioClipData is public with the storage also having public static dictionary, so I could implement it myself
@green igloo is the ClipPlayback.Loop functionality complex at all? I was thinking about forking and adding an event that gets invoked when the playback ends. That way it’s easy to start a new clip when the current clip ends or whatever
How can it know where the audio file is?
I have a separate folder for it, so I’d like to know how to specify that.
Do you mean just load a file?
AudioClipStorage.LoadClip(“fullDirPath/example.ogg”, “example”);
What I do in my code is make a helper function that takes in my plugin’s configurable audio directory, and a name. Then I do the above code but like LoadClip(Path.Combine(audioDir, name + “.ogg”), name);
thx
1.1.0
Added:
- AudioPlayer.AddLiveStream(url, volume, name);
- AudioClipStorage.LoadClip(byte[] rawData, string name);
Fixed:
- Server lagging will no longer make playback slower. ( tps/fps will not affect playback speed )
FFMPEG is required to be installed on machine to use AudioPlayer.AddLiveStream
AudioClipStorage.LoadClip(byte[] rawData, ...) can be used to load ogg files directly from plugin by using Project Resources
wtf
you are insane
thats example of live stream working
now we can livestream video and sound crazy
afaik anything its possible to add when its just ffmpeg doing it
ffmpeg pipes data into plugin mostly
soo you can play idk rtsp/ rtmp streams or anything
is ffmpeg embedable into plugin?
it needs to be installed somewhere afaik not sure if I can embed it
most servers won't have ffmpeg though
dang I was hoping you were embedding it or something, I had a lot of trouble trying to integrate ffmpeg into my plugin even on windows, but linux is just a lost cause at that point
I still need to have ffmpeg binaries somewhere
then audioplayerapi dll will increase size af
I can make server download it but yeah
or just leave it as it is rn
Added a thing where if ffmpeg is missing it will download it
seems its working
also joined server
can you test if it works on linux?
Dang, I’ll have to look into video and audio processing again 😭
Straight back to hell I go
1.1.1
Added:
- Auto installer of ffmpeg
If live stream is not working check for logs like "FFmpeg /home/container/ffmpeg/ffmpeg-master-latest-linux64-gpl/bin/ffmpeg access denied, please check permissions on file!"
btw @green igloo any chance we can get a nuget package? last time i looked i couldnt see one
this is so peak it's unreal
SpotifyBoombox is finally possible omfg
This version doesn’t work for me, please fix it.
be more specific about what doesn't work and maybe they can fix it
sure sure
Whatever, I'll make my own version. Your answer didn’t help me.
its anything playing or what?
Before (the old version) it worked, but the new one doesn’t play any sound, instead it kicks the player.
no
if it kicks then something is throwing network errors
ngl please check if you do have any other plugins which do use AudioPlayerAPI
high chance that some other plugins didnt just rebuild to new version
if you have to do this then shouldnt the version be 2.0.0 cuz breaking change?
not sure why its doing it while nvorbis is still old
Is there something wrong with the new version, or should it work?
In the code, I don’t see any error message!
i have a conflict between audioplayerapi and scpproximitychat my plugin plays music to a player when they meet an scp using audioplayerapi at the same time scpproximitychat is running on the server when both plugins are active scp voices are heard globally instead of proximity i want to understand why this happens and how to make both work together
the issue is in SCPProximityChat, it doesn't check for existing speakers and such. I forked its repo and made some modifications, but my version is out of date I think
SCPProximityChat breaks all of my audioplayerapi plugins too, I don’t use it but it’s related to many of the bug reports I get 😭
@green igloo id love to know the answer to this as well.. is 2.0 not backwards compatible?
breaking changes? I didnt remove or change stuff in case of old version
I just added new methods
Then this is unnecessary
Good to know, yeah it’s probably fine then. That other guy’s issue is probably just issue with other plugins (maybe) lol
I just joined and its working fine I cant understand why its not working only issue please make sure you have all dependencies installed from zip
@green igloo sorry for the ping do you know how to fix this error?
you dont have the right version of NVorbis? idk
It's the latest,I downloaded the latest version of AudioPlayerApi
I solved it by putting back old dependencies
I got that error, but I solved it by removing all the dependencies of the audioplayerapi from dependencies and leaving only the plugin, AudioPlayerApi, in plugins.
Ok thx
OMG
1.1.2
- Fixed
Method not found: int NVorbis.VorbisReader.ReadSamples(System.Span`1)
@green igloo will addClip play from all speakers?
All the AudioPlayers speakers, yes
It makes it good for playing the same audio everywhere
(Like in all the scp pedestals or something)
Yes, thanks to that feature, I once made a music plugin for elevators and all speakers were connected to a single player.
if you have multiple songs playing or something, yes
I thought speakers would be like multiple ways of playing sounds and not one sound
I'll create wrapper above that then
speakers are just AdminToy that plays audio from specifics channels (which come from network messages sent via NetworkMessage::SendToAll(), etc...)
AudioPlayerAPI can mix clips though (like 2 songs at once out of the same speaker)
but if you wanted to toggle songs or something per player, you could use 2 players on the same channel or something with seperate clips, and targeting their correct players
@teal trout
I am using AudioPlayer more like GameObjectPlayer playing it on schematics
where is this plugin dll ?
the pro of being able to add new types of audio with libraries and embed further
Did you embed audio files?
ye
it's pretty convenient ngl when you gotta move audio files between servers n stuff
the whole plugin
tbh I tried to, but can't find way around it in Rider
legit all it took
as well as a custom method
thank you
I added way to add audio files from byte array
You should add one for streams and float[] too then
anyone would be interested about auto ducking like if you add new clip with idk some priority it will be louder than others
hmm maybe also add option to plugins be able to add transmitter as player
like for example talk thru all speakers of specific audioplayer
Can you add a global sound without a speaker so that everyone can hear it?
you need to have a speaker
you can set speaker to be global tho
just make IsSpatial false + set min+max distance to idk 9999
what is isSpatial used for?
if you are on the left side of the speaker, the audio will play on your right (if you have stereo audio system)
opposite if on the right side ofc
that wasn't happening for me
@green igloo
Can I make it quieter?
I need it because everything got too loud after 14.1.4
Just change the volume of the speakers smh
Not to be a dick but some of these questions seem like people just haven’t even looked at the speaker constructor or add speaker method lol
That's your average user.
@green igloo 2 questions
- Are you still updating this?
- Could you make nuget package for this?
I could do nuget package sure
After work I will Look into it
thank you
Available on nuget https://www.nuget.org/packages/AudioPlayerApi
good wooooooooooooooooorrrrrrrrrrkkk
@green igloo do you know if it can be used to play audio from base game speakeras that are already spawned
which base game speakers
Idk all of them e.g?
So like when you have a speaker on the wall it would play sound
Where should I put the sound files if I don't have a plugin config folder?
@green igloo where ı put sound files
There is no specific place to put them, just create a folder name it smt and navigate to it when registering the sound
okay
i can send you an example from my code if you dont understand what i mean
yes pls
ignore checking for existence of that folder lol
thing you are looking for in my example is audio directory, which you can do by combining the path of plugin (or wherever you want to have it) and the name of the folder
and ig you can make smt from here
@hearty crest
and if you are lazy you can just loop thru every file in your directory and cut the .ogg
btw looking at the tutorial on github can help
this is the same thing but i have made a string with the path
Is this project still supported? Or should I switch to #audioplayer?
Test it it it works, if not contact Killer
It works. However, there may be another version.
another version of SCP:SL?
I just can't understand, if this #1319679574707277844 exists, then why does this #audioplayer exist?
audioplayer existed long before audioplayerapi
audioplayerapi was made when speakertoys were added
personally i prefer secretlabnaudio but that's just me
Does this still work?
Yess it works I tested it just right now
Idk how my thing could break that fast lol
Hi everyone, I have a question:
I need to use the code from the AudioPlayerApi files, specifically the code from the "AudioClipStorage" and "AudioPlayer" files, but they're missing the namespaces. I tried to fix this with DnSpy, but it won't let me.
I need to use the code from a specific plugin file, but it's missing the namespace. 😔
- Thanks for reading❤️🔥!
they're going to be inside the global namespace then, so you can reference them like:
global::AudioClipStorage or global::AudioPlayer