omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 18, 2015 #1 Hi Erel. I use below code for play audio : B4X: Dim a as MediaPlayer a.Initilize(File.DirAssets,"ding.mp3","media") a.Play When run it not play audio. I increase device volume but not have audio.
Hi Erel. I use below code for play audio : B4X: Dim a as MediaPlayer a.Initilize(File.DirAssets,"ding.mp3","media") a.Play When run it not play audio. I increase device volume but not have audio.
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2015 #2 omidaghakhani1368 said: Hi Erel. Click to expand... Please do not limit your questions to a single member. Does it work with other files? Upvote 0
omidaghakhani1368 said: Hi Erel. Click to expand... Please do not limit your questions to a single member. Does it work with other files?
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 19, 2015 #3 I'm sorry Erel. In forum anyone is friend and help to other one. Not work. It's not get error but not have sound, Upvote 0
I'm sorry Erel. In forum anyone is friend and help to other one. Not work. It's not get error but not have sound,
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2015 #4 Have you tried it with a different media file? Upvote 0
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 19, 2015 #5 No but i think mp3 file common audio format that basic would be play it. Maybe problem is my phone? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2015 #6 mp3 is supported by MediaPlayer. Upvote 0
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 19, 2015 #7 Of course.maybe audio not play on debug? perhabs only play on release app? Upvote 0
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2015 #8 Audio is played in debug mode. Please post your project with the audio file (File - Export as zip). Upvote 0
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 19, 2015 #9 I test again it. When create breakpoint and step by step run project,audio play but when complete run without breakpoint not working Attahment file Attachments s.zip 2.3 KB · Views: 186 Upvote 0
I test again it. When create breakpoint and step by step run project,audio play but when complete run without breakpoint not working Attahment file
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2015 #10 Make m1 a global variable. Otherwise it is released and will not play. Upvote 0
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 19, 2015 #11 Thank you.I decalre variable and it's play goooood Upvote 0
omidaghakhani1368 Well-Known Member Licensed User Longtime User Feb 22, 2015 #12 Hi again. the main problem is AirPlay. When i use AirPlay,also any audio play in iphone not have voice but when i stop airplay it play and have voice. This is experience Upvote 0
Hi again. the main problem is AirPlay. When i use AirPlay,also any audio play in iphone not have voice but when i stop airplay it play and have voice. This is experience
Erel B4X founder Staff member Licensed User Longtime User Feb 22, 2015 #13 This is a different issue. You can try to set the audio session as described here: https://www.b4x.com/android/forum/threads/background-playback.49337/ Upvote 0
This is a different issue. You can try to set the audio session as described here: https://www.b4x.com/android/forum/threads/background-playback.49337/