Jump to content

PLS to Sound3D


.:HyPeX:.

Recommended Posts

Posted

Hey guys, how can i create a PlaySound3D with any Stream radio? i know direct link like IP is supported and works but.. it doenst display all the stuff like author, etc.

i wanted to make this PLS work:

  
[playlist] 
NumberOfEntries=8 
File1=http://pub5.di.fm:80/di_chilloutdreams 
Title1=Digitally Imported - Chillout Dreams 
Length1=-1 
File2=http://pub3.di.fm:80/di_chilloutdreams 
Title2=Digitally Imported - Chillout Dreams 
Length2=-1 
File3=http://pub8.di.fm:80/di_chilloutdreams 
Title3=Digitally Imported - Chillout Dreams 
Length3=-1 
File4=http://pub1.di.fm:80/di_chilloutdreams 
Title4=Digitally Imported - Chillout Dreams 
Length4=-1 
File5=http://pub7.di.fm:80/di_chilloutdreams 
Title5=Digitally Imported - Chillout Dreams 
Length5=-1 
File6=http://pub6.di.fm:80/di_chilloutdreams 
Title6=Digitally Imported - Chillout Dreams 
Length6=-1 
File7=http://pub2.di.fm:80/di_chilloutdreams 
Title7=Digitally Imported - Chillout Dreams 
Length7=-1 
File8=http://pub4.di.fm:80/di_chilloutdreams 
Title8=Digitally Imported - Chillout Dreams 
Length8=-1 
Version=2 

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

Not sure what you're asking for, but you could take a look at the code of my internet radio, link's in the signature.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted

It outputs for me correctly, I used:

`onClientSoundChangedMeta`

with this url for playSound3D: "http://pub5.di.fm:80/di_chilloutdreams"

Sometimes I dream about cheese

Posted
It outputs for me correctly, I used:

`onClientSoundChangedMeta`

with this url for playSound3D: "http://pub5.di.fm:80/di_chilloutdreams"

Yeah, but it says the radio name wich is chillout dreams and just that, nothing else.

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

Only some internet radios support 'dynamic' metas. Such as current artist and song, so don't expect each and every one to have it.

Most "professional" ones have, though. You'll just have to try your way to see what radios use them or not. You do not need any API, only getSoundMetaTags.

If I help you in a thread and you need further assistance, please don't PM me - use the thread you created instead. This way everyone on the forum can take advantage of it.

Posted
Only some internet radios support 'dynamic' metas. Such as current artist and song, so don't expect each and every one to have it.

Most "professional" ones have, though. You'll just have to try your way to see what radios use them or not. You do not need any API, only getSoundMetaTags.

I'm using visualiser resource as core, so i know whenever its working or not :/

My ingame nick is ~HyPeX~

BF3 Gamemode Progress: ~30% - Currently working on AI & MapManager

gKhdyRJ.png

Posted

You indeed don't need an api, LOL...

Well, here's my code (ofcourse I used a costum drawing system)

  
  
addEventHandler("onClientSoundStream", root, 
    function(success, length, streamName) 
        if streamName then 
            local veh = getPedOccupiedVehicle(getLocalPlayer()) 
            if veh then 
                if radioSound[veh] == nil then return end 
                if radioSound[veh].soundElement == source then 
                    outputChatBox("#FFFFFFRadio stream: #22AA22 " .. streamName, 0, 0, 0, true) 
                end 
            end 
        end 
    end 
) 
addEventHandler("onClientSoundChangedMeta", root, 
    function(streamTitle) 
        if streamTitle then 
            local veh = getPedOccupiedVehicle(getLocalPlayer()) 
            if veh then 
                if radioSound[veh] == nil then return end 
                if radioSound[veh].soundElement == source then -- as you can see here, we check if the sound source = on the vehicle element 
                    outputChatBox("#FFFFFFRadio meta: #AA2222 " .. streamTitle, 0, 0, 0, true) -- this was outputting all the songs properly. 
--[[ 
message1 = streamTitle 
showRadio(false,message1,1) 
]]-- 
                end 
            end 
        end 
    end 
) 

Sometimes I dream about cheese

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...