B4J Question Media Player on Windows 10

marco.canta

Active Member
Licensed User
Longtime User
Hello, I had made a B4J program on Windows 7 that started a series of MP3 files to send audio messages related to some of the program's procedures. Now with windows 10 (both 32 and 64 bit) it no longer works, that is, MP3 files are no longer heard.
Who can help me ? What can it depend on?

B4X:
Sub StarPlay
    FilePlay("Numero.mp3")                                ' Numero
End Sub

Sub FilePlay(FileMP As String)
    Try
        Main.Mp.Initialize("mp",File.geturi(File.DirApp & "/Voice/",FileMP))
        Main.Mp.Position = 0
        Main.Mp.Play
    Catch
        Main.Messaggio("Errore", "  Peocedura FilePlay  ")
        Log(LastException.Message)
    End Try   
End Sub

The Numero.MP3 file in windows 10 is heard quietly.

Thank you
Marco
 

William Lancee

Well-Known Member
Licensed User
Longtime User
I tested the attached on Windows 10, it works fine here. Does it work for you?

Unzip sound to Objects folder.
 

Attachments

  • testMP.zip
    1,012 bytes · Views: 252
  • heart beat-sound.zip
    24.7 KB · Views: 209
Upvote 0

marco.canta

Active Member
Licensed User
Longtime User
The problem is probably related to the MP3 file. A file with "DinDon.mp3" sound taken from the web works, an MP3 file that I generated with an online text-mp4 converter does not work.

I would like to generate MP3s with the words I have chosen, which converter do you recommend?

Thank you so much

Marco
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
generated with an online text-mp4
Then it may be a problem with the encoding of the returned file. If the site has options for encoding, try some different ones.
 
Last edited:
Upvote 0

William Lancee

Well-Known Member
Licensed User
Longtime User
I use B4A to generate text to speech. See attached example.
If you don't have B4A, it will be free in a few weeks!

(edit: I forgot to attach)
 

Attachments

  • testTTS.zip
    8.3 KB · Views: 196
Last edited:
Upvote 0

William Lancee

Well-Known Member
Licensed User
Longtime User
I was curious, I googled.

Windows Media Player in Windows 10 doesn't natively support the . mp4 format. To play MP4 you need to download some Codecs or use one of these 3rd-party video or media players. These two packs Combined Community Codec Pack or K-Lite Codec Pack should make your MP4 files play.
 
Upvote 0
Top