Atton Posted November 8, 2013 Share Posted November 8, 2013 I am trying to make an internet radio file work for play sound. The Error is this: BASS ERROR 41 in LoadMedia path:F:\Program Files (x86)\MTA San Andreas 1.3\mods\deathmatch\resources\InternetRadio\Rfiles\BFusion.m3u Code function Bff () sound = playSound("Rfiles/BFusion.m3u") end addEventHandler("onClientGUIClick",B1b,Bff) Meta If someone knows how to fix this please let me know or post a solutions below. I have tried this with 2 internet radio files one being a pls. Link to comment
The Killer Posted November 8, 2013 Share Posted November 8, 2013 i think only mp3 work Link to comment
myonlake Posted November 8, 2013 Share Posted November 8, 2013 You cannot host the file locally. Find the IP address and port of the server and fetch their m3u file instead. @The Killer: No need to post on the Scripting forum if you "think" something works or doesn't. Link to comment
Atton Posted November 8, 2013 Author Share Posted November 8, 2013 You cannot host the file locally. Find the IP address and port of the server and fetch their m3u file instead.@The Killer: No need to post on the Scripting forum if you "think" something works or doesn't. So by any chance could you give me some code to correct this your help would be much appreciated. Link to comment
Dealman Posted November 8, 2013 Share Posted November 8, 2013 You cannot host the file locally. Find the IP address and port of the server and fetch their m3u file instead. I don't see why it wouldn't work, the end result is the same either way. The files contain the URL to the actual stream - that's how they work. So having the direct download to the file should not be necessary. Hence that I said shouldn't. If it does indeed require you to, that means streaming is very poorly supported within MTA. I haven't actually tried storing the files locally - but I can't see why they wouldn't work. Link to comment
Atton Posted November 8, 2013 Author Share Posted November 8, 2013 Still at a dead end. Link to comment
myonlake Posted November 8, 2013 Share Posted November 8, 2013 Indeed it only contains info regarding the stream and I've thought about the whole thing upsidedown yet I didn't quite get to any real results. My best guess is that the stream is either invalid, local, outdated or doesn't support that type. Is this your own radio or someone else's? If it's yours, which program do you use to stream it online? Icecast, Shoutcast, Wirecast..? Link to comment
Cadu12 Posted November 9, 2013 Share Posted November 9, 2013 BASS ERROR 41 - Unsupported file format. You have to use other format. As you can see wiki it saying: Note: The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT, S3M and PLS(e.g. Webstream). Link to comment
Atton Posted November 9, 2013 Author Share Posted November 9, 2013 BASS ERROR 41 - Unsupported file format.You have to use other format. As you can see wiki it saying: Note: The only supported audio formats are MP3, WAV, OGG, RIFF, MOD, XM, IT, S3M and PLS(e.g. Webstream). Tried pls and m3u function StopR () stopSound( sound ) -- Done f.ucked end addEventHandler("onClientGUIClick", srb, StopR, false) function Bff () sound = playSound("http://playerservices.streamtheworld.com/pls/TOM_LEYKIS_SHOW.pls") end addEventHandler("onClientGUIClick",B1b,Bff) Does not stop it. Link to comment
xXMADEXx Posted November 9, 2013 Share Posted November 9, 2013 Use this: function StopR ( ) if ( isElement ( sound ) ) then destroyElement ( sound ) end end Link to comment
Atton Posted November 9, 2013 Author Share Posted November 9, 2013 Use this: function StopR ( ) if ( isElement ( sound ) ) then destroyElement ( sound ) end end --=======================================================================================================-- local screenWidth, screenHeight = guiGetScreenSize() local windowWidth, windowHeight = 581, 373 local left = screenWidth/2 - windowWidth/2 --guiSetVisible(Mgui, false)-- local top = screenHeight/2 - windowHeight/2 Mgui = guiCreateWindow(left, top, windowWidth, windowHeight, "MainWindow", false) guiWindowSetSizable(Mgui, false) guiSetVisible(Mgui, false) --=======================================================================================================-- B1b = guiCreateButton(0, 25, 151, 61, "TOM LEYKIS", false, Mgui) B2b = guiCreateButton(150, 25, 151, 61, "B2", false, Mgui) B4b = guiCreateButton(0, 85, 151, 61, "B4", false, Mgui) B6b = guiCreateButton(300, 85, 151, 61, "B6", false, Mgui) B3b = guiCreateButton(300, 25, 151, 61, "B3", false, Mgui) B5b = guiCreateButton(150, 85, 151, 61, "B5", false, Mgui) B7b = guiCreateButton(0, 145, 151, 61, "B7", false, Mgui) B10b = guiCreateButton(0, 205, 151, 61, "B10", false, Mgui) B8b = guiCreateButton(150, 145, 151, 61, "B8", false, Mgui) B9b = guiCreateButton(300, 145, 151, 61, "B9", false, Mgui) B13b = guiCreateButton(0, 265, 151, 61, "B13", false, Mgui) B11b = guiCreateButton(150, 205, 151, 61, "B11", false, Mgui) B14b = guiCreateButton(150, 265, 151, 61, "B14", false, Mgui) B12b = guiCreateButton(300, 205, 151, 61, "B12", false, Mgui) B15b = guiCreateButton(300, 265, 151, 61, "B15", false, Mgui) closeb = guiCreateButton(480, 265, 91, 51, "Close", false, Mgui) srb = guiCreateButton(480, 205, 91, 51, "Stop Radio", false, Mgui) label = guiCreateLabel(470, 35, 101, 31, " Radio ", false, Mgui) --[[ guiLabelSetHorizontalAlign(gui["label"], "left", false) guiLabelSetVerticalAlign(gui["label"], "center") ]]-- --=======================================================================================================-- function Mguix() if (guiGetVisible(Mgui)) then guiSetVisible(Mgui, false) showCursor(false) else guiSetVisible(Mgui, true) showCursor(true) end end addCommandHandler("music", Mguix) function CloseF() guiSetVisible(Mgui, false) showCursor(false) end addEventHandler("onClientGUIClick", closeb, CloseF, false) function StopR (sound) if ( isElement ( sound ) ) then destroyElement ( sound ) end end addEventHandler("onClientGUIClick", srb, StopR, false) function Bff () sound = playSound("http://playerservices.streamtheworld.com/pls/TOM_LEYKIS_SHOW.pls") end addEventHandler("onClientGUIClick",B1b,Bff) It does not kill the sound tried a few times to. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now