so,i have a error 701 when i try to play a specific soundtrack,located in my downloads folder. i have made sure the directory was the same,and have added in the file:///mnt/sdcard/emulated/0/ myfile.mp3,and yet it shows the aformentioned error.
so all it is suppsed to do is play the file that i have set it here,but it's not working. i would import the sound in,if not for the fact that this is for drama,and we have not chosen our sound for that particular section yet,aso,it's probably over the size limit for integrating into the program,thats why i have set this external directory.
screenshots provided.
--
this path file:///mnt/sdcard/emulated/0/ myfile.mp3 does not exist
--
you should use the generic path file:///mnt/sdcard/myfile.mp3 which works for emulated sdcards and devices which have an sdcard
alternatively this path file:///storage/ emulated/0/myfile.mp3 should work on devices, which have an emulated sdcard
oh right,it's not sdcard,it's storage...
--
i'm an idiot,thanks for the reminder...
:]
derp on my part. blame the beginner part of me.
but it's in the download file,do i also need to point at it,or will it just read it all to find the mp3?
i'm talking about the second option.
the first one also seems to not work.
here are the screenshots,from my phone.
--
try file:///mnt/sdcard/ Download/backgroundcont.mp3
--
nope,practically the same error,but with that directory showing up instead.
--
is the mp3 file ok, i.e. did you try to play that file using another app?
--
did you try another mp3 file?
you also can try to prepare a very simple test example: in a button.click event just set the player.source to a mp3 file stored on your sdcard and then call Player.Start
does the simple example work?
you also can try to test my Jukebox example here https://puravidaapps.com/ file.php
sorry,was asleep just now.
first question,yes.
second question,yes
third,no.
jukebox,just tested,seems to randomly find songs from my music folder,but that is where i kept my songs at...
this is what i am trying now,and still failing...
--
so i have somewhat given up on the direct directory method,and instead am trying the method here
--
works better,but still stuck.
at least no error 701,but here's the problem now.
the music files are gray,i.e. i cannot play,but going to the music section of the file manager app shows that as playable,but when i tap it,it just gives me the final responce, in the webpage's case,no pdf file selected, in mine,as i have changed the text,it says, select a sound file first,or something like this.
so thats the first problem,the second one is much more minor...will it play using the music app,or the in-built appone?
phone screenshots in about two-three hours,a bit busy for now,so just contemplate my fails here
the FileList block returns a list of filenames, the Player.Source block however expects a single filename and not a list
--
use Do it to find out the path to the file to use, then use that path and assign it to Player.Source
is the name of your folder Download or Downloads?
in case it is Downloads, the try this try file:///mnt/sdcard/Downloa ds/backgroundcont.mp3
how to use Do it see also tip 4 here
it's download. that was my fault,although since then,i have rectified that mistake.also,am using do it now,but i now get the old timey 701 error again,is that supposed to happen? don't think so.
and if it's supposed to have something show up in either the app,or in the coding webpage itself,it's not popping up.
--
it's download. that was my fault,
I guess, it's Download with capital D then...
the FileList block gives you a list of correct filenames, make sure, the directory name is correct.. . Download or Downloads or download is not the same...
you might want to provide a screenshot incl. Do it result...
then use one of these correct filenames and assign it to Player.Source
it seems to be you do not understand what I'm saying?
--
the FileList block returns a list of filenames, the Player.Source block however expects a single filename and not a list
which means, your blocks will not work like that
if you want to use these blocks, you have to additionally use a select item from list block together with index 1 (see arrow in screenshot) to get the first item from the list
alternatively try directly try /storage/emulated/0/ Download/backgroundcont.mp3
--
ok, the alternative worked. thanks!
--
sorry for the late reply,but it works,and am now on a new project,albeit a very much similar one to this. i'm trying the http://puravidaapps.com/ pick.php way of having it read a specific directory. it always just gives the final error,every time.
--
for new questions, please start a new thread
and concerning the old question, you might want to provide the solution, which worked for you in the end. thank you
--
fair point. i shall do that.
Sound Control Soundboard.aia
the way that i got it to work is so laughably simple,and yet,i was a complete and utter fool to not have figured it out earlier.
it will be better to just have the blocks shown to you all.
also,for reasons unbeknownst to me,i have removed the name of some blocks,some to protect the privacy of my fellow students,and some,for reasons,that i can't think of.
please note,the block says to find a mp3 file called backgroundcont.mp3 in the downloads file,so make sure your file is there in the first place,before you try anything.
also,just for lols,i will give you all a copy of the program,just throw in whatever sound track you need at according to the no.buttons, and rename them,then you can load it up for yourself!
you are also free to modify it to get the code more clean and stuff. i just cobbled this in roughly 4 hours,so you all get to see my possibly bad and therefore cause the appto react slightly slower than what it could have been with shorter code.
댓글 없음:
댓글 쓰기