PC SOFT

FORUMS PROFESSIONNELS
WINDEVWEBDEV et WINDEV Mobile

Accueil → WINDEV Mobile 2024 → Adding a .wav sound in Android/iOS/UW10
Adding a .wav sound in Android/iOS/UW10
Débuté par Ferri DANIELE, 25 juin 2016 11:27 - 4 réponses
Membre enregistré
19 messages
Posté le 25 juin 2016 - 11:27
Hello from Italy

as described in th esubject, I'm trying to add a little sound to my app

in the WM21 emulator everything works fine, but when I deploy the app to
the phone (I have Android and UW10 now but I want to use also iOS ASAP)
I can't hear the sound

I think it's a problem of the path where the .wav file is located and/or a
missing library, but before to lose too many hours on this, I hope you expert
can give me a little help...

Thank you and sorry for very bad english

Daniele
Posté le 25 juin 2016 - 21:12
Hi

I don't think that the wav format i supported in android (the emulator
is in windows)... check in the help, thelist is there

Best regards

--
Fabrice Harari
International WinDev, WebDev and WinDev mobile Consulting

More information on http://www.fabriceharari.com
Membre enregistré
3 651 messages
Popularité : +175 (223 votes)
Posté le 25 juin 2016 - 22:03
Hi,

view link

wm notification example with .wav

or

http://forum.pcsoft.fr/fr-FR/pcsoft.br.windev/987-tocar-executar-arquivo-mp3-via-java-projeto-android/read.awp

ok

--
Adriano José Boller
______________________________________________
Consultor e Representante Oficial da
PcSoft no Brasil
+55 (41) 9949 1800
adrianoboller@gmail.com
skype: adrianoboller
http://wxinformatica.com.br/
Message modifié, 25 juin 2016 - 22:04
Membre enregistré
19 messages
Posté le 28 juin 2016 - 09:10
maybe a little example of my problem can be more clear...

k is string
k = fResourceDir() + "\Exe\" + "Bonus.wav"
Sound(k, soundWait)

in a Windev Mobile project for a Universal Win 10 app,
it works fine in the "emulator" but when I try it on a Lumia
phone I can't hear the sound.

Any help?
Posté le 14 juillet 2016 - 17:29
Buonasera,

prova a convertire il file in un altro formato anche con tool online (http://online-audio-converter.com/it/).

per fare delle prova in ogni caso ti conviene, per semplicita, copiare un file mp3 sulla memoria principale del dispositivo (non la SD card) e poi:

File is string = CompleteDir(CompleteDir(SysStatusStorageCard()) + "audio.mp3")
Sound(File)


questo per escludere problemi di path errata.

in ogni caso, citando l'help WD

http://help.windev.com/en-US/…

" an audio file corresponding to all the formats supported by the OS (wav, mp3, 3gp, ogg, ...). A summary of the supported audio files is available from the following address: http://developer.android.com/guide/appendix/media-formats.html. Note: the wav files in 32-bit format are not supported by Android. "

probabilmente il prroblema è il formato wav in sé.

Saluti.



Hi,

try to copy your file in the phone storage and use the following code:

File is string = CompleteDir(CompleteDir(SysStatusStorageCard()) + "audio.mp3")
Sound(File)


As the help explains the wav file type probably is not supported by android, try to convert your file in another audio format.

http://help.windev.com/en-US/…

" an audio file corresponding to all the formats supported by the OS (wav, mp3, 3gp, ogg, ...). A summary of the supported audio files is available from the following address: http://developer.android.com/guide/appendix/media-formats.html. Note: the wav files in 32-bit format are not supported by Android. "

Regards.