Playing .wav File
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Playing .wav File
I am having trouble playing a sound on my Android tablet. I have tried the following:
MobileControlCreate "player", "testplayer"
MobileControlSet "testplayer", "filename", "wavfile"
MobileControlGo "testplayer", "play"
I have imported as control to wavfile.
I have also tried:
Play wavfile - this works on my PC...
Any help will be appreciated!
Many Thanks,
Matt.
MobileControlCreate "player", "testplayer"
MobileControlSet "testplayer", "filename", "wavfile"
MobileControlGo "testplayer", "play"
I have imported as control to wavfile.
I have also tried:
Play wavfile - this works on my PC...
Any help will be appreciated!
Many Thanks,
Matt.
Re: Playing .wav File
Hi Matt,
I've used .mp3 files for sound, .wav actually has many types of CODECs so I don't like them.
Don't forget you have to use the Copy Files tab to include you sound files and they will be located e.g
Once on the device.
Simon
I've used .mp3 files for sound, .wav actually has many types of CODECs so I don't like them.
Don't forget you have to use the Copy Files tab to include you sound files and they will be located e.g
Code: Select all
put specialFolderPath("engine") & slash & "goal.mp3" into gSoundGoal
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Playing .wav File
The actual command is mobileControlDo. I don't know if that was a typo or not.
I also found recently that, at least on Android, player names don't work. I had to switch to using IDs. Names work okay with native fields but for some reason they fail with players. I've been meaning to report that.
I also found recently that, at least on Android, player names don't work. I had to switch to using IDs. Names work okay with native fields but for some reason they fail with players. I've been meaning to report that.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: Playing .wav File
Hi Matt,
Add your WAV file(s) to your standalone via the standalone builder "Copy files" and access
them as Simon shows in his example script but in -> specialfolderpath("resources")
Best
Klaus
imported sounds do not work on mobile!Googie85 wrote:I...I have imported as control to wavfile...
Add your WAV file(s) to your standalone via the standalone builder "Copy files" and access
them as Simon shows in his example script but in -> specialfolderpath("resources")
Best
Klaus
-
- Posts: 14
- Joined: Thu Mar 24, 2016 12:13 pm
Re: Playing .wav File
I also have an issue with this. Im trying to built my android app. and it contains videos. I can play it in my pc but when I built it in apk, my video doesn't come.
I have tried using code in website but still nothing works. Can someone help me? I really depressed because this is for my final assignment
I have tried using code in website but still nothing works. Can someone help me? I really depressed because this is for my final assignment

Re: Playing .wav File
Hi maulinarmananda,
1. welcome to the forum!
2.
Reminder: Imported sound and video files do NOT work on mobile.
And please post your script(s), I am sure we can work that out!
Best
Klaus
1. welcome to the forum!

2.
sounds like a pathname problem! What pathname are you using?maulinarmananda wrote:I also have an issue with this. Im trying to built my android app. and it contains videos. I can play it in my pc but when I built it in apk, my video doesn't come.
I have tried using code in website but still nothing works.
Reminder: Imported sound and video files do NOT work on mobile.
And please post your script(s), I am sure we can work that out!
Best
Klaus
-
- Posts: 14
- Joined: Thu Mar 24, 2016 12:13 pm
Re: Playing .wav File
this is my code
on openCard
if the environment = "mobile" then
put specialFolderPath("engine") & "/qtimun.mp4" into tVidFile
mobileControlCreate "player", "myPlayer"
put the result into sPlayerID -- save the control id
mobileControlSet sPlayerID, "filename", tVidFile
mobileControlSet sPlayerID, "visible", true
mobileControlSet sPlayerID, "rect", "30,32,414,330"
mobileControlSet sPlayerID, "showController", false
mobileControlSet sPlayerID, "preserveAspect", false
--mobileControlDo "myPlayer", "play"
--mobileControlDo "myPlayer", "pause"
end if
end openCard
mobileControlSet sPlayerID, "visible", false
on closeCard
end closeCard
sorry Klaus for asking you in other question. I will just gonna use this one. Hope I can fix my problem
on openCard
if the environment = "mobile" then
put specialFolderPath("engine") & "/qtimun.mp4" into tVidFile
mobileControlCreate "player", "myPlayer"
put the result into sPlayerID -- save the control id
mobileControlSet sPlayerID, "filename", tVidFile
mobileControlSet sPlayerID, "visible", true
mobileControlSet sPlayerID, "rect", "30,32,414,330"
mobileControlSet sPlayerID, "showController", false
mobileControlSet sPlayerID, "preserveAspect", false
--mobileControlDo "myPlayer", "play"
--mobileControlDo "myPlayer", "pause"
end if
end openCard
mobileControlSet sPlayerID, "visible", false
on closeCard
end closeCard
sorry Klaus for asking you in other question. I will just gonna use this one. Hope I can fix my problem