Giter Site home page Giter Site logo

Playing over Discord about lavaplayer-fork HOT 13 CLOSED

walkyst avatar walkyst commented on July 30, 2024
Playing over Discord

from lavaplayer-fork.

Comments (13)

HagarJNode avatar HagarJNode commented on July 30, 2024

If any help, the mod file format is PCM signed. 48.000 Hz, 16 bit, 2 channels, 4 bytes/frame, LE

from lavaplayer-fork.

HagarJNode avatar HagarJNode commented on July 30, 2024

Hmm... sending the 2 channels to each own array and using the process(short[][], pos. length) made the sound better, but missing a lot of samples. For now I have taken a shortcut, as the JavaMod code had an export to wave files, which I used for a temp file and then just used the WavFileLoader with a LocalSeekableInputStream.

That done, I still would like some kind of document that describe how to create a new input provider/track and the requirements to the output stream, that could be nice.

from lavaplayer-fork.

DxsSucuk avatar DxsSucuk commented on July 30, 2024

What are you exactly trying to do? Do you want to use JavaMod to play the music with a Bot into a channel or the reveres?

from lavaplayer-fork.

HagarJNode avatar HagarJNode commented on July 30, 2024

What are you exactly trying to do? Do you want to use JavaMod to play the music with a Bot into a channel or the reveres?

Making Lavaplayer able to play mod files - like it can play wav files, using parts of JavaMod as the "engine", and play into a Discord channel.

from lavaplayer-fork.

Walkyst avatar Walkyst commented on July 30, 2024

What exactly mod files you mean, like what extensions or you mean .mod extension? Also send file example please

from lavaplayer-fork.

HagarJNode avatar HagarJNode commented on July 30, 2024

What exactly mod files you mean, like what extensions or you mean .mod extension? Also send file example please

Mod is a file format for some music made on the Amiga (https://en.wikipedia.org/wiki/MOD_(file_format)) - so, yes, like the .mod extension.

What I had, that worked, was like this:

Discord upload of file -> Lavaplayer -> JavaMod -> SourceDataLine (on my local running machine)

Not working:

Discord upload of file -> Lavaplayer -> JavaMod -> Lavaplayer -> Discord voice channel

What I ended up with:

Discord upload of file -> Lavaplayer -> JavaMod -> wav export -> WavTrackProvider -> Lavaplayer -> Discord voice channel

I'm failing to see why I couldn't send the data direct from my JavaMod integration, as if there is something, or some format, that it should be converted into in order to work.

from lavaplayer-fork.

Walkyst avatar Walkyst commented on July 30, 2024

I'm failing to see why I couldn't send the data direct from my JavaMod integration, as if there is something, or some format, that it should be converted into in order to work.

Discord voice support only OPUS frames, not sure JavaMod support it

Also I think it's possible completely remove JavaMod from this chain and pass files directly to Lavaplayer -> Voice channel, this just requires .mod decoder and you did not send example of file

from lavaplayer-fork.

HagarJNode avatar HagarJNode commented on July 30, 2024

I thought Lavaplayer convert all data sent to Discord by default into OPUS - but it sounds like I have to it, is that right?
I'm using the JavaMod as a decoder, was what I ment with "engine", sorry for that.

And, yes, I didn't send any example file. I cleaned up my code and committed it, but I could go back into history of my files and find it.

from lavaplayer-fork.

Walkyst avatar Walkyst commented on July 30, 2024

I thought Lavaplayer convert all data sent to Discord by default into OPUS - but it sounds like I have to it, is that right?

You don't need todo anything for that, LP is handling this, discord simply not accepting anything else

I'm using the JavaMod as a decoder, was what I ment with "engine", sorry for that.

I'm mean sure there's way don't use JavaMod at all and process audio completely in LP, i will try implement that, but can't guarantee anything

from lavaplayer-fork.

HagarJNode avatar HagarJNode commented on July 30, 2024

I created a Github repository that I invitated you into. Note that JavaMod is LGPL v2.

from lavaplayer-fork.

Walkyst avatar Walkyst commented on July 30, 2024

Just tested some .mod files and it worked well with XM extension, you just need register source manager HttpAudioSourceManager(MediaContainerRegistry.extended(new XmContainerProbe())) with this extension

from lavaplayer-fork.

HagarJNode avatar HagarJNode commented on July 30, 2024

Going to test it right away

from lavaplayer-fork.

HagarJNode avatar HagarJNode commented on July 30, 2024

D'ouh! It sure plays... had to update my LavaPlayer version, but it works... Looks like I could have saved a lot of time.
Thanks Walkyst - I'll close this issue.

from lavaplayer-fork.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.