#AudioPlayerApi

1165 messages · Page 2 of 2 (latest)

green igloo
#

stream of data

clear spoke
#

what dataType is that?

#

is it in bytes?

green igloo
#

yeah

clear spoke
#

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

signal cairn
#

@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

timber prawn
#

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.

signal cairn
#

Do you mean just load a file?
AudioClipStorage.LoadClip(“fullDirPath/example.ogg”, “example”);

signal cairn
green igloo
#
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

green igloo
clear spoke
#

now we can livestream video and sound crazy

green igloo
#

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

clear spoke
#

is ffmpeg embedable into plugin?

green igloo
#

it needs to be installed somewhere afaik not sure if I can embed it

clear spoke
#

how did you use it?

#

as nugget?

green igloo
#

I just starting new process in plugin

#

and just runs ffmpeg

clear spoke
#

most servers won't have ffmpeg though

green igloo
#

I will try embeding it

#

on windows its easier but linux idk

chrome ruin
green igloo
#

I still need to have ffmpeg binaries somewhere

#

then audioplayerapi dll will increase size af

#

I can make server download it but yeah

clear spoke
#

or just leave it as it is rn

green igloo
#

seems its working

#

also joined server

chrome ruin
#

can you test if it works on linux?

green igloo
#

its on linux server afaik

#

pelican/ptero

chrome ruin
#

Dang, I’ll have to look into video and audio processing again 😭

Straight back to hell I go

green igloo
#
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!"

mellow goblet
#

btw @green igloo any chance we can get a nuget package? last time i looked i couldnt see one

green igloo
#

Hmm

#

I can make nuget for devs yeah

signal cairn
#

SpotifyBoombox is finally possible omfg

timber prawn
mellow goblet
timber prawn
green igloo
timber prawn
green igloo
#

any errorrs in console?

#

because I had this on server and it worked fine

timber prawn
green igloo
#

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

chrome ruin
green igloo
#

not sure why its doing it while nvorbis is still old

timber prawn
#

In the code, I don’t see any error message!

mint arrow
#

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

chrome ruin
signal cairn
#

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 😭

signal cairn
green igloo
#

breaking changes? I didnt remove or change stuff in case of old version

#

I just added new methods

chrome ruin
signal cairn
green igloo
#

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

untold crag
#

@green igloo sorry for the ping do you know how to fix this error?

chrome ruin
#

you dont have the right version of NVorbis? idk

untold crag
#

I solved it by putting back old dependencies

raw jolt
#

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.

wild schooner
#

OMG

green igloo
#
1.1.2
  • Fixed Method not found: int NVorbis.VorbisReader.ReadSamples(System.Span`1)
clear spoke
#

@green igloo will addClip play from all speakers?

chrome ruin
#

All the AudioPlayers speakers, yes

#

It makes it good for playing the same audio everywhere

#

(Like in all the scp pedestals or something)

pale girder
#

Yes, thanks to that feature, I once made a music plugin for elevators and all speakers were connected to a single player.

clear spoke
#

so I need to create more

chrome ruin
#

if you have multiple songs playing or something, yes

clear spoke
#

I'll create wrapper above that then

chrome ruin
#

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

sharp tusk
#

@teal trout

clear spoke
teal trout
#

where is this plugin dll ?

clear spoke
#

the cost of embedding

clear spoke
green igloo
chrome ruin
#

ye

#

it's pretty convenient ngl when you gotta move audio files between servers n stuff

clear spoke
clear spoke
#

gives goosebumps

clear spoke
chrome ruin
#

as well as a custom method

clear spoke
green igloo
chrome ruin
#

You should add one for streams and float[] too then

green igloo
#

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

raw jolt
#

Can you add a global sound without a speaker so that everyone can hear it?

green igloo
#

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

clear spoke
mellow goblet
#

opposite if on the right side ofc

clear spoke
#

that wasn't happening for me

timber prawn
#

@green igloo
Can I make it quieter?
I need it because everything got too loud after 14.1.4

chrome ruin
#

Just change the volume of the speakers smh

signal cairn
#

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

night kettle
#

That's your average user.

clear spoke
#

@green igloo 2 questions

  • Are you still updating this?
  • Could you make nuget package for this?
green igloo
#

After work I will Look into it

clear spoke
#

thank you

green igloo
fallow fable
serene badge
#

@green igloo do you know if it can be used to play audio from base game speakeras that are already spawned

serene badge
serene badge
ashen geyser
#

Where should I put the sound files if I don't have a plugin config folder?

hearty crest
#

@green igloo where ı put sound files

dry mesa
hearty crest
#

okay

dry mesa
hearty crest
#

yes pls

dry mesa
#

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

hearty crest
#

😄

#

thx

dry mesa
#

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

limber holly
#

Is this project still supported? Or should I switch to #audioplayer?

clear spoke
limber holly
clear spoke
limber holly
#

I just can't understand, if this #1319679574707277844 exists, then why does this #audioplayer exist?

mellow goblet
#

audioplayerapi was made when speakertoys were added

#

personally i prefer secretlabnaudio but that's just me

untold heath
#

Does this still work?

untold heath
green igloo
#

Idk how my thing could break that fast lol

frank zodiac
#

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❤️‍🔥!
chrome ruin
#

they're going to be inside the global namespace then, so you can reference them like:

global::AudioClipStorage or global::AudioPlayer