Import and play custom sound/music


#1

Hello everyone,

i want to play a custom sound in the game, then i look a bit in the forum and i found a guy who using NUI for play the sound through the html interface.

But i want to know if it’s possible to import custom sound with the stream file (like for image or font) for play it directly in the game.

what i try is : i convert my sound file in ogg , put it in my stream folder , et try to play music but i didn’t ear it.

So i wonder if someone know how to do it or if it’s possible at least.


#2

My friend did you find a way to do that?
I just found this native, but I don’t know how work and how to use… maybye doesn’t work for custom audio files.

 PLAY_SOUND #

// 0x7FF4944CC209192D 0xB6E1917F
// PlaySound
void PLAY_SOUND(Player soundId, char* audioName, char* audioRef, BOOL p3, Any p4, BOOL p5);

All found occurrences in b617d, sorted alphabetically and identical lines removed: pastebin.com/A8Ny8AHZ

I also tryed Naudio but I can’t listen anyting using that:

         VorbisWaveReader _reader;
                NAudio.Wave.WaveOut _waveOut;

                _reader = new VorbisWaveReader("test.ogg");

                _waveOut = new NAudio.Wave.WaveOut();
                _waveOut.Init(_reader);
                _waveOut.Play();